Ignore:
Timestamp:
2019-07-06T15:45:02+12:00 (5 years ago)
Author:
cpb16
Message:

Backup for computer crash, only lost 5 lines of code in development section. They have been rewritten.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/is-sheet-music-encore/trunk/image-identification-terminal/javaImageClassifier.java

    r33243 r33304  
    3333    static int CLASSIFIER_HOUGHLINESP_MAX   = 65;
    3434    static int HOUGHLINEP_THRESHOLD         = 10;
    35     static int MINLINECOUNT                 = 40; //50
     35    static int MINLINECOUNT                 = 40;
    3636    static double MAXLINEGAP                = 4;
    37     static double SLOPEGRADIENT             = 0.02; //0.01
     37    static double SLOPEGRADIENT             = 0.02;
    3838
    3939    public static void main(String[] args) {   
     
    136136        //Imgproc.Canny(original, edgesDetected, 50, 200, 3, false);
    137137        Imgproc.adaptiveThreshold(original, edgesDetected,255, Imgproc.ADAPTIVE_THRESH_GAUSSIAN_C,Imgproc.THRESH_BINARY_INV,15, 2);
     138        //Imgproc.blur(edgesExtra, edgesDetected, new Size(3,1));
    138139        //Imgproc.medianBlur(edgesExtra, edgesDetected, 3);
    139140       
     
    160161            if(m<SLOPEGRADIENT) {
    161162                //System.out.println("m: " + m);
    162                 Imgproc.line(edgesDetectedRGB, new Point(l[0], l[1]), new Point(l[2], l[3]), new Scalar(0, 0, 255), 1, Imgproc.LINE_AA, 0);
     163                //Imgproc.line(edgesDetectedRGB, new Point(l[0], l[1]), new Point(l[2], l[3]), new Scalar(0, 0, 255), 1, Imgproc.LINE_AA, 0); SINCE NOT SAVING IMAGES OR COUNTING PIXELS
    163164                horizontalLineCount++;
    164165            }
     
    166167       
    167168        //Convert MAT into a BufferedImage
    168         BufferedImage toBeClassifiedImg = toBufferedImage(edgesDetectedRGB);
     169        //BufferedImage toBeClassifiedImg = toBufferedImage(edgesDetectedRGB); SINCE NOT SAVING IMAGES OR COUNTING PIXELS
    169170        //Calculate if its sheet music or not
    170171        isSheetMusic = classifier_HoughLinesP_refined(horizontalLineCount); 
Note: See TracChangeset for help on using the changeset viewer.