Object Detection  5.0
Image Processing Using Qt and Opencv
dilateimpl.cpp
1 #include "dilateimpl.h"
2 using namespace ImageProcessor;
3 
4 Dilate::_DilateImpl::_DilateImpl(Dilate *const ptr) :_ptr{ ptr }
5 {
6 
7 }
8 
9 int Dilate::_DilateImpl::getDilationSize() const
10 {
11  return dilationSize;
12 }
13 
14 void Dilate::_DilateImpl::setDilationSize(int value)
15 {
16  dilationSize = value;
17 }
18 
19 cv::MorphShapes Dilate::_DilateImpl::getShap() const
20 {
21  return shap;
22 }
23 
24 void Dilate::_DilateImpl::setShap(const cv::MorphShapes &value)
25 {
26  shap = value;
27 }
28 
29 void Dilate::_DilateImpl::dilateImg()
30 {
31  cv::Mat temp;
32  cv::Mat element = getStructuringElement(getShap(),
33  cv::Size( 2 * getDilationSize() + 1, 2 * getDilationSize() + 1 ),
34  cv::Point( getDilationSize(), getDilationSize() ) );
35  cv::dilate( _ptr->getImg(), temp, element);
36  _ptr->setDst(temp);
37 }
38 
39 QVariant Dilate::_DilateImpl::processImage()
40 {
41  dilateImg();
42  return QVariant();
43 }
int getDilationSize() const
returns the dilation Size
Definition: dilate.cpp:13
Common Namespace for all Image Processor Algorithms.
this Class is used to perform morphological dilate operation on image see Morphological Operation...
Definition: dilate.h:13