21#include <opencv2/core/core.hpp>
48 "use because of wraparound, 30=yellow, 45=light green, 60=green, 75=green cyan, 90=cyan, "
49 "105=light blue, 120=blue, 135=purple, 150=pink)",
94 public jevois::Parameter<blobdetector::hrange, blobdetector::srange, blobdetector::vrange,
95 blobdetector::maxnumobj, blobdetector::objectarea,
96 blobdetector::erodesize, blobdetector::dilatesize>
107 std::vector<std::vector<cv::Point> >
detect(cv::Mat
const & imghsv);
Simple color-based object/blob detection/tracking.
virtual ~BlobDetector()
Virtual destructor for safe inheritance.
std::vector< std::vector< cv::Point > > detect(cv::Mat const &imghsv)
Detect blobs, each is represented as a contour (vector of (x,y) coordinates)
JEVOIS_DECLARE_PARAMETER(srange, jevois::Range< unsigned char >, "Range of S (saturation) values for HSV window", jevois::Range< unsigned char >(10, 245), ParamCateg)
Parameter.
JEVOIS_DECLARE_PARAMETER(vrange, jevois::Range< unsigned char >, "Range of V (brightness) values for HSV window", jevois::Range< unsigned char >(10, 245), ParamCateg)
Parameter.
JEVOIS_DECLARE_PARAMETER(dilatesize, size_t, "Dilation structuring element size (pixels)", 8, ParamCateg)
Parameter.
JEVOIS_DECLARE_PARAMETER(erodesize, size_t, "Erosion structuring element size (pixels)", 3, ParamCateg)
Parameter.
JEVOIS_DECLARE_PARAMETER(maxnumobj, size_t, "Max number of objects to declare a clean image", 10, ParamCateg)
Parameter.
JEVOIS_DECLARE_PARAMETER(objectarea, jevois::Range< unsigned int >, "Range of object area (in pixels) to track", jevois::Range< unsigned int >(20 *20, 100 *100), ParamCateg)
Parameter.
JEVOIS_DECLARE_PARAMETER(hrange, jevois::Range< unsigned char >, "Range of H values for HSV window (0=red/do not " "use because of wraparound, 30=yellow, 45=light green, 60=green, 75=green cyan, 90=cyan, " "105=light blue, 120=blue, 135=purple, 150=pink)", jevois::Range< unsigned char >(10, 245), ParamCateg)
Parameter.
friend friend class Component