00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00024
00025 #ifndef QVIP_H
00026 #define QVIP_H
00027
00028 #include <iostream>
00029
00030 #include <qvdefines.h>
00031 #include <qvimageio.h>
00032 #include <QVImage>
00033 #include <QVPolyline>
00034
00035 #include <QVImage>
00036 #include <QFile>
00037
00038
00039 #ifndef DOXYGEN_IGNORE_THIS
00040 double ShiTomasiScore(const uChar *imagePtr, const int imageStep, const int x, const int y, const int nHalfBoxSize);
00041 #endif // DOXYGEN_IGNORE_THIS
00042
00048 void FilterHarrisCornerResponseImage(const QVImage<uChar> &image, QVImage<sFloat> &result, int aperture=3, int avgwindow=5, const QPoint &destROIOffset = QPoint(0,0));
00049
00055 void FilterDoG(const QVImage<uChar> &image, QVImage<uChar> &result);
00056
00062 void SobelCornerResponseImage(const QVImage<sFloat> &image, QVImage<sFloat> &result);
00063
00069 void FilterHessianCornerResponseImage( const QVImage<sFloat> &image, QVImage<sFloat> &result,
00070 const QPoint &destROIOffset = QPoint(0,0));
00071
00072 #ifndef DOXYGEN_IGNORE_THIS
00073 void FilterNormalize(const QVImage<uChar,1> &image, QVImage<uChar,1> &equalized, const QPoint &destROIOffset = QPoint(0,0));
00074 void FilterNormalize(const QVImage<sFloat,1> &image, QVImage<sFloat,1> &equalized, const QPoint &destROIOffset = QPoint(0,0));
00075 #endif
00076
00083 class QVComponentTree;
00084 void FilterPruneComponentTreeSmallRegions(QVImage<uChar> &image, QVComponentTree &componentTree, uInt area);
00085
00086 #ifdef GSL_AVAILABLE
00087 #include <qvmath/qvvector.h>
00088 #include <QPoint>
00095 void FilterSeparable(const QVImage<sFloat, 1> &image, QVImage<sFloat, 1> &dest,
00096 const QVVector &rowFilter, const QVVector &colFilter, const QPoint &destROIOffset = QPoint(0,0));
00097 #endif
00098
00105 QMap<sFloat, QPointF> fastMaximalPoints(const QVImage<sFloat> &image, const double threshold = 1.0, const int windowSize = 2);
00106
00121 QMap<uChar, QPointF> fastMaximalPoints(const QVImage<uChar> &image, const double threshold, const int windowRadius = 2);
00122
00124
00130 QMap<sFloat, QPointF> maximalPoints(const QVImage<sFloat> &image, const double threshold = 1.0, const int windowRadius = 2);
00131
00149 void FilterLocalMax(const QVImage<sFloat> &src, QVImage<uChar> &dest, uInt colMaskSize, uInt rowMaskSize, sFloat threshold = 0);
00150
00159 QVector< QVector< QPoint > > CountingSort(const QVImage<uChar, 1> &img);
00160
00199 double IterativePointElimination(const QVPolyline &polyline, QVPolyline &result,
00200 const double param, bool maxNumberOfPointsMethod=FALSE,
00201 bool intersectLines=TRUE, double *max_removed_cost=NULL);
00202
00212 double IterativePointElimination(const QVPolylineF &polyline, QVPolylineF &result,
00213 const double param, bool maxNumberOfPointsMethod=FALSE,
00214 bool intersectLines=TRUE, double *max_removed_cost=NULL);
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236 #ifndef DOXYGEN_IGNORE_THIS
00237 QVPolyline getConnectedSetBorderContourThreshold(const QVImage<uChar> &image, const QPoint point, const uChar threshold = 128);
00238 QVPolyline getConnectedSetBorderContourThreshold(const QVImage<uShort> &image, const QPoint point, const uShort threshold = 128);
00239 #endif
00240
00258 QList<QVPolyline> getConnectedSetBorderContoursThreshold(const QVImage <uChar> &image, const uChar threshold = 128);
00259 QList<QVPolyline> getConnectedSetBorderContoursThreshold(const QVImage <uShort> &image, const uShort threshold = 128);
00260
00280 QList<QVPolyline> getLineContoursThreshold4Connectivity(const QVImage<uChar> &image, const uChar threshold = 128);
00281
00301 QList<QVPolyline> getLineContoursThreshold8Connectivity(const QVImage<uChar> &image, const uChar threshold = 128);
00302
00303
00308 enum FASTDetectionAlgorithm {
00309 Fast9 = 9,
00310 Fast10 = 10,
00311 Fast11 = 11,
00312 Fast12 = 12
00313 };
00314
00326 QList<QPointF> FASTFeatures(const QVImage<uChar, 1> & image, const int threshold, const FASTDetectionAlgorithm &fastAlgorithm = Fast9);
00327
00328
00329
00342 QVImage<uChar, 1> FastLaplaceFilter(const QVImage<uChar, 1> image);
00343
00355 QVImage<uChar, 1> FastSmoothFilter(const QVImage<uChar, 1> image, const uChar threshold = 0);
00356
00368 QVImage<uChar, 1> SmoothFilter(const QVImage<uChar, 1> image, const uChar threshold = 0);
00369
00381 QList<QPointF> FastLaplacePoints(const QVImage<uChar, 1> &image, const int threshold = 40, const bool applyPreviousSmooth = true, const bool smoothResponseImage = true);
00382
00383 #ifndef DOXYGEN_IGNORE_THIS
00384 QList<QPointF> getLocalExtremaPixels(const QVImage<uChar, 1> hiPass, const int HiPassThreshold);
00385 double ShiTomasiScore(const uChar *imagePtr, const int imageStep, const int x, const int y, const int nHalfBoxSize);
00386 QMap<double, QPointF> pointsByShiTomasiValue(const QVImage<uChar, 1> & image, const QList<QPointF> &points, const int shiTomasiRadius);
00387 QList<QPointF> hiPassPointDetector(const QVImage<uChar, 1> &image, const int threshold);
00388 QList<QPointF> DoGPointDetector(const QVImage<uChar, 1> &image, const int threshold);
00389
00390 void FilterGauss8Adjacency(const QVImage<uChar, 1> responseImg, QVImage<uChar, 1> &result);
00391
00392 #endif // DOXYGEN_IGNORE_THIS
00393
00394 #endif
00395