40 #pragma warning(push, 0) // no warnings from includes 45 #ifdef DLL_CORE_EXPORT 46 #define DllCoreExport Q_DECL_EXPORT 48 #define DllCoreExport Q_DECL_IMPORT 63 virtual QString toString()
const override;
65 void setMaxEdgeThresh(
double et);
66 double maxEdgeTrhesh()
const;
70 double mMaxEdgeThresh = 20;
73 void load(
const QSettings& settings)
override;
74 void save(QSettings& settings)
const override;
82 bool isEmpty()
const override;
83 bool compute()
override;
85 cv::Mat draw(
const cv::Mat& img,
const QColor& col = QColor())
const;
86 QString toString()
const override;
88 void addSeparatorLines(
const QVector<Line>& lines);
90 QVector<PixelSet> sets()
const;
91 QSharedPointer<SimpleTextLineConfig>
config()
const;
92 QVector<QSharedPointer<TextLineSet> > textLineSets()
const;
99 QVector<PixelSet> mTextLines;
100 QVector<Line> mStopLines;
103 QVector<QSharedPointer<PixelEdge> > mEdges;
105 bool checkInput()
const override;
114 virtual QString toString()
const override;
116 void setMinLineLength(
int length);
117 int minLineLength()
const;
119 void setMinPointDistance(
double dist);
120 double minPointDistance()
const;
122 void setErrorMultiplier(
double multiplier);
123 double errorMultiplier()
const;
125 QString debugPath()
const;
129 int mMinLineLength = 15;
130 double mMinPointDist = 80.0;
131 double mErrorMultiplier = 1.4;
132 QString mDebugPath =
"C:/temp/cluster/";
134 void load(
const QSettings& settings)
override;
135 void save(QSettings& settings)
const override;
143 bool isEmpty()
const override;
144 bool compute()
override;
145 bool compute(
const cv::Mat& img);
146 QSharedPointer<TextLineConfig>
config()
const;
148 void addSeparatorLines(
const QVector<Line>& lines);
149 QVector<QSharedPointer<TextLine> > textLines()
const;
150 QVector<QSharedPointer<TextLineSet> > textLineSets()
const;
153 void scale(
double s);
155 cv::Mat draw(
const cv::Mat& img,
const QColor& col = QColor())
const;
156 static cv::Mat draw(
const cv::Mat& img,
const QVector<QSharedPointer<TextLineSet> >& textLines,
const QColor& col = QColor());
157 QString toString()
const override;
162 QVector<QSharedPointer<TextLineSet> > mTextLines;
163 QVector<Line> mStopLines;
165 bool checkInput()
const override;
167 QVector<QSharedPointer<TextLineSet> > clusterTextLines(
const PixelGraph& graph, QVector<QSharedPointer<PixelEdge> >* removedEdges = 0)
const;
168 QVector<QSharedPointer<TextLineSet> > clusterTextLinesDebug(
const PixelGraph& graph,
const cv::Mat& img)
const;
169 int locate(
const QSharedPointer<Pixel>& pixel,
const QVector<QSharedPointer<TextLineSet> >& sets)
const;
170 bool addPixel(QSharedPointer<TextLineSet>&
set,
const QSharedPointer<Pixel>& pixel,
double heat)
const;
171 bool mergeTextLines(
const QSharedPointer<TextLineSet>& tln1,
const QSharedPointer<TextLineSet>& tln2,
double heat)
const;
172 void filterDuplicates(
PixelSet&
set)
const;
175 void mergeUnstableTextLines(QVector<QSharedPointer<TextLineSet> >& textLines)
const;
Definition: BaseModule.h:63
#define DllCoreExport
Definition: BaseImageElement.h:43
PixelSet stores and manipulates pixel collections.
Definition: PixelSet.h:172
Definition: TextLineSegmentation.h:58
Definition: TextLineSegmentation.h:138
Represents a pixel graph. This class comes in handy if you want to map pixel edges with pixels...
Definition: PixelSet.h:377
config
Definition: DependencyCollector.py:271
Definition: BaseModule.h:107
Definition: ScaleFactory.h:95
DllCoreExport bool save(const QImage &img, const QString &savePath, int compression=-1)
Saves the specified QImage img.
Definition: Image.cpp:180
DllCoreExport QImage load(const QString &path, bool *ok=0)
Definition: Image.cpp:152
This is the base class for all modules. It provides all functions which are implemented by the module...
Definition: BaseModule.h:126
Definition: Algorithms.cpp:45
Definition: TextLineSegmentation.h:109
QSharedPointer< ScaleFactory > mScaleFactory
Definition: TextLineSegmentation.h:71
Definition: TextLineSegmentation.h:77