|
ReadFramework
|
This class represents a single instance of super pixels which are needed for the layout analysis. More...
#include <Pixel.h>
Public Types | |
| enum | mDrawFlags { draw_none = 0x00, draw_ellipse = 0x01, draw_stats = 0x02, draw_center = 0x04, draw_id = 0x08, draw_label_colors = 0x10, draw_tab_stops = 0x20, draw_all = 0x3f } |
| typedef Flags< mDrawFlags > | DrawFlags |
Public Member Functions | |
| Pixel () | |
| Pixel (const Ellipse &ellipse, const Rect &bbox=Rect(), const QString &id=QString()) | |
| bool | isNull () const |
| Vector2D | center () const |
| Rect | bbox () const |
| Vector2D | size () const |
| double | angle () const |
| Ellipse | ellipse () const |
| void | scale (double factor) override |
| void | move (const Vector2D &vec) |
| void | addStats (const QSharedPointer< PixelStats > &stats) |
| QSharedPointer< PixelStats > | stats (int idx=-1) const |
| void | setTabStop (const PixelTabStop &tabStop) |
| PixelTabStop | tabStop () const |
| Returns tab stop statistics or NULL if tab stops are not computed. PixelTabStop stores if the Pixel is a tab stop (left/right) candidate or not. More... | |
| void | setLabel (const QSharedPointer< PixelLabel > &label) |
| QSharedPointer< PixelLabel > | label () const |
| void | setPyramidLevel (int level) |
| int | pyramidLevel () const |
| cv::KeyPoint | toKeyPoint () const |
| void | setValue (double value) |
| double | value () const |
| cv::Mat | toBinaryMask (const Rect &r) const |
| void | draw (QPainter &p, double alpha=0.3, const DrawFlags &df=DrawFlags()|draw_ellipse|draw_label_colors) const |
Public Member Functions inherited from rdf::BaseElement | |
| BaseElement (const QString &id=QString()) | |
| This class keeps an ID to keep track of transformed elements during a processing chain. You can e.g. generate Pixel elements from MserBlobs. After filtering, processing etc. you can map back to the (pixel accurate) MserBlob using this ID. More... | |
| void | setId (const QString &id) |
| Sets the (preferably unique) ID. If no ID is set, a unqiue ID is generated and assigned. More... | |
| QString | id () const |
| Returns the elment's id. More... | |
| virtual QString | toString () const |
Protected Attributes | |
| bool | mIsNull = true |
| Ellipse | mEllipse |
| Rect | mBBox |
| QVector< QSharedPointer< PixelStats > > | mStats |
| PixelTabStop | mTabStop |
| QSharedPointer< PixelLabel > | mLabel = QSharedPointer<PixelLabel>::create() |
| double | mValue = 0.0 |
| int | mPyramidLevel = 0 |
Protected Attributes inherited from rdf::BaseElement | |
| QString | mId |
This class represents a single instance of super pixels which are needed for the layout analysis.
| typedef Flags<mDrawFlags> rdf::Pixel::DrawFlags |
| rdf::Pixel::Pixel | ( | ) |
| rdf::Pixel::Pixel | ( | const Ellipse & | ellipse, |
| const Rect & | bbox = Rect(), |
||
| const QString & | id = QString() |
||
| ) |
| void rdf::Pixel::addStats | ( | const QSharedPointer< PixelStats > & | stats | ) |
| double rdf::Pixel::angle | ( | ) | const |
|
inline |
|
inline |
| void rdf::Pixel::draw | ( | QPainter & | p, |
| double | alpha = 0.3, |
||
| const DrawFlags & | df = DrawFlags() | draw_ellipse | draw_label_colors |
||
| ) | const |
| Ellipse rdf::Pixel::ellipse | ( | ) | const |
| bool rdf::Pixel::isNull | ( | ) | const |
| QSharedPointer< PixelLabel > rdf::Pixel::label | ( | ) | const |
| void rdf::Pixel::move | ( | const Vector2D & | vec | ) |
| int rdf::Pixel::pyramidLevel | ( | ) | const |
|
overridevirtual |
Reimplemented from rdf::BaseElement.
| void rdf::Pixel::setLabel | ( | const QSharedPointer< PixelLabel > & | label | ) |
| void rdf::Pixel::setPyramidLevel | ( | int | level | ) |
| void rdf::Pixel::setTabStop | ( | const PixelTabStop & | tabStop | ) |
| void rdf::Pixel::setValue | ( | double | value | ) |
| Vector2D rdf::Pixel::size | ( | ) | const |
| QSharedPointer< PixelStats > rdf::Pixel::stats | ( | int | idx = -1 | ) | const |
| PixelTabStop rdf::Pixel::tabStop | ( | ) | const |
Returns tab stop statistics or NULL if tab stops are not computed. PixelTabStop stores if the Pixel is a tab stop (left/right) candidate or not.
| cv::Mat rdf::Pixel::toBinaryMask | ( | const Rect & | r | ) | const |
| cv::KeyPoint rdf::Pixel::toKeyPoint | ( | ) | const |
| double rdf::Pixel::value | ( | ) | const |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |