ReadFramework
Shapes.h
Go to the documentation of this file.
1 /*******************************************************************************************************
2  ReadFramework is the basis for modules developed at CVL/TU Wien for the EU project READ.
3 
4  Copyright (C) 2016 Markus Diem <diem@caa.tuwien.ac.at>
5  Copyright (C) 2016 Stefan Fiel <fiel@caa.tuwien.ac.at>
6  Copyright (C) 2016 Florian Kleber <kleber@caa.tuwien.ac.at>
7 
8  This file is part of ReadFramework.
9 
10  ReadFramework is free software: you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  ReadFramework is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with this program. If not, see <http://www.gnu.org/licenses/>.
22 
23  The READ project has received funding from the European Union’s Horizon 2020
24  research and innovation programme under grant agreement No 674943
25 
26  related links:
27  [1] http://www.caa.tuwien.ac.at/cvl/
28  [2] https://transkribus.eu/Transkribus/
29  [3] https://github.com/TUWien/
30  [4] http://nomacs.org
31  *******************************************************************************************************/
32 
33 #pragma once
34 
35 #pragma warning(push, 0) // no warnings from includes
36 #include <QPolygon>
37 #include <QLine>
38 #include <QVector>
39 #include <QSharedPointer>
40 
41 #include <opencv2/core.hpp>
42 #pragma warning(pop)
43 
44 #ifndef DllCoreExport
45 #ifdef DLL_CORE_EXPORT
46 #define DllCoreExport Q_DECL_EXPORT
47 #else
48 #define DllCoreExport Q_DECL_IMPORT
49 #endif
50 #endif
51 
52 #pragma warning(disable: 4251) // dll interface warning
53 
54 // Qt defines
55 class QPainter;
56 
57 namespace rdf {
58 
59 // read defines
60 class Vector2D;
61 class Rect;
62 class Polygon;
63 class Line;
64 
69 
70 public:
71  Line(const QLineF& line = QLineF(), float thickness = 1);
72  Line(const Polygon& poly);
73  Line(const cv::Point p1, const cv::Point p2, float thickness = 1); // hsould be cv::Point2d
74  Line(const Vector2D& p1, const Vector2D& p2, float thickness = 1);
75  Line(double p1x, double p1y, double p2x, double p2y, float thickness = 1);
76 
77  bool isEmpty() const;
78  void sortEndpoints(bool horizontal = true);
79  void setLine(const QLineF& line, float thickness = 1);
80  void setThickness(float thickness);
81  float thickness() const;
82  double squaredLength() const;
83  double length() const;
84  double weightedLength(const Vector2D& orVec) const;
85  double angle() const;
86  double minDistance(const Line &l) const;
87 
88  void translate(cv::Point offset);
89  void scale(double s);
90 
91  double distance(const Vector2D& p) const;
92  double horizontalOverlap(const Line& l) const;
93  double horizontalDistance(const Line& l, double threshold = 20) const;
94  double verticalOverlap(const Line& l) const;
95  double verticalDistance(const Line& l, double threshold = 20) const;
96 
97  Line merge(const Line& l) const;
98  Line mergeFit(const Line& l) const;
99  Line gapLine(const Line& l) const;
100  double diffAngle(const Line& l) const;
101  bool within(const Vector2D& p) const;
102  Line moved(const Vector2D& mVec) const;
103 
104  // getter
105  Vector2D p1() const;
106  Vector2D p2() const;
107  Vector2D center() const;
108  QLineF qLine() const;
109  QPolygonF toPoly() const;
110 
111  bool isHorizontal(double mAngleTresh = 0.5) const;
112  bool isVertical(double mAngleTresh = 0.5) const;
113  bool isColinear(const Line& line, double threshold = 20) const;
114  bool isClose(const Line& line, double threshold = 20) const;
115  bool intersects(const Line& line, QLineF::IntersectType t = QLineF::BoundedIntersection) const;
116 
117  Vector2D intersection(const Line& line, QLineF::IntersectType t = QLineF::BoundedIntersection) const;
118  Vector2D intersectionUnrestricted(const Line& line) const;
119  Vector2D vector() const;
120 
121  void draw(QPainter& p) const;
122  Line extendBorder(const Rect& box) const;
123 
124  static bool lessX1(const Line& l1, const Line& l2);
125  static bool lessY1(const Line& l1, const Line& l2);
126 
127 protected:
128  QLineF mLine;
129  float mThickness = 1;
130 
131  cv::Mat toMat(const Line& l) const;
132 
133 };
134 
136 
137 public:
138  Vector2D();
139  Vector2D(double x, double y);
140  Vector2D(const QPoint& p);
141  Vector2D(const QPointF& p);
142  Vector2D(const QSize& s);
143  Vector2D(const QSizeF& s);
144  Vector2D(const cv::Point& v);
145  Vector2D(const cv::Size& s);
146 
147  DllCoreExport friend QDataStream& operator<<(QDataStream& s, const Vector2D& v);
148  DllCoreExport friend QDebug operator<< (QDebug d, const Vector2D &v);
149 
150  // binary operators
151  DllCoreExport friend bool operator==(const Vector2D & l, const Vector2D & r) {
152  return l.mX == r.mX && l.mY == r.mY;
153  }
154 
155  DllCoreExport friend bool operator!=(const Vector2D & l, const Vector2D & r) {
156  return !(l == r);
157  }
158 
159  DllCoreExport friend Vector2D operator+(const Vector2D & l, const Vector2D & r) {
160  return Vector2D(l.x() + r.x(), l.y() + r.y());
161  }
162 
163  DllCoreExport friend Vector2D operator-(const Vector2D & l, const Vector2D & r) {
164  return Vector2D(l.x() - r.x(), l.y() - r.y());
165  }
166 
173  DllCoreExport friend double operator*(const Vector2D & l, const Vector2D & r) {
174  return l.mX * r.mX + l.mY * r.mY;
175  }
176 
177  DllCoreExport friend Vector2D operator*(const Vector2D & l, double s) {
178  return Vector2D(l.mX * s, l.mY * s);
179  }
180 
181  DllCoreExport friend Vector2D operator*(double s, const Vector2D & l) {
182  return Vector2D(l.mX * s, l.mY * s);
183  }
184 
185  DllCoreExport friend Vector2D operator/(const Vector2D & l, double s) {
186  return Vector2D(l.mX / s, l.mY / s);
187  }
188 
189  // class member access operators
190  void operator+=(const Vector2D& vec) {
191  mX += vec.mX;
192  mY += vec.mY;
193  mIsNull = false;
194  }
195 
196  void operator-=(const Vector2D& vec) {
197  mX -= vec.mX;
198  mY -= vec.mY;
199  mIsNull = false;
200  }
201 
202  // scalar operators
203  void operator*=(const double& scalar) {
204  mX *= scalar;
205  mY *= scalar;
206  mIsNull = false;
207  };
208 
209  void operator/=(const double& scalar) {
210  mX /= scalar;
211  mY /= scalar;
212  mIsNull = false;
213  };
214 
215  void operator+=(const double& scalar) {
216  mX += scalar;
217  mY += scalar;
218  mIsNull = false;
219  };
220 
221  void operator-=(const double& scalar) {
222  mX -= scalar;
223  mY -= scalar;
224  mIsNull = false;
225  };
226 
227  // static functions
228  static Vector2D max(const Vector2D& v1, const Vector2D& v2);
229  static Vector2D min(const Vector2D& v1, const Vector2D& v2);
230  static Vector2D max();
231  static Vector2D min();
232 
233  bool isNull() const;
234 
235  void setX(double x);
236  inline double x() const {
237  return mX;
238  };
239 
240  void setY(double y);
241  inline double y() const {
242  return mY;
243  };
244 
245  Vector2D normalVec() const;
246 
247  QPoint toQPoint() const;
248  QPointF toQPointF() const;
249  QSize toQSize() const;
250  QSizeF toQSizeF() const;
251 
252  cv::Point toCvPoint() const;
253  cv::Point2d toCvPoint2d() const;
254  cv::Point2f toCvPoint2f() const;
255  cv::Size toCvSize() const;
256  cv::Mat toMatRow() const;
257  cv::Mat toMatCol() const;
258 
259  QString toString() const;
260 
261  void draw(QPainter& p) const;
262 
263  double angle() const;
264  double sqLength() const;
265  double length() const;
266  void rotate(double angle);
267  double theta(const Vector2D& o) const;
268 
269  bool isNeighbor(const Vector2D& other, double radius) const;
270 
271 protected:
272  bool mIsNull = true;
273 
274  double mX = 0;
275  double mY = 0;
276 };
277 
279 public:
280  LineSegment();
281  LineSegment(Line l, Vector2D c, double th, Vector2D lo, double pr, double pt, double len);
282 
283  Line line() const;
284  void setLine(double x1, double y1, double x2, double y2, double width);
285  void setLine(Line l);
286  Vector2D center() const;
287  void setCenter(double x, double y);
288  double theta() const;
289  void setTheta(double t);
290  Vector2D lineOrientation() const;
291  void setOrientation(double dx, double dy);
292  double prec() const;
293  void setPrec(double p);
294  double p() const;
295  void setP(double p);
296  double length() const;
297  void setLength(double l);
298  Vector2D rectIterIni();
299  Vector2D rectIterInc();
300  bool rectIterEnd();
301  Vector2D getIterPt();
302  bool doubleEqual(double a, double b);
303  double interLow(double x, double x1, double y1, double x2, double y2);
304  double interHigh(double x, double x1, double y1, double x2, double y2);
305 
306 protected:
307  Line mLine; /* first and second point of the line segment and the width (thickness) */
308  Vector2D mCenter; /* center of the rectangle */
309  double mTheta = 0; /* angle */
310  Vector2D mLineOrient; /* (dx,dy) is vector oriented as the line segment */
311  double mPrec = 0; /* tolerance angle */
312  double mP = 0; /* probability of a point with angle within 'prec' */
313  double mLength = 0;
314 
315  double vx[4], vy[4]; /* used for iterator */
316  double mX, mY, mYs, mYe;
317 };
318 
320 
321 public:
322  Triangle();
323  Triangle(const cv::Vec6f& vec);
324 
325  bool isNull() const;
326 
327  void setVec(const cv::Vec6f& vec);
328 
329  Vector2D p0() const;
330  Vector2D p1() const;
331  Vector2D p2() const;
332 
333  Vector2D pointAt(int idx = 0) const;
334 
335  void draw(QPainter& p) const;
336 
337 protected:
338 
339  bool mIsNull = true;
340 
341  QVector<Vector2D> mPts;
342 };
343 
345 
346 public:
347  Rect();
348  Rect(const QRect& rect);
349  Rect(const QRectF& rect);
350  Rect(const cv::Rect& rect);
351  Rect(const Vector2D& topLeft, const Vector2D& size);
352  Rect(double x, double y, double width, double height);
353  Rect(const cv::Mat& img);
354 
355  DllCoreExport friend bool operator==(const Rect& l, const Rect& r);
356  DllCoreExport friend bool operator!=(const Rect& l, const Rect& r);
357 
358  bool isNull() const;
359 
360  // return types
361  double width() const;
362  double height() const;
363  Vector2D size() const;
364  Vector2D diagonal() const;
365 
366  double top() const;
367  double bottom() const;
368  double left() const;
369  double right() const;
370 
371  Vector2D topLeft() const;
372  Vector2D topRight() const;
373  Vector2D bottomLeft() const;
374  Vector2D bottomRight() const;
375  Vector2D center() const;
376 
377  // setter
378  void move(const Vector2D& vec);
379  void scale(double factor);
380  void expand(double v);
381  void setTopLeft(const Vector2D& topLeft);
382  void setSize(const Vector2D& newSize);
383 
384  // conversions
385  QRect toQRect() const;
386  QRectF toQRectF() const;
387  cv::Rect toCvRect() const;
388 
389  // geometry
390  bool contains(const Rect& o) const;
391  bool contains(const Vector2D& pt) const;
392  bool isProximate(const Rect& o, double eps = 10.0) const;
393  double area() const;
394  Rect clipped(const Vector2D& size) const;
395  Rect joined(const Rect& o) const;
396  Rect intersected(const Rect& o) const;
397  bool intersects(const Rect& o) const;
398 
399  void draw(QPainter& p) const;
400 
401  static Rect fromPoints(const QVector<Vector2D>& pts);
402 
403  virtual QString toString() const;
404 
405 protected:
406  bool mIsNull = true;
407 
410 };
411 
413 
414 public:
415  Ellipse();
416  Ellipse(const Vector2D& center, const Vector2D& axis = Vector2D(), double angle = 0.0);
417  Ellipse(const cv::RotatedRect& rect);
418 
419  DllCoreExport friend QDebug operator<< (QDebug d, const Ellipse &e);
420 
421  static Ellipse fromData(const std::vector<cv::Point>& pts);
422  static Ellipse fromData(const QVector<Vector2D>& pts);
423  static Ellipse fromData(const cv::Mat& pts, const Vector2D& center);
424 
425  bool isNull() const;
426  bool isValid() const;
427 
428  QString toString() const;
429 
430  void setCenter(const Vector2D& center);
431  inline Vector2D center() const {
432  return mCenter;
433  };
434 
435  void setAxis(const Vector2D& axis);
436  Vector2D axis() const;
437 
438  void scale(double factor);
439 
440  double majorAxis() const;
441  double minorAxis() const;
442  double radius() const;
443  double area() const;
444  Rect bbox(bool squared = false) const;
445 
446  cv::Mat toCov() const;
447 
448  void setAngle(double angle);
449  double angle() const;
450 
451  void move(const Vector2D& vec);
452 
453  void draw(QPainter& p, double alpha = 0.0) const;
454  void pdf(cv::Mat& img, const Rect& box = Rect()) const;
455  cv::Mat toBinaryMask(const Rect& box = Rect()) const;
456 
457  Vector2D getPoint(double angle) const;
458 
459 protected:
460 
461  bool mIsNull = true;
462 
465  double mAngle = 0.0;
466 };
467 
469 
470 public:
471  BaseLine(const QPolygonF& baseLine = QPolygonF());
472  BaseLine(const Polygon& baseLine);
473  BaseLine(const Line& line);
474 
475  bool isEmpty() const;
476 
477  void setPolygon(const QPolygonF& baseLine);
478  QPolygonF polygon() const;
479  QPolygon toPolygon() const;
480 
481  void translate(const QPointF& offset);
482 
483  void read(const QString& pointList);
484  QString write() const;
485 
486  QPointF startPoint() const;
487  QPointF endPoint() const;
488 
489 protected:
490  QPolygonF mBaseLine;
491 };
492 
494 
495 public:
496  Polygon(const QPolygonF& polygon = QPolygonF());
497 
498  void operator<<(const QPointF& pt) {
499  mPoly << pt;
500  }
501  void operator<<(const Vector2D& pt) {
502  mPoly << pt.toQPointF();
503  }
504 
505  bool isEmpty() const;
506 
507  void read(const QString& pointList);
508  QString write() const;
509 
510  void translate(const QPointF& offset);
511 
512  int size() const;
513  QPolygonF polygon() const;
514  QPolygonF closedPolygon() const;
515  QVector<Vector2D> toPoints() const;
516 
517  static Polygon fromCvPoints(const std::vector<cv::Point2d>& pts);
518  static Polygon fromCvPoints(const std::vector<cv::Point2f>& pts);
519  static Polygon fromCvPoints(const std::vector<cv::Point>& pts);
520  static Polygon fromRect(const Rect& rect);
521  void setPolygon(const QPolygonF& polygon);
522 
523  void scale(double factor);
524  void draw(QPainter& p) const;
525  bool contains(const Vector2D& pt) const;
526 
527 protected:
528  QPolygonF mPoly;
529 
530 };
531 
533 
534 public:
535  LineCandidates();
536  LineCandidates(Line referenceLine);
537 
538  void setReferenceLine(Line referenceLine);
539  Line referenceLine() const;
540 
541  bool isEmpty() const;
542 
543  void addCandidate(int lIdx, double o, double d);
544  void addCandidate(Line c, int lIdx);
545  void addLineCandidate(LineCandidates lc);
546 
547  //QVector<QSharedPointer<LineCandidates>> findColinearCandidates(QVector<rdf::Line> &lines, double distThreshold = 20);
548 
549  rdf::Line mergedLine();
550  rdf::Line mergeLines(const QVector<rdf::Line> &l);
551  QVector<int> sortByOverlap();
552  QVector<int> sortByDistance();
553 
554  void clear();
555 
556  //int bestLineMatch(/*QSharedPointer<QVector<rdf::Line>> lines*/);
557 
558  //QVector<Line> candidates() const;
559  QVector<int> candidatesIdx() const;
560  QVector<double> overlaps() const;
561  QVector<double> distances() const;
562 
563 
564 protected:
565 
567  //QVector<Line> mLCandidates;
568  QVector<int> mLCandidatesIdx;
569  QVector<double> mOverlaps;
570  QVector<double> mDistances;
571 
572 };
573 
575 
576 public:
577  TableCellRaw();
578 
579  void setId(const QString& id);
580  QString id() const;
581 
582  void setCustom(const QString& c);
583  QString custom() const;
584 
585  void setRow(int r);
586  int row() const;
587  void setCol(int c);
588  int col() const;
589 
590  void setRowSpan(int r);
591  int rowSpan() const;
592  void setColSpan(int c);
593  int colSpan() const;
594 
595  void setLeftBorderVisible(bool b);
596  bool leftBorderVisible() const;
597 
598  void setRightBorderVisible(bool b);
599  bool rightBorderVisible() const;
600 
601  void setTopBorderVisible(bool b);
602  bool topBorderVisible() const;
603 
604  void setBottomBorderVisible(bool b);
605  bool bottomBorderVisible() const;
606 
607  void setLeftIdx(int i);
608  QVector<int> leftIdx() const;
609 
610  void setRightIdx(int i);
611  QVector<int> rightIdx() const;
612 
613  void setTopIdx(int i);
614  QVector<int> topIdx() const;
615 
616  void setBottomIdx(int i);
617  QVector<int> bottomIdx() const;
618 
619  void setHeader(bool b);
620  bool header() const;
621 
622  void clearCandidates();
623 
624  void setLineCandidatesLeftLine(LineCandidates l);
625  LineCandidates leftLineC() const;
626  void setRefLineLeft(Line l);
627  void addLineCandidateLeft(Line c, int lIdx);
628  void addLineCandidateLeft(LineCandidates l);
629  void clearLineCandidatesLeft();
630 
631  void setLineCandidatesRightLine(LineCandidates l);
632  LineCandidates rightLineC() const;
633  void setRefLineRight(Line l);
634  void addLineCandidateRight(Line c, int lIdx);
635  void addLineCandidateRight(LineCandidates l);
636  void clearLineCandidatesRight();
637 
638  void setLineCandidatesTopLine(LineCandidates l);
639  LineCandidates topLineC() const;
640  void setRefLineTop(Line l);
641  void addLineCandidateTop(Line c, int lIdx);
642  void addLineCandidateTop(LineCandidates l);
643  void clearLineCandidatesTop();
644 
645  void setLineCandidatesBottomLine(LineCandidates l);
646  LineCandidates bottomLineC() const;
647  void setRefLineBottom(Line l);
648  void addLineCandidateBottom(Line c, int lIdx);
649  void addLineCandidateBottom(LineCandidates l);
650  void clearLineCandidatesBottom();
651 
652  void setPolygon(const Polygon& polygon);
653  Polygon polygon() const;
654 
655  void setNewPolygon(const Polygon& polygon);
656  Polygon newPolygon() const;
657 
658  void setCornerPts(QVector<int> cPts);
659  QVector<int> cornerPty() const;
660 
661  double width() const;
662  double height() const;
663 
664  rdf::Line topBorder() const;
665  rdf::Line bottomBorder() const;
666  rdf::Line leftBorder() const;
667  rdf::Line rightBorder() const;
668 
669  rdf::Vector2D upperLeft() const;
670 
671  //sorts Cells according row and cell
672  bool operator< (const TableCellRaw& cell) const;
673  static bool compareCells(const QSharedPointer<rdf::TableCellRaw> l1, const QSharedPointer<rdf::TableCellRaw> l2);
674 
675 protected:
676 
677  int mCellIdx = -1;
678 
679  int mRow = -1;
680  int mCol = -1;
681 
682  int mRowSpan = -1;
683  int mColSpan = -1;
684 
685  QString mId;
686  QString mCostum;
687 
688  bool mLeftBorderVisible = false;
689  QVector<int> mLeftIdx;
690  bool mRightBorderVisible = false;
691  QVector<int> mRightIdx;
692  bool mTopBorderVisible = false;
693  QVector<int> mTopIdx;
694  bool mBottomBorderVisible = false;
695  QVector<int> mBottomIdx;
696 
697  bool mHeader = false;
698 
699  // topleft: 0, bottomleft: 1, bottomright: 2, topright: 3
700  //reference CornerPts of the reference Cell
703  QVector<int> mRefCornerPts;
704 
709 };
710 
711 }
QVector< double > mDistances
Definition: Shapes.h:570
Vector2D mCenter
Definition: Shapes.h:463
void operator+=(const Vector2D &vec)
Definition: Shapes.h:190
double x() const
Definition: Shapes.h:236
Vector2D mCenter
Definition: Shapes.h:308
Polygon mNewPoly
Definition: Shapes.h:702
QVector< int > mRefCornerPts
Definition: Shapes.h:703
Definition: Shapes.h:412
Vector2D mLineOrient
Definition: Shapes.h:310
void operator*=(const double &scalar)
Definition: Shapes.h:203
LineCandidates mLeftLine
Definition: Shapes.h:705
Vector2D center() const
Definition: Shapes.h:431
DllCoreExport friend bool operator==(const Vector2D &l, const Vector2D &r)
Definition: Shapes.h:151
void operator+=(const double &scalar)
Definition: Shapes.h:215
Line mReferenceLine
Definition: Shapes.h:566
QVector< double > mOverlaps
Definition: Shapes.h:569
void operator-=(const Vector2D &vec)
Definition: Shapes.h:196
QDataStream & operator<<(QDataStream &s, const BaseElement &e)
Definition: BaseImageElement.cpp:81
QVector< int > mLeftIdx
Definition: Shapes.h:689
double mX
Definition: Shapes.h:274
QLineF mLine
Definition: Shapes.h:128
DllCoreExport friend Vector2D operator*(const Vector2D &l, double s)
Definition: Shapes.h:177
double mY
Definition: Shapes.h:275
QPolygonF mBaseLine
Definition: Shapes.h:490
QVector< int > mRightIdx
Definition: Shapes.h:691
QVector< int > mTopIdx
Definition: Shapes.h:693
Definition: Shapes.h:319
Definition: Shapes.h:532
QVector< int > mBottomIdx
Definition: Shapes.h:695
Definition: Shapes.h:574
LineCandidates mBottomLine
Definition: Shapes.h:708
DllCoreExport friend Vector2D operator-(const Vector2D &l, const Vector2D &r)
Definition: Shapes.h:163
bool merge(const QSharedPointer< TextLineSet > &tl1, const QSharedPointer< TextLineSet > &tl2)
Definition: PixelSet.cpp:1728
Vector2D mTopLeft
Definition: Shapes.h:408
QString mId
Definition: Shapes.h:685
Definition: Shapes.h:135
bool operator<(const PixelEdge &pe1, const PixelEdge &pe2)
Definition: Pixel.cpp:537
QPolygonF mPoly
Definition: Shapes.h:528
Definition: Shapes.h:278
Definition: Shapes.h:468
QVector< Vector2D > mPts
Definition: Shapes.h:341
bool operator==(const BaseElement &l, const QString &id)
Definition: BaseImageElement.cpp:57
void operator<<(const QPointF &pt)
Definition: Shapes.h:498
DllCoreExport friend Vector2D operator+(const Vector2D &l, const Vector2D &r)
Definition: Shapes.h:159
QPointF toQPointF() const
Definition: Shapes.cpp:967
DllCoreExport friend Vector2D operator/(const Vector2D &l, double s)
Definition: Shapes.h:185
void operator<<(const Vector2D &pt)
Definition: Shapes.h:501
LineCandidates mRightLine
Definition: Shapes.h:706
void operator/=(const double &scalar)
Definition: Shapes.h:209
Line mLine
Definition: Shapes.h:307
A basic line class including stroke width (thickness).
Definition: Shapes.h:68
Definition: Shapes.h:493
double mYs
Definition: Shapes.h:316
#define DllCoreExport
Definition: Shapes.h:48
Vector2D mSize
Definition: Shapes.h:409
void operator-=(const double &scalar)
Definition: Shapes.h:221
QVector< int > mLCandidatesIdx
Definition: Shapes.h:568
Vector2D mAxis
Definition: Shapes.h:464
Definition: Algorithms.cpp:45
DllCoreExport friend double operator*(const Vector2D &l, const Vector2D &r)
Computes the scalar product between l and r.
Definition: Shapes.h:173
double y() const
Definition: Shapes.h:241
DllCoreExport friend bool operator!=(const Vector2D &l, const Vector2D &r)
Definition: Shapes.h:155
DllCoreExport friend Vector2D operator*(double s, const Vector2D &l)
Definition: Shapes.h:181
QString mCostum
Definition: Shapes.h:686
Definition: Shapes.h:344
bool operator!=(const BaseElement &l, const BaseElement &r)
Returns true if l and r do not have the same id.
Definition: BaseImageElement.cpp:77
LineCandidates mTopLine
Definition: Shapes.h:707
Polygon mRefPoly
Definition: Shapes.h:701