test_blobdetector.cpp 844 B

12345678910111213141516171819202122
  1. // This file is part of OpenCV project.
  2. // It is subject to the license terms in the LICENSE file found in the top-level directory
  3. // of this distribution and at http://opencv.org/license.html.
  4. #include "test_precomp.hpp"
  5. namespace opencv_test { namespace {
  6. TEST(Features2d_BlobDetector, bug_6667)
  7. {
  8. cv::Mat image = cv::Mat(cv::Size(100, 100), CV_8UC1, cv::Scalar(255, 255, 255));
  9. cv::circle(image, Point(50, 50), 20, cv::Scalar(0), -1);
  10. SimpleBlobDetector::Params params;
  11. params.minThreshold = 250;
  12. params.maxThreshold = 260;
  13. params.minRepeatability = 1; // https://github.com/opencv/opencv/issues/6667
  14. std::vector<KeyPoint> keypoints;
  15. Ptr<SimpleBlobDetector> detector = SimpleBlobDetector::create(params);
  16. detector->detect(image, keypoints);
  17. ASSERT_NE((int) keypoints.size(), 0);
  18. }
  19. }} // namespace