PARP Research Group University of Murcia, Spain


Image processing

Functions for Image Processing. More...


Modules

 IPP wrapper functions
 Comprehensive set of wrapper functions for Intel(R) Integrated Performance Primitives (IPP).

Classes

class  QVComponentTree
 Image component tree data structure. More...
class  QVGenericImage
 Base class for QVImage objects. More...
class  QVImage< Type, Channels >
 Image representation class for the QVision. More...
class  QVMSER
 Maximally stable extremal region datatype. More...
class  QVPolyline
 Polyline representation.

A polyline is a continuous line composed of one or more straight line segments. A QVPolyline is a implementation of a polyline, specified by a list of the points located at the intersection of the segments. Thus, any QVPolyline object inherits from the class QList<QPoint>. More...

class  QVPolylineF
 Floating point polyline representation.

A polyline is a continuous line composed of one or more straight line segments. A QVPolylineF is a implementation of a polyline, specified by a list of the points located at the intersection of the segments. Thus, any QVPolylineF object inherits from the class QList<QPointF>. More...


Defines

#define QVIMAGE_INIT_READ(TYPE, IMAGE)
 Initializes image to be read with macro QVIMAGE_PIXEL.
#define QVIMAGE_INIT_WRITE(TYPE, IMAGE)
 Initializes image to be written or read with macro QVIMAGE_PIXEL.
#define QVIMAGE_PTR_INIT_READ(TYPE, IMAGE)
 Initializes pointed image to be read with macro QVIMAGE_PIXEL.
#define QVIMAGE_PTR_INIT_WRITE(TYPE, IMAGE)
 Initializes pointed image to be writen or read with macro QVIMAGE_PIXEL.
#define QVIMAGE_PIXEL(IMAGE, Col, Row, Channel)   (__qv_data_##IMAGE##__ [(Row)* __qv_step_##IMAGE##__ + __qv_planes_##IMAGE##__ *(Col)+(Channel)])
 Access an image pixel for inspection or modification.
#define QVIMAGE_PIXEL_PTR(IMAGE, Col, Row, Channel)   (& (__qv_data_##IMAGE##__ [(Row)* __qv_step_##IMAGE##__ + __qv_planes_##IMAGE##__ *(Col)+(Channel)]))
 Obtains a reference to the memory location of a pixel.
#define QVIMAGE_ROW_INCREMENT_PTR(IMAGE)   ( __qv_step_##IMAGE##__ )
 Obtains the increment for a row movement of a pixel.
#define QVIMAGE_COL_INCREMENT_PTR(IMAGE)   ( __qv_planes_##IMAGE##__ )
 Obtains the increment for a column movement of a pixel.
#define QVIMAGE_NEXT_LINE_INCREMENT_PTR(IMAGE)   ( __qv_next_line_inc_##IMAGE##__ )
 Obtains the location of the first pixel in a row, given the location of the last pixel in the upper row.

Functions

void FilterHarrisCornerResponseImage (const QVImage< uChar > &image, QVImage< sFloat > &result, int aperture=3, int avgwindow=5, const QPoint &destROIOffset=QPoint(0, 0))
void FilterDoG (const QVImage< uChar > &image, QVImage< uChar > &result)
void SobelCornerResponseImage (const QVImage< sFloat > &image, QVImage< sFloat > &result)
void FilterHessianCornerResponseImage (const QVImage< sFloat > &image, QVImage< sFloat > &result, const QPoint &destROIOffset=QPoint(0, 0))
void FilterNormalize (const QVImage< uChar, 1 > &image, QVImage< uChar, 1 > &equalized, const QPoint &destROIOffset=QPoint(0, 0))
void FilterNormalize (const QVImage< sFloat, 1 > &image, QVImage< sFloat, 1 > &equalized, const QPoint &destROIOffset=QPoint(0, 0))
void FilterLocalMax (const QVImage< sFloat > &src, QVImage< uChar > &dest, uInt colMaskSize, uInt rowMaskSize, sFloat threshold=0)
 Generates a binary image of local grey-scale maximal value pixels.

