37 #pragma warning(push, 0) // no warnings from includes 41 #include <opencv2/core.hpp> 42 #include <opencv2/imgproc.hpp> 46 #ifdef DLL_CORE_EXPORT 47 #define DllCoreExport Q_DECL_EXPORT 49 #define DllCoreExport Q_DECL_IMPORT 53 #pragma warning(disable: 4251) 67 Blob(
const QVector<cv::Point>& outerC,
const QVector<QVector<cv::Point> >& innerC);
74 void setBlob(
const QVector<cv::Point>& outerC,
const QVector<QVector<cv::Point> >& innerC);
75 QVector<cv::Point> outerContour()
const;
76 QVector<QVector<cv::Point> > innerContours()
const;
77 QVector<cv::Vec4i> hierarchy()
const;
78 float blobOrientation()
const;
79 bool drawBlob(cv::Mat& imgSrc, cv::Scalar color = cv::Scalar(255, 255, 255),
int maxLevel = 1)
const;
101 bool isEmpty()
const;
102 bool setImage(
const cv::Mat& bWImg);
104 QVector<Blob> blobs()
const;
105 void setBlobs(
const QVector<Blob>& blobs);
106 cv::Size size()
const;
115 QVector<Blob> mBlobs;
117 int mApproxMethod = CV_CHAIN_APPROX_SIMPLE;
120 bool checkInput()
const;
132 QVector<Blob> filterArea(
int area,
const Blobs& blobs)
const;
133 QVector<Blob> filterMar(
float maxAspectRatio,
int minWidth,
const Blobs& blobs)
const;
134 QVector<Blob>
filterAngle(
double angle,
double maxAngleDiff,
const Blobs& blobs)
const;
135 cv::Mat drawBlobs(
const Blobs& blobs, cv::Scalar color = cv::Scalar(255, 255, 255))
const;
136 QVector<Line> lines(
const Blobs& blobs)
const;
137 Blob getBiggestBlob(
const Blobs& blobs)
const;
Allows to manipulate the Blobs class (filter, etc.)
Definition: Blobs.h:127
Blobs class - holds a vector of Blobs and the corresponding image.
Definition: Blobs.h:94
#define DllCoreExport
Definition: BaseImageElement.h:43
QVector< cv::Point > mOuterContour
Definition: Blobs.h:83
QVector< QVector< cv::Point > > mInnerContours
Definition: Blobs.h:84
QVector< QSharedPointer< TextLineSet > > filterAngle(const QVector< QSharedPointer< TextLineSet > > &textLines, double maxAngle=4 *DK_DEG2RAD)
Definition: Algorithms.cpp:45
A class that defines a single blob within an image.
Definition: Blobs.h:61