Classes | |
class | QVComponentTree |
Image component tree data structure. More... | |
class | QVDisjointSet |
Implementation of a disjoint set data type, based on the union-find algorithm. More... | |
class | QVMSER |
Maximally stable extremal region datatype. More... | |
class | QVPolyline |
Polyline representation. More... | |
Functions | |
void | FilterComponentTreeSmallRegions (QVImage< uChar > &image, QVComponentTree &componentTree, uInt area) |
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< 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. | |
QList< QVPolyline > | getLineContoursThreshold4Connectivity (const QVImage< uChar > &image, const uChar threshold=128) |
Obtains a list of the 4-connected contour lines 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. | |
QVector< QVector < QPoint > > | CountingSort (const QVImage< uChar, 1 > &img) |
Computer Vision Data types and Algorithms. | |
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. | |
void | HarrisCornerResponseImage (const QVImage< uChar > &image, QVImage< sFloat > &result) |
void | SobelCornerResponseImage (const QVImage< uChar > &image, QVImage< sFloat > &result) |
int | myFloodFill (QVImage< uChar > &image, uInt x, uInt y, uInt value, uInt minVal, uInt maxVal) |
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. | |
void | draw (QVImage< uChar > &image, const QVPolyline &polyline, const uChar constant, bool linked=FALSE, bool safe=FALSE) |
void | draw (QVImage< uChar, 3 > &image, const QVPolyline &polyline, const uChar constant[3], bool linked=FALSE, bool safe=FALSE) |
void | draw (QVImage< uChar > &img, const QList< QVPolyline > &polylineList, const uChar constant, bool linked=FALSE, bool safe=FALSE) |
void | draw (QVImage< uChar, 3 > &img, const QList< QVPolyline > &polylineList, const uChar constant[3], bool linked=FALSE, bool safe=FALSE) |
void | drawPoints (const QList< QPoint > &hotPoints, QVImage< uChar > &dest) |
void | drawPoints (const QList< QPoint > &hotPoints, QVImage< uChar, 3 > &dest) |
void | IterativePointElimination (const QVPolyline &polyline, QVPolyline &result, const double minArea) |
Simplifies a contour eliminating points of little area using IPE algorithm. |
See Structure for a detailed explanation of the structure of this package.
QVector< QVector< QPoint > > CountingSort | ( | const QVImage< uChar, 1 > & | img | ) |
Computer Vision Data types and Algorithms.
See Structure for a detailed explanation of the structure of this package. 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).
img | source image to obtain sorted lists of QPoints. |
Definition at line 28 of file qvdta.cpp.
References QVImage< Type, Channels >::getCols(), QVImage< Type, Channels >::getRows(), HistogramRange(), QVIMAGE_INIT_READ, and QVIMAGE_PIXEL.
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.
src | source image. | |
dest | binary image that will contain maximal values. | |
colMaskSize | width of the vicinity. | |
rowMaskSize | height of the vicinity. |
Definition at line 93 of file qvdta.cpp.
References QVImage< Type, Channels >::getCols(), QVImage< Type, Channels >::getRows(), QVIMAGE_INIT_READ, QVIMAGE_INIT_WRITE, QVIMAGE_PIXEL, and Set().
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 137 of file qvcontour.cpp.
QVPolyline getConnectedSetBorderContourThreshold | ( | const QVImage< uChar > & | image, | |
const QPoint | startPoint, | |||
const uChar | threshold | |||
) |
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 automata, 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 117 of file qvcontour.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:
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 235 of file qvcontour.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 358 of file qvcontour.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 44 of file qvmser.cpp.
References QVComponentTree::area(), QVComponentTree::firstThreshold(), QVComponentTree::getNumNodes(), QVComponentTree::lastThreshold(), PROPORTIONAL_DISTANCE, QVComponentTree::seedX(), and QVComponentTree::seedY().
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.
References QVImage< Type, Channels >::getCols(), getConnectedSetBorderContourThreshold(), and QVImage< Type, Channels >::getRows().
void IterativePointElimination | ( | const QVPolyline & | polyline, | |
QVPolyline & | result, | |||
const double | minArea | |||
) |
Simplifies a contour eliminating points of little area using IPE algorithm.
This function eliminate points of a QVPolyline, simplificating it. Points are eliminated if the area of the triangle formed with their two inmediate neighbours is smaller than a given minimum value.
polyline | polyline to simplify. | |
result | will store resulting simplified polyline. | |
minArea | minimal area for the triangle formed with the neighbours of a point to eliminate it. |
Definition at line 43 of file qvpolyline.cpp.
References QVPolyline::closed, QVPolyline::direction, and TRIANGLE_AREA.