Image features
[Image processing]

Functions for image feature detection and matching. More...

Classes

class  QVComponentTree
 Image component tree data structure. More...
class  QVPolyline
 Polyline representation. More...
class  QVPolylineF
 Floating point polyline representation. More...

Functions

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.
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.
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.
QList< QVPolylinegetLineContoursThreshold4Connectivity (const QVImage< uChar > &image, const uChar threshold=128)
 Obtains a list of the 4-connected contour lines 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.
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.

Detailed Description

Functions for image feature detection and matching.

See Wikipedia's description for image features for a description.

Todo:
Documentar.

Function Documentation

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 getContourThreshold, 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 542 of file qvpolyline.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 522 of file qvpolyline.cpp.

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 653 of file qvpolyline.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 776 of file qvpolyline.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 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.

Definition at line 76 of file qvpolylinef.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 QVPolyline, 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.

Definition at line 76 of file qvpolyline.cpp.


Generated on Thu Jul 17 17:23:29 2008 for QVision by  doxygen 1.5.3