Object Detection  5.0
Image Processing Using Qt and Opencv
detectcolorimpl.h
1 #ifndef DETECTCOLORIMPL_H
2 #define DETECTCOLORIMPL_H
3 
4 #include "ImageProcessor/detectcolor.h"
5 
6 //TODO DONE Use PIMPL C++ Idiom
7 #include <QObject>
8 #include <headers.h>
9 class ImageProcessor::DetectColor::_DetectColorImpl{
10 private:
11  cv::Scalar minColor = cv::Scalar(20, 100, 100);
12  cv::Scalar maxColor = cv::Scalar(30, 255, 255);
13  DetectColor * const _ptr;
14 public:
15  _DetectColorImpl(DetectColor *const ptr);
16  _DetectColorImpl(const _DetectColorImpl&) = default;
17  cv::Scalar getMinColor() const;
18  void setMinColor(const cv::Scalar &value);
19  cv::Scalar getMaxColor() const;
20  void setMaxColor(const cv::Scalar &value);
21  QVariant processImage();
22  void detectColor();
23 };
24 
25 #endif // DETECTCOLOR_H
void setMinColor(const cv::Scalar &value)
sets The Minimum hsv color for the Detector
Definition: detectcolor.cpp:21
cv::Scalar getMinColor() const
returns the Minimum HSV Color space Of Threshold Detector
Definition: detectcolor.cpp:13
this class is used to Detect Color given it&#39;s range(min, max) of hsv colors.
Definition: detectcolor.h:13
void setMaxColor(const cv::Scalar &value)
sets The maximum hsv color for the Detector
Definition: detectcolor.cpp:43
void detectColor()
Helper Function Used To Detect Color.
Definition: detectcolor.cpp:59
virtual QVariant processImage() override
Pure Virtual Function representes the operation to be done on the Image to be processed.
Definition: detectcolor.cpp:48
cv::Scalar getMaxColor() const
returns the maximum HSV Color space Of Threshold Detector
Definition: detectcolor.cpp:29