Object Detection  5.0
Image Processing Using Qt and Opencv
objectdetection.h
1 #ifndef OBJECTDETECTION_H
2 #define OBJECTDETECTION_H
3 
4 #include <QObject>
5 #include <headers.h>
6 #include <ImageProcessor/detectcircle.h>
7 #include <ImageProcessor/detectcolor.h>
8 #include <ImageProcessor/abstractimageprocessor.h>
9 #include <ImageProcessor/dilate.h>
10 #include "imageprocessorpluginiface.h"
11 namespace ImageProcessor {
12  class IMG_PROC_LIB ObjectDetection;
13 
14 }
15 using namespace ImageProcessor;
16 
18 {
19  Q_OBJECT
20 private:
21  class _ObjectDetectionImpl;
22  std::unique_ptr<_ObjectDetectionImpl> _pimpl;
23 public:
24  explicit ObjectDetection(QObject *parent = nullptr);
25  Dilate *getDiler() const;
26  DetectColor *getColDetector() const;
28  std::vector<cv::Vec3f> getCircles();
29  QVariant getResults() const;
30 
31  virtual ~ObjectDetection();
32 public slots:
33  void setCirDetector(DetectCircle *cirDetector);
34  void setDiler(Dilate *diler);
35  void setColDetector(DetectColor *colDetector);
36  void addFilter(PluginSharedPointer proc);
37  //TODO void removeFilter(AbstractImageProcessor *proc);
38  std::vector<PluginSharedPointer> getFilters() const;
39  void setFilters(const std::vector<PluginSharedPointer> &value);
40 
41 protected:
42  void setResults(QVariant res);
43  cv::Mat applyFilters(cv::Mat dst) const;
44  // ImageProcessor::AbstractImageProcessor interface
45 public:
46  virtual QVariant processImage() override;
47 };
48 
49 #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.
The ImageProcessor::AbstractImageProcessor is an Abstract Base Class For All Image Processor Classes...
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.
ObjectDetection(QObject *parent=nullptr)
ObjectDetection::ObjectDetection.
void setDiler(Dilate *diler)
ObjectDetection::setDiler sets the dilate object.
Common Namespace for all Image Processor Algorithms.
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.