Hi every one, May you please help on how to extract haar features from Mat image using java. Thanks

asked 2018-08-26 06:18:16 -0600

Oupa gravatar image

Below is my grayscale image.

final BufferedImage image = mnistReader.getDataAsBufferedImage(data); System.out.println(item); System.loadLibrary( Core.NATIVE_LIBRARY_NAME ); MatOpenCV temp = new MatOpenCV();

                       Mat tempimage = temp.matify(image);


                       Imgproc.threshold(tempimage, tempimage, 100, 255, Imgproc.THRESH_BINARY);


                    Imgproc.resize(tempimage, tempimage, new Size(6, 6));

                    Imgproc.cvtColor(tempimage, tempimage, Imgproc.COLOR_BGR2GRAY);
edit retag flag offensive close merge delete