Object Detection  5.0
Image Processing Using Qt and Opencv
abstractimageprocessor.h
1 #ifndef ABSTRACTIMAGEPROCESSOR_H
2 #define ABSTRACTIMAGEPROCESSOR_H
3 
4 #include <QObject>
5 #include <headers.h>
6 #include <memory>
7 namespace ImageProcessor {
8  class IMG_PROC_LIB AbstractImageProcessor;
9 
10 }
12 {
13  Q_OBJECT
14 private:
15  class _AbstractImageProcessorImpl;
16  std::unique_ptr<_AbstractImageProcessorImpl> _pimpl;
17 //TODO add Decorator Pattern If Necessary
18 public:
19  cv::Mat getImg() const;
20  cv::Mat getDst() const;
21  virtual QVariant processImage() = 0;
22  virtual ~AbstractImageProcessor();
23 
24 signals:
25  void imageChanged(const cv::Mat& img);
26  void dstChanged(const cv::Mat& img);
27 protected:
28  AbstractImageProcessor(QObject *parent = nullptr);
29 public slots:
30  virtual void setDst(const cv::Mat &dst);
31  virtual void setImg(const cv::Mat &img);
32 };
33 
34 #endif // ABSTRACTIMAGEPROCESSOR_H
void dstChanged(const cv::Mat &img)
this Signal Is Emited When the destnation cv::Mat Object Changed. example:
The ImageProcessor::AbstractImageProcessor is an Abstract Base Class For All Image Processor Classes...
AbstractImageProcessor(QObject *parent=nullptr)
accpets A pointer To the Parent Class For The Qt Meta-object Model See Qt Meta-Object ...
cv::Mat getImg() const
AbstractImageProcessor::getImg.
virtual void setDst(const cv::Mat &dst)
sets The output of the operation
virtual QVariant processImage()=0
Pure Virtual Function representes the operation to be done on the Image to be processed.
cv::Mat getDst() const
returns A cv::Mat Object which represents the output of the image processing operation ...
Common Namespace for all Image Processor Algorithms.
void imageChanged(const cv::Mat &img)
this Signal Is Emited When the source cv::Mat Object Changed.