This function receives a QVImage, and generates a binary image where each pixel is set to IPP_MAX_8U if the pixel in the original image is strict maximal in value regarding to pixels in a vicinity window of colMaskSize width, and rowMaskSize height.

QMap< sFloat, QPointF > maximalPoints (const QVImage< sFloat > &image, const double threshold=1.0, const int windowRadius=2)
QMap< sFloat, QPointF > fastMaximalPoints (const QVImage< sFloat > &image, const double threshold=1.0, const int windowSize=2)
QVector< QVector< QPoint > > CountingSort (const QVImage< uChar, 1 > &img)
 Sorts pixels in an image, given their gray-scale value.

This function obtains a QVector, that maps any gray-scale values (0..255) to the set of QPoints that hold that gray-scale value, in a given image. It can be used for very fast pixel sorting.

double IterativePointElimination (const QVPolyline &polyline, QVPolyline &result, const double param, bool maxNumberOfPointsMethod=FALSE, bool intersectLines=TRUE, double *max_removed_cost=NULL)
 Simplifies a contour eliminating points of little area using IPE algorithm

This function eliminates points of a QVPolylineF, simplificating it. Points are recursively eliminated while a) their distance to the line joining its two immediate neighbours is smaller than a given maximum value, or b) the number of points of the approximated polyline falls below a given number (depending on the chosen method).

double IterativePointElimination (const QVPolylineF &polyline, QVPolylineF &result, const double param, bool maxNumberOfPointsMethod=FALSE, bool intersectLines=TRUE, double *max_removed_cost=NULL)
 Simplifies a contour eliminating points of little area using IPE algorithm

This is an overloaded version of the IterativePointElimination, provided for convenience.

QVPolyline getConnectedSetBorderContourThreshold (const QVImage< uChar > &image, const QPoint point, const uChar threshold=128)
 Obtains the border contour of a connected set of pixels in an image, given a membership condition.

A contour is a sequence of pixels from an image, were every two contiguous pixels in the sequence are neighbours in the image.

QList< QVPolylinegetConnectedSetBorderContoursThreshold (const QVImage< uChar > &image, const uChar threshold=128)
 Obtains a list of the border contours of the connected sets in an image, according to a membership condition.

This function gets the border contours for all of the connected sets of pixels in an image, using the function getConnectedSetBorderContourThreshold(const QVImage<uChar> &, const QPoint, const uChar), and returns them in a list of polylines (QList<QVPolyline>).

QList< QVPolylinegetLineContoursThreshold4Connectivity (const QVImage< uChar > &image, const uChar threshold=128)
 Obtains a list of the 4-connected contour lines in the image

A contour is a sequence of pixels from an image, were every two contiguous pixels in the sequence are neighbours in the image.

QList< QVPolylinegetLineContoursThreshold8Connectivity (const QVImage< uChar > &image, const uChar threshold=128)
 Obtains a list of the 8-connected contour lines in the image

A contour is a sequence of pixels from an image, were every two contiguous pixels in the sequence are neighbours in the image.

void getMSERContours (const QVImage< uChar, 1 > &image, const QList< QVMSER > &MSERList, QList< QVPolyline > &polylineMSERList)
 Obtains border contours for an MSER list, obtained with the function getMSER.
void getMSER (const QVImage< uChar, 1 > &image, QList< QVMSER > &MSERList, const int delta, const int minArea, const int maxArea, const double diffAreaThreshold)
 This algorithm obtains MSER's - from an image.

This is an implementation of the MSER algorithm (see [Matas]. It does clustering of the MSER found in each node, keeping just the one with lowest q value. Also, small or large MSER are cleaned up using minimal and maximal areas permitted.

bool QVImage::operator== (const QVImage< Type, Channels > &img) const
 Equality compare operator.

Detailed Description

Functions for Image Processing.

This package contains image processing tools and Computer Vision algorithms and data types for the QVision. It includes image filtering functionality and image feature detectors.

QVision makes use of Intel's IPP library, and offers many of its functionality to QVision users by means of wrapper functions. These functions are contained in the package IPP wrapper functions, which you can check to learn more about it.


Define Documentation

#define QVIMAGE_COL_INCREMENT_PTR ( IMAGE   )     ( __qv_planes_##IMAGE##__ )

Obtains the increment for a column movement of a pixel.

Todo:
Las macros de acceso a pixel secuenciales no funcionan. Revisar.
This macro can be used to navigate through the contents of an image given an initial pointer to its contents. See section Image pixel access for detailed usage of this macro.

See also:
QVIMAGE_PIXEL_PTR

Definition at line 164 of file qvimage.h.

#define QVIMAGE_INIT_READ ( TYPE,
IMAGE   ) 

