FeatureDetector minimum template size

asked 2016-06-27 13:00:20 -0500

ogx gravatar image

When using brisk feature detector in java, the minimum input image size must be 6x6, anything smaller will result in an assertion error:

OpenCV Error: Assertion failed (dsize.area() > 0 || (inv_scale_x > 0 && inv_scale_y > 0)) in resize, file opencv-3.0.0/modules/imgproc/src/imgwarp.cpp, line 3209

Sample test code:

Mat template = Imgcodecs.imread(sourcePath);
FeatureDetector brisk = FeatureDetector.create(FeatureDetector.BRISK);
MatOfKeyPoint matOfKeyPointsTemplate = new MatOfKeyPoint();
brisk.detect(template, matOfKeyPointsTemplate);

Sample image: 5x5.jpg 6x6.jpg

Is this a bug?

edit retag flag offensive close merge delete