declare.in(frame);
- FastFeatureDetector fd(20, true, type);
- Ptr<FeatureDetector> fd = Algorithm::create<FeatureDetector>("Feature2D.FASTX");
++ Ptr<FeatureDetector> fd = Algorithm::create<FeatureDetector>("Feature2D.FAST");
+ ASSERT_FALSE( fd == 0 );
+ fd->set("threshold", 20);
+ fd->set("nonmaxSuppression", true);
+ fd->set("type", type);
vector<KeyPoint> points;
- TEST_CYCLE() fd.detect(frame, points);
+ TEST_CYCLE() fd->detect(frame, points);
SANITY_CHECK_KEYPOINTS(points);
}
:param filename: Name of file to be loaded.
:param flags: Flags specifying the color type of a loaded image:
-
+
- * 1 -
- * CV_LOAD_IMAGE_ANYDEPTH -
- CV_LOAD_IMAGE_COLOR
- CV_LOAD_IMAGE_GRAYSCALE
+ * CV_LOAD_IMAGE_ANYDEPTH - If set, return 16-bit/32-bit image when the input has the corresponding depth, otherwise convert it to 8-bit.
-
+
+ * CV_LOAD_IMAGE_COLOR - If set, always convert image to the color one
+
+ * CV_LOAD_IMAGE_GRAYSCALE - If set, always convert image to the grayscale one
* **>0** Return a 3-channel color image.
.. note:: In the current implementation the alpha channel, if any, is stripped from the output image. Use negative value if you need the alpha channel.
mDetector.process(mRgba);
List<MatOfPoint> contours = mDetector.getContours();
Log.e(TAG, "Contours count: " + contours.size());
-- Imgproc.drawContours(mRgba, contours, -1, CONTOUR_COLOR);
++ Core.drawContours(mRgba, contours, -1, CONTOUR_COLOR);
- Mat colorLabel = mRgba.submat(2, 34, 2, 34);
+ Mat colorLabel = mRgba.submat(4, 68, 4, 68);
colorLabel.setTo(mBlobColorRgba);
- Mat spectrumLabel = mRgba.submat(2, 2 + mSpectrum.rows(), 38, 38 + mSpectrum.cols());
+ Mat spectrumLabel = mRgba.submat(4, 4 + mSpectrum.rows(), 70, 70 + mSpectrum.cols());
mSpectrum.copyTo(spectrumLabel);
}