Value:

const TYPE * __qv_data_##IMAGE##__ = IMAGE.getReadData();               \
        const uInt __qv_step_##IMAGE##__ = IMAGE.getStep()/sizeof(TYPE);        \
        const uChar __qv_planes_##IMAGE##__  = IMAGE.getChannels();             \
        const uInt __qv_next_line_inc_##IMAGE##__ = __qv_step_##IMAGE##__ - IMAGE.getCols(); \
        Q_UNUSED (__qv_next_line_inc_##IMAGE##__) ;
Initializes image to be read with macro QVIMAGE_PIXEL.

This macro initializes an image to inspect or modify its contents using a set of pixel access macros. See section Image pixel access for detailed usage of this macro.

Parameters:
TYPE Type of the image. It should be the value of first template parameter specified for the image.
IMAGE Image name.
See also:
QVIMAGE_PIXEL

QVIMAGE_PIXEL_PTR

Definition at line 49 of file qvimage.h.

Referenced by CountingSort(), FilterLocalMax(), getConnectedSetBorderContoursThreshold(), getConnectedSetBorderContourThreshold(), getLineContoursThreshold4Connectivity(), getLineContoursThreshold8Connectivity(), maximalPoints(), QVImage< Type, Channels >::operator==(), and QVComponentTree::QVComponentTree().

#define QVIMAGE_INIT_WRITE ( TYPE,
IMAGE   ) 

Value:

