![]() |
University of Murcia, Spain ![]() |
Image featuresFunctions for image feature detection and matching |
Classes | |
class | QVComponentTree |
Image component tree data structure. 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... | |
Functions | |
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. | |
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). | |
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< 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>). | |
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. | |
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. | |
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). |
This group contains functionallity to See Wikipedia's description for image features for a description.
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:
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.
image | image from were to obtain the poly-lines. | |
threshold | threshold to consider pixels inside or outside the connected sets. |
Definition at line 543 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.
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. |
Definition at line 523 of file qvpolyline.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:
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.
image | image from were to obtain the poly-lines. | |
threshold | threshold to test if a pixel is considered a border or not. |
Definition at line 654 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:
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.
image | image from were to obtain the poly-lines. | |
threshold | threshold to test if a pixel is considered a border or not. |
Definition at line 777 of file qvpolyline.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:
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 |
Definition at line 45 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.
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. |
Definition at line 27 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 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.
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. |
Definition at line 74 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.
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. |
Definition at line 77 of file qvpolyline.cpp.