Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin
2019-04-19 15:43:58 +03:00
40 changed files with 332 additions and 351 deletions
+12 -16
View File
@@ -44,15 +44,11 @@
#include <iterator>
#include <limits>
// Requires CMake flag: DEBUG_opencv_features2d=ON
//#define DEBUG_BLOB_DETECTOR
#ifdef DEBUG_BLOB_DETECTOR
# include "opencv2/opencv_modules.hpp"
# ifdef HAVE_OPENCV_HIGHGUI
# include "opencv2/highgui.hpp"
# else
# undef DEBUG_BLOB_DETECTOR
# endif
#include "opencv2/highgui.hpp"
#endif
namespace cv
@@ -200,13 +196,13 @@ void SimpleBlobDetectorImpl::findBlobs(InputArray _image, InputArray _binaryImag
findContours(binaryImage, contours, RETR_LIST, CHAIN_APPROX_NONE);
#ifdef DEBUG_BLOB_DETECTOR
// Mat keypointsImage;
// cvtColor( binaryImage, keypointsImage, CV_GRAY2RGB );
//
// Mat contoursImage;
// cvtColor( binaryImage, contoursImage, CV_GRAY2RGB );
// drawContours( contoursImage, contours, -1, Scalar(0,255,0) );
// imshow("contours", contoursImage );
Mat keypointsImage;
cvtColor(binaryImage, keypointsImage, COLOR_GRAY2RGB);
Mat contoursImage;
cvtColor(binaryImage, contoursImage, COLOR_GRAY2RGB);
drawContours( contoursImage, contours, -1, Scalar(0,255,0) );
imshow("contours", contoursImage );
#endif
for (size_t contourIdx = 0; contourIdx < contours.size(); contourIdx++)
@@ -296,12 +292,12 @@ void SimpleBlobDetectorImpl::findBlobs(InputArray _image, InputArray _binaryImag
#ifdef DEBUG_BLOB_DETECTOR
// circle( keypointsImage, center.location, 1, Scalar(0,0,255), 1 );
circle( keypointsImage, center.location, 1, Scalar(0,0,255), 1 );
#endif
}
#ifdef DEBUG_BLOB_DETECTOR
// imshow("bk", keypointsImage );
// waitKey();
imshow("bk", keypointsImage );
waitKey();
#endif
}