25 #ifndef INCLUDED_SBDBlobExtractor_h_GUID_E67E1F86_F827_48A3_5FA2_F9F241BA79AF
26 #define INCLUDED_SBDBlobExtractor_h_GUID_E67E1F86_F827_48A3_5FA2_F9F241BA79AF
35 #include <opencv2/features2d/features2d.hpp>
42 class KeypointDetailer;
54 LedMeasurementVec
const &
extractBlobs(cv::Mat
const &grayImage);
56 enum class Algo { SimpleBlobDetector, EdgeHoleExtractor };
58 Algo getAlgo()
const {
return m_algo; }
64 cv::Mat
const &getDebugBlobImage();
66 cv::Mat
const &getDebugExtraImage();
69 void getKeypoints(cv::Mat
const &grayImage);
70 cv::Mat generateDebugThresholdImage()
const;
71 cv::Mat generateDebugBlobImage()
const;
76 cv::SimpleBlobDetector::Params m_sbdParams;
77 LedMeasurementVec m_latestMeasurements;
79 std::vector<cv::KeyPoint> m_keyPoints;
82 std::unique_ptr<KeypointDetailer> m_keypointDetailer;
84 cv::Mat m_lastGrayImage;
86 bool m_debugThresholdImageDirty =
true;
87 cv::Mat m_debugThresholdImage;
89 bool m_debugBlobImageDirty =
true;
90 cv::Mat m_debugBlobImage;
102 cv::Mat generateDebugThresholdImage_()
const override;
103 cv::Mat generateDebugBlobImage_()
const override;
107 void getKeypoints(cv::Mat
const &grayImage);
109 std::vector<cv::KeyPoint> m_keyPoints;
110 cv::SimpleBlobDetector::Params m_sbdParams;
113 BlobExtractorPtr makeBlobExtractor(
BlobParams const &blobParams);
117 #endif // INCLUDED_SBDBlobExtractor_h_GUID_E67E1F86_F827_48A3_5FA2_F9F241BA79AF
Blob detection configuration parameters.