00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00024
00025 #ifndef QVPOLYLINE_H
00026 #define QVPOLYLINE_H
00027
00028 #include <QPointF>
00029
00030 #include <qvipp.h>
00031 #include <QVImage>
00032
00033 class QVPolylineF;
00034
00052 class QVPolyline: public QList<QPoint>
00053 {
00054 public:
00055 bool closed, direction;
00056
00057 QVPolyline();
00058 QVPolyline(const QVPolyline &polyline);
00059 QVPolyline(const QVPolylineF &polyline);
00060
00061 static QVPolyline ellipse(uInt n, float x, float y, float maxRadio, float minRadio, float ang);
00062 static QVPolyline line(int x1, int y1, int x2, int y2);
00063 static QVPolyline rectangle(int x1, int y1, int x2, int y2);
00064
00065 operator QVPolylineF() const;
00066 };
00067
00103 double IterativePointElimination(const QVPolyline &polyline, QVPolyline &result,
00104 const double param, bool maxNumberOfPointsMethod=FALSE,
00105 bool intersectLines=TRUE, double *max_removed_cost=NULL);
00106
00136 QVPolyline getConnectedSetBorderContourThreshold(const QVImage<uChar> &image, const QPoint point, const uChar threshold = 128);
00137
00157 QList<QVPolyline> getConnectedSetBorderContoursThreshold(const QVImage <uChar> &image, const uChar threshold = 128);
00158
00179 QList<QVPolyline> getLineContoursThreshold4Connectivity(const QVImage<uChar> &image, const uChar threshold = 128);
00180
00201 QList<QVPolyline> getLineContoursThreshold8Connectivity(const QVImage<uChar> &image, const uChar threshold = 128);
00202
00203 Q_DECLARE_METATYPE(QList<QVPolyline>)
00204
00205 #endif
00206