Object Detection  5.0
Image Processing Using Qt and Opencv
objectdetectionimpl.h
1 #ifndef OBJECTDETECTIONIMPL_H
2 #define OBJECTDETECTIONIMPL_H
3 
4 #include <QObject>
5 #include <headers.h>
6 #include <ImageProcessor/objectdetection.h>
7 #include <ImageProcessor/detectcircle.h>
8 #include <ImageProcessor/detectcolor.h>
9 #include <ImageProcessor/abstractimageprocessor.h>
10 #include <ImageProcessor/dilate.h>
11 //TODO Fix Filters
12 
13 class ImageProcessor::ObjectDetection::_ObjectDetectionImpl
14 {
15 private:
16  DetectCircle *_cirDetector;
17  DetectColor *_colDetector;
18  Dilate *_diler;
19  ObjectDetection *const _ptr;
20  QVariant results;
21  std::vector<PluginSharedPointer> _filters;
23 public:
24  _ObjectDetectionImpl(ObjectDetection *const ptr);
25  Dilate *getDiler() const;
26  void addFilter(PluginSharedPointer proc);
27  DetectColor *getColDetector() const;
29  std::vector<cv::Vec3f> getCircles();
30  void setCirDetector(DetectCircle *cirDetector);
31  void setDiler(Dilate *diler);
32  void setColDetector(DetectColor *colDetector);
33  QVariant processImage();
34  QVariant getResults() const;
35  void setResults(const QVariant &value);
36  std::vector<PluginSharedPointer> getFilters() const;
37  void setFilters(const std::vector<PluginSharedPointer> &value);
38  cv::Mat applyFilters(cv::Mat dst) const;
39 };
40 
41 
42 #endif // OBJECTDETECTION_H
this class is used to detect a a colored circle object(s)
void addFilter(PluginSharedPointer proc)
ObjectDetection::addFilter adds a filter from a plugin.
std::vector< cv::Vec3f > getCircles()
ObjectDetection::getCircles.
virtual QVariant processImage() override
Pure Virtual Function representes the operation to be done on the Image to be processed.
this class is used To Detect circles in an image
Definition: detectcircle.h:12
this class is used to Detect Color given it&#39;s range(min, max) of hsv colors.
Definition: detectcolor.h:13
void setCirDetector(DetectCircle *cirDetector)
ObjectDetection::setCirDetector sets the circleDetector.
DetectColor * getColDetector() const
ObjectDetection::getColDetector.
DetectCircle * getCirDetector() const
ObjectDetection::getCirDetector.
void setDiler(Dilate *diler)
ObjectDetection::setDiler sets the dilate object.
Dilate * getDiler() const
ObjectDetection::getDiler.
this Class is used to perform morphological dilate operation on image see Morphological Operation...
Definition: dilate.h:13
cv::Mat applyFilters(cv::Mat dst) const
ObjectDetection::applyFilters applies filters to the image.