TYPE * __qv_data_##IMAGE##__ = IMAGE.getWriteData();                    \
        const uInt __qv_step_##IMAGE##__ = IMAGE.getStep()/sizeof(TYPE);        \
        const uChar __qv_planes_##IMAGE##__  = IMAGE.getChannels();             \
        const uInt __qv_next_line_inc_##IMAGE##__ = __qv_step_##IMAGE##__ - IMAGE.getCols(); \
        Q_UNUSED (__qv_next_line_inc_##IMAGE##__) ;
Initializes image to be written or read with macro QVIMAGE_PIXEL.

This macro initializes an image to inspect or modify its contents using a set of pixel access macros. See section Image pixel access for detailed usage of this macro.

Parameters:
TYPE Type of the image. It should be the value of first template parameter specified for the image.
IMAGE Image name.
See also:
QVIMAGE_PIXEL

QVIMAGE_PIXEL_PTR

Definition at line 68 of file qvimage.h.

Referenced by FilterLocalMax(), getConnectedSetBorderContoursThreshold(), and QVComponentTree::QVComponentTree().

#define QVIMAGE_NEXT_LINE_INCREMENT_PTR ( IMAGE   )     ( __qv_next_line_inc_##IMAGE##__ )

Obtains the location of the first pixel in a row, given the location of the last pixel in the upper row.

This macro can be used to navigate through the contents of an image given an initial pointer to its contents. See section Image pixel access for detailed usage of this macro.

See also:
QVIMAGE_PIXEL_PTR

Definition at line 175 of file qvimage.h.

#define QVIMAGE_PIXEL ( IMAGE,
Col,
Row,
Channel   )     (__qv_data_##IMAGE##__ [(Row)* __qv_step_##IMAGE##__ + __qv_planes_##IMAGE##__ *(Col)+(Channel)])

Access an image pixel for inspection or modification.

This macro can be used to access arbitrary pixels in an image, with a good time performance. See section Image pixel access for detailed usage of this macro.

See also:
QVIMAGE_INIT_READ

QVIMAGE_INIT_WRITE

QVIMAGE_PTR_INIT_READ

QVIMAGE_PTR_INIT_WRITE

Definition at line 125 of file qvimage.h.

Referenced by CountingSort(), FilterLocalMax(), getConnectedSetBorderContoursThreshold(), getConnectedSetBorderContourThreshold(), getLineContoursThreshold4Connectivity(), getLineContoursThreshold8Connectivity(), maximalPoints(), QVImage< Type, Channels >::operator==(), and QVComponentTree::QVComponentTree().

#define QVIMAGE_PIXEL_PTR ( IMAGE,
Col,
Row,
Channel   )     (& (__qv_data_##IMAGE##__ [(Row)* __qv_step_##IMAGE##__ + __qv_planes_##IMAGE##__ *(Col)+(Channel)]))

Obtains a reference to the memory location of a pixel.

This macro can be used to obtain the location of arbitrary pixels in an image, with a good time performance. See section Image pixel access for detailed usage of this macro.

See also:
QVIMAGE_INIT_READ

QVIMAGE_INIT_WRITE

QVIMAGE_PTR_INIT_READ

QVIMAGE_PTR_INIT_WRITE

Definition at line 140 of file qvimage.h.

#define QVIMAGE_PTR_INIT_READ ( TYPE,
IMAGE   ) 

Value:

const TYPE * __qv_data_##IMAGE##__ = IMAGE->getReadData();              \
        const uInt __qv_step_##IMAGE##__ = IMAGE->getStep()/sizeof(TYPE);       \
        const uChar __qv_planes_##IMAGE##__  = IMAGE->getChannels();            \
        const uInt __qv_next_line_inc_##IMAGE##__ = __qv_step_##IMAGE##__ - IMAGE->getCols(); \
        Q_UNUSED (__qv_next_line_inc_##IMAGE##__) ;
Initializes pointed image to be read with macro QVIMAGE_PIXEL.

This macro initializes a pointed image to inspect its contents using a set of pixel access macros. See section Image pixel access for detailed usage of this macro.

Parameters:
TYPE Type of the image. It should be the value of first template parameter specified for the image.
IMAGE Name of the pointer variable that points to the image.
See also:
QVIMAGE_PIXEL

QVIMAGE_PIXEL_PTR

Definition at line 87 of file qvimage.h.

Referenced by QVImage< Type, Channels >::operator==().

#define QVIMAGE_PTR_INIT_WRITE ( TYPE,
IMAGE   ) 

Value:

TYPE * __qv_data_##IMAGE##__ = IMAGE->getWriteData();                                                           \
        const uInt __qv_step_##IMAGE##__ = IMAGE->getStep()/sizeof(TYPE);                                               \
        const uChar __qv_planes_##IMAGE##__  = IMAGE->getChannels();                                                    \
        const uInt __qv_next_line_inc_##IMAGE##__ = __qv_step_##IMAGE##__ - __qv_planes_##IMAGE##__ * IMAGE->getCols(); \
        Q_UNUSED (__qv_next_line_inc_##IMAGE##__) ;
Initializes pointed image to be writen or read with macro QVIMAGE_PIXEL.

This macro initializes a pointed image to inspect or modify its contents using a set of pixel access macros. See section Image pixel access for detailed usage of this macro.

Parameters:
TYPE Type of the image. It should be the value of first template parameter specified for the image.
IMAGE Name of the pointer variable that points to the image.
See also:
QVIMAGE_PIXEL

QVIMAGE_PIXEL_PTR

Definition at line 106 of file qvimage.h.

#define QVIMAGE_ROW_INCREMENT_PTR ( IMAGE   )     ( __qv_step_##IMAGE##__ )

Obtains the increment for a row movement of a pixel.

This macro can be used to navigate through the contents of an image given an initial pointer to its contents. See section Image pixel access for detailed usage of this macro.

See also:
QVIMAGE_PIXEL_PTR

Definition at line 152 of file qvimage.h.


Function Documentation

QVector< QVector< QPoint > > CountingSort ( const QVImage< uChar, 1 > &  img  ) 

Sorts pixels in an image, given their gray-scale value.

This function obtains a QVector, that maps any gray-scale values (0..255) to the set of QPoints that hold that gray-scale value, in a given image. It can be used for very fast pixel sorting.

The function itself is based in Counting Sort algorithm , so the cost of this function is O(number_of_columns * number_of_rows).

Parameters:
img source image to obtain sorted lists of QPoints.
Returns:
A QVector, indexed by the gray-scale value (0-255), to a QVector of QPoints, containing the corresponding points to the pixels that hold that gray-scale value in the image.

Definition at line 282 of file qvip.cpp.

QMap<sFloat, QPointF> fastMaximalPoints ( const QVImage< sFloat > &  image,
const double  threshold = 1.0,
const int  windowSize = 2 
)

Todo:
document this

Definition at line 260 of file qvip.cpp.

void FilterDoG ( const QVImage< uChar > &  image,
QVImage< uChar > &  result 
)

Todo:
document this

Definition at line 71 of file qvip.cpp.

void FilterHarrisCornerResponseImage ( const QVImage< uChar > &  image,
QVImage< sFloat > &  result,
int  aperture = 3,
int  avgwindow = 5,
const QPoint &  destROIOffset = QPoint(0, 0) 
)

Todo:
document this

Definition at line 63 of file qvip.cpp.

void FilterHessianCornerResponseImage ( const QVImage< sFloat > &  image,
QVImage< sFloat > &  result,
const QPoint &  destROIOffset = QPoint(0, 0) 
)

Todo:
document this

Definition at line 91 of file qvip.cpp.

Referenced by QVHessianPointDetector::iterate(), and SobelCornerResponseImage().

void FilterLocalMax ( const QVImage< sFloat > &  src,
QVImage< uChar > &  dest,
uInt  colMaskSize,
uInt  rowMaskSize,
sFloat  threshold = 0 
)

Generates a binary image of local grey-scale maximal value pixels.

This function receives a QVImage, and generates a binary image where each pixel is set to IPP_MAX_8U if the pixel in the original image is strict maximal in value regarding to pixels in a vicinity window of colMaskSize width, and rowMaskSize height.

Todo:
  • Fix resulting image ROI, obtain maximums restricted to the ROI.
  • Use IPP functions to obtain the result.
Parameters:
src source image.
dest binary image that will contain maximal values.
colMaskSize width of the vicinity.
rowMaskSize height of the vicinity.

Definition at line 38 of file qvip.cpp.

void FilterNormalize ( const QVImage< sFloat, 1 > &  image,
QVImage< sFloat, 1 > &  equalized,
const QPoint &  destROIOffset = QPoint(0, 0) 
)

Todo:
document this

void FilterNormalize ( const QVImage< uChar, 1 > &  image,
QVImage< uChar, 1 > &  equalized,
const QPoint &  destROIOffset = QPoint(0, 0) 
)

Todo:
document this

QList<QVPolyline> getConnectedSetBorderContoursThreshold ( const QVImage< uChar > &  image,
const uChar  threshold = 128 
)

Obtains a list of the border contours of the connected sets in an image, according to a membership condition.

This function gets the border contours for all of the connected sets of pixels in an image, using the function getConnectedSetBorderContourThreshold(const QVImage<uChar> &, const QPoint, const uChar), and returns them in a list of polylines (QList<QVPolyline>).

Thus, it considers every point inside a connected set, if it has a gray-level equal or higher than a given value. An example of the contours obtained is depicted in the next image:

bordercontours.png

Circles indicate the first of the pixels in each border set, and following pixels are joined with a continuous line, until the last of the pixels in the set, depicted with an asterisk.

Parameters:
image image from were to obtain the poly-lines.
threshold threshold to consider pixels inside or outside the connected sets.
Returns:
a QList of QVPolyline's that follows the border sets of the connected sets in the image.
See also:
getConnectedSetBorderContourThreshold

Definition at line 922 of file qvip.cpp.

QVPolyline getConnectedSetBorderContourThreshold ( const QVImage< uChar > &  image,
const QPoint  point,
const uChar  threshold = 128 
)

Obtains the border contour of a connected set of pixels in an image, given a membership condition.

A contour is a sequence of pixels from an image, were every two contiguous pixels in the sequence are neighbours in the image.

This function obtains the contour that depicts the border set of a connected set of pixels in an image, given a membership condition.

For this border contour extractor function, the membership condition will be that pixels will be considered to be members of a connected if and only if their gray-scale value is equal or greater than a given threshold value.

The function implements an automaton, that will receive an image and a starting point in its arguments, and will look for the closest border pixel to that point.

That border pixel will have a gray-level value equal or higher than a threshold value, given also in the arguments of the function, and will transverse the border of the set, appending every point that it finds in it in a QVPolyline object, that will be the returning value of the function.

Border contours obtained with this function can be either inner borders (corresponding to the border of an empty space inside the connected set) or the outer border of the connected set. The programer can tell wether a given border is inner or outer by the boolean value QVPolyline::direction, which will store TRUE for an outer contour, and FALSE for an inner contour.

Parameters:
image image from were to obtain the poly-line.
point any point inside the connected set.
threshold threshold to consider pixels inside or outside the connected set.
Returns:
a QVPolyline that follows the border set of the connected set.
See also:
getConnectedSetBorderContoursThreshold

Definition at line 902 of file qvip.cpp.

Referenced by getMSERContours().

QList<QVPolyline> getLineContoursThreshold4Connectivity ( const QVImage< uChar > &  image,
const uChar  threshold = 128 
)

Obtains a list of the 4-connected contour lines in the image

A contour is a sequence of pixels from an image, were every two contiguous pixels in the sequence are neighbours in the image.

This function can be used to obtain the 4-connected sets depicted in a border response image, obtained with Canny operator, or other image border response algorithm. It will return the contours as a QVPolyline. Pixels with gray-level higher than threshold, will be considered as border pixels. An example of the contours obtained is depicted in the next image:

contours4connected.png

Circles indicate the first of the pixels in each set, and following pixels are joined with a continuous line, until the last of the pixels in the set, depicted with an asterisk. Ambiguous situations (such as pixels with more than two 4-connected neihgbour pixels) return unpredictable joining results.

Parameters:
image image from were to obtain the poly-lines.
threshold threshold to test if a pixel is considered a border or not.
Returns:
the list of contours (as QVPolyline) in the image.
See also:
Canny

Definition at line 1033 of file qvip.cpp.

QList<QVPolyline> getLineContoursThreshold8Connectivity ( const QVImage< uChar > &  image,
const uChar  threshold = 128 
)

Obtains a list of the 8-connected contour lines in the image

A contour is a sequence of pixels from an image, were every two contiguous pixels in the sequence are neighbours in the image.

This function can be used to obtain the 8-connected sets depicted in a border response image, obtained with Canny operator, or other image border response algorithm. It will return the contours as a QVPolyline. Pixels with gray-level higher than threshold, will be considered as border pixels. An example of the contours obtained is depicted in the next image:

contours8connected.png

Circles indicate the first of the pixels in each set, and following pixels are joined with a continuous line, until the last of the pixels in the set, depicted with an asterisk. Ambiguous situations (such as pixels with more than two 8-connected neihgbour pixels) return unpredictable joining results.

Parameters:
image image from were to obtain the poly-lines.
threshold threshold to test if a pixel is considered a border or not.
Returns:
the list of contours (as QVPolyline) in the image.
See also:
Canny

Definition at line 1156 of file qvip.cpp.

void getMSER ( const QVImage< uChar, 1 > &  image,
QList< QVMSER > &  MSERList,
const int  delta,
const int  minArea,
const int  maxArea,
const double  diffAreaThreshold 
)

This algorithm obtains MSER's - from an image.

This is an implementation of the MSER algorithm (see [Matas]. It does clustering of the MSER found in each node, keeping just the one with lowest q value. Also, small or large MSER are cleaned up using minimal and maximal areas permitted.

REFERENCES:

  • Robust Wide Baseline Stereo from Maximally Stable Extremal Regions. J. Matas et al.
  • An implementation of Multi-Dimensional Maximally Stable Extremal Regions. Andrea Vedaldi.
    Parameters:
    image image to obtain MSER's from.
    MSERList list that will contain obtained MSER's.
    delta Delta parameter from the [Matas] paper.
    minArea MSER of area lesser than this value are discarted.
    maxArea MSER of area greater than this value are discarted.
    diffAreaThreshold MSER found to have a relative difference of areas lesser to that value are clustered together, and
    See also:
    getMSERContours the algorithm just keeps the one with lesser q value, discarding the others.

Definition at line 48 of file qvmser.cpp.

void getMSERContours ( const QVImage< uChar, 1 > &  image,
const QList< QVMSER > &  MSERList,
QList< QVPolyline > &  polylineMSERList 
)

Obtains border contours for an MSER list, obtained with the function getMSER.

Parameters:
image image to obtain border contours of MSER. Should be the same used with the function getMSER, if that was the one used to obtain MSER list.
MSERList list of MSER. It generally will be obtain using the function getMSER.
polylineMSERList list of border contours, represented as QVPolyline objects.
See also:
getMSER

Definition at line 28 of file qvmser.cpp.

double IterativePointElimination ( const QVPolylineF polyline,
QVPolylineF result,
const double  param,
bool  maxNumberOfPointsMethod = FALSE,
bool  intersectLines = TRUE,
double *  max_removed_cost = NULL 
)

Simplifies a contour eliminating points of little area using IPE algorithm

This is an overloaded version of the IterativePointElimination, provided for convenience.

See also:
IterativePointElimination(const QVPolyline &, QVPolyline &, const double, bool, bool, double *);

Definition at line 592 of file qvip.cpp.

double IterativePointElimination ( const QVPolyline polyline,
QVPolyline result,
const double  param,
bool  maxNumberOfPointsMethod = FALSE,
bool  intersectLines = TRUE,
double *  max_removed_cost = NULL 
)

Simplifies a contour eliminating points of little area using IPE algorithm

This function eliminates points of a QVPolylineF, simplificating it. Points are recursively eliminated while a) their distance to the line joining its two immediate neighbours is smaller than a given maximum value, or b) the number of points of the approximated polyline falls below a given number (depending on the chosen method).

The return value (which indicates the cost of the first not deleted point) and the optional parameter max_removed_cost are useful to estimate a measure of how well the polyline approximation did. A good approximation will have (relative) low max_removed_cost/return_cost ratio, and (absolute) low max_removed_cost value.

Parameters:
polyline polyline to simplify.
result will store resulting simplified polyline.
param maximal distance for a point to eliminate it, if maxNumberOfPointsMethod is FALSE, or maximal number of points in the result polyline, if maxNumberOfPointsMethod is TRUE.
maxNumberOfPointsMethod if TRUE, the procedure ends when the number of points of the resulting polyline is lesser or equal to param. If FALSE, the procedure ends when there are no more points with distance to line given by its neighbours smaller than param.
intersectLines If TRUE, a post-processing stage adjusts final points using all the deleted points among vertexs to fit straight lines, whose intersection by pairs gives the final points (recommended for greater precision, at a minimal additional cost).
max_removed_cost If not NULL, pointer to a float value that the procedure will fill with the maximum cost (distance to corresponding line) of all the removed points.
Returns:
The function returns the cost value of the first NOT deleted point of the polylyne.
See also:
IterativePointElimination(const QVPolylineF &, QVPolyline &, const double, bool, bool, double *);

Definition at line 376 of file qvip.cpp.

QMap<sFloat, QPointF> maximalPoints ( const QVImage< sFloat > &  image,
const double  threshold = 1.0,
const int  windowRadius = 2 
)

Todo:
document this

Definition at line 229 of file qvip.cpp.

Referenced by QVHessianPointDetector::iterate().

template<typename Type, int C>
bool QVImage< Type, C >::operator== ( const QVImage< Type, C > &  img  )  const [inline, inherited]

Equality compare operator.

Comparison operator for QVImage objects.

This operator will compare two images of same bit depth and channel number, and will return true if images are equal in all of these:

  • dimensions (cols and rows).
  • region of interest.
  • content of region of interest. returning false otherwise.

Parameters:
img image to compare with this image.

Definition at line 860 of file qvimage.h.

void SobelCornerResponseImage ( const QVImage< sFloat > &  image,
QVImage< sFloat > &  result 
)

Deprecated:
see FilterHessianCornerResponseImage
Todo:
document this

Definition at line 85 of file qvip.cpp.




QVision framework. PARP research group, copyright 2007, 2008.