43 #pragma warning(push, 0) // no warnings from includes 51 #ifdef DLL_CORE_EXPORT 52 #define DllCoreExport Q_DECL_EXPORT 54 #define DllCoreExport Q_DECL_IMPORT 73 bool isEmpty()
const override;
77 void setPyramidLevel(
int level);
84 int mPyramidLevel = 0;
86 bool checkInput()
const override;
98 virtual QString toString()
const override;
100 int mserMinArea()
const;
101 int mserMaxArea()
const;
102 int erosionStep()
const;
104 void setNumErosionLayers(
int numLayers);
105 int numErosionLayers()
const;
109 int mMserMinArea = 25;
110 int mMserMaxArea = 500;
111 int mErosionStep = 4;
112 int mNumErosionLayers = 3;
114 void load(
const QSettings& settings)
override;
115 void save(QSettings& settings)
const override;
130 QVector<QSharedPointer<MserBlob> > toBlobs()
const;
133 std::vector<std::vector<cv::Point> >
pixels;
149 bool compute()
override;
151 QString toString()
const override;
152 QSharedPointer<SuperPixelConfig>
config()
const;
155 QVector<QSharedPointer<MserBlob> > getMserBlobs()
const;
157 cv::Mat draw(
const cv::Mat& img,
const QColor& col = QColor())
const;
158 cv::Mat drawMserBlobs(
const cv::Mat& img,
const QColor& col = QColor())
const;
162 QVector<QSharedPointer<MserBlob> > mBlobs;
164 QSharedPointer<MserContainer> getBlobs(
const cv::Mat& img,
int kernelSize)
const;
165 QSharedPointer<MserContainer> mser(
const cv::Mat& img)
const;
166 int filterAspectRatio(
MserContainer& blobs,
double aRatio = 0.1)
const;
167 int filterDuplicates(
MserContainer& blobs,
int eps = 5,
int upperBound = -1)
const;
180 virtual QString toString()
const override;
182 int minLineLength()
const;
185 int mMinLineLength = 5;
187 void load(
const QSettings& settings)
override;
188 void save(QSettings& settings)
const override;
200 bool compute()
override;
202 QString toString()
const override;
203 QSharedPointer<LinePixelConfig>
config()
const;
205 cv::Mat draw(
const cv::Mat& img)
const;
212 bool checkInput()
const override;
224 virtual QString toString()
const override;
226 bool autoWindowSize()
const;
227 void estimateWindowSize(
int height,
int numTiles = 100);
229 double winOverlap()
const;
230 double minEnergy()
const;
231 bool applyLineMask()
const;
234 bool mAutoWinSize =
true;
236 double mWinOverlap = 0.5;
237 double mMinEnergy = 0.07;
238 bool mLineMask =
true;
240 void load(
const QSettings& settings)
override;
241 void save(QSettings& settings)
const override;
247 GridPixel(
int index = -1,
int numColumns = -1);
250 void compute(
const cv::Mat& mag,
const cv::Mat& phase,
const cv::Mat& weight = cv::Mat());
260 double edgeStrength()
const;
263 void draw(QPainter& p)
const;
265 int index(
int row,
int col)
const;
266 QVector<int> neighbors()
const;
268 QSharedPointer<Pixel> toPixel()
const;
273 int mNumColumns = -1;
276 double mEdgeStrength = 0;
292 bool compute()
override;
294 QString toString()
const override;
295 QSharedPointer<GridPixelConfig>
config()
const;
297 cv::Mat draw(
const cv::Mat& img,
const QColor& col = QColor())
const;
301 QVector<QSharedPointer<GridPixel> > mGridPixel;
303 QMap<int, QSharedPointer<GridPixel> > computeGrid(
const cv::Mat& mag,
const cv::Mat& phase,
int winSize,
double winOverlap)
const;
304 QVector<QSharedPointer<GridPixel> >
merge(
const QMap<
int, QSharedPointer<GridPixel> >& pixels,
const cv::Mat& mag,
const cv::Mat& phase)
const;
308 QVector<PixelSet> cluster(
const PixelSet&
set)
const;
310 void edges(
const cv::Mat& src, cv::Mat& magnitude, cv::Mat& orientation)
const;
311 cv::Mat lineMask(
const cv::Mat& src)
const;
323 virtual QString toString()
const override;
325 int maxScale()
const;
326 int minScale()
const;
328 int numOrientations()
const;
329 int histSize()
const;
332 void setNumOrientations(
int numOr);
333 void setMaxScale(
int maxScale);
334 void setMinScale(
int minScale);
342 void load(
const QSettings& settings)
override;
343 void save(QSettings& settings)
const override;
355 bool isEmpty()
const override;
356 bool compute()
override;
358 QString toString()
const override;
359 QSharedPointer<LocalOrientationConfig>
config()
const;
364 cv::Mat draw(
const cv::Mat& img,
const QString&
id,
double radius)
const;
371 bool checkInput()
const override;
373 void computeScales(
Pixel* pixel,
const QVector<Pixel*>&
set)
const;
374 void computeAllOrHists(
Pixel* pixel,
const QVector<Pixel*>&
set,
double radius)
const;
375 void computeOrHist(
const Pixel* pixel,
376 const QVector<const Pixel*>&
set,
379 float& sparsity)
const;
Definition: SuperPixel.h:244
MserContainer()
Definition: SuperPixel.h:126
Configuration class for MserSuperPixel.
Definition: SuperPixel.h:93
Definition: BaseModule.h:63
SuperPixel generator using MSER regions. An erosion pyramid improves the MSER regions specifically if...
Definition: SuperPixel.h:144
#define DllCoreExport
Definition: BaseImageElement.h:43
PixelSet stores and manipulates pixel collections.
Definition: PixelSet.h:172
Container for MSER elements. This class maps OpenCVs MSER regions with their bounding boxes...
Definition: SuperPixel.h:123
Configuration class for LineSuperPixel.
Definition: SuperPixel.h:175
std::vector< cv::Rect > boxes
Definition: SuperPixel.h:134
Grid based SuperPixel extraction.
Definition: SuperPixel.h:287
QVector< Line > mLines
Definition: SuperPixel.h:210
PixelSet mSet
Definition: SuperPixel.h:82
bool merge(const QSharedPointer< TextLineSet > &tl1, const QSharedPointer< TextLineSet > &tl2)
Definition: PixelSet.cpp:1728
config
Definition: DependencyCollector.py:271
Local orientation estimation (using Il Koo's method).
Definition: SuperPixel.h:350
bool operator==(const BaseElement &l, const QString &id)
Definition: BaseImageElement.cpp:57
Definition: BaseImageElement.h:53
Base class implementation for SuperPixel generating modules.
Definition: SuperPixel.h:68
Definition: BaseModule.h:107
level
Definition: DependencyCollector.py:25
std::vector< std::vector< cv::Point > > pixels
Definition: SuperPixel.h:133
Configuration file for local orientation extraction.
Definition: SuperPixel.h:318
DllCoreExport bool save(const QImage &img, const QString &savePath, int compression=-1)
Saves the specified QImage img.
Definition: Image.cpp:180
This class represents a single instance of super pixels which are needed for the layout analysis...
Definition: Pixel.h:188
DllCoreExport QImage load(const QString &path, bool *ok=0)
Definition: Image.cpp:152
SuperPixel generator based on the LSD line detector.
Definition: SuperPixel.h:195
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
Configuration class for GridSuperPixel.
Definition: SuperPixel.h:219
cv::Mat mSrcImg
Definition: SuperPixel.h:81