Image processingFunctions for Image Processing.
More...
|
Modules |
| MPlayer based image and video input/output |
| Classes and functions that use the MPlayer as a back-end application to perform video and image i/o
If available, the QVision can use the versatile and widely known MPlayer multimedia player as a back-end application. The programmer can cleanly use functionallity to read from lots of video and image file formats and encodings, digital/analogical TV, video-cam and webcams, remote streams, etc... You can read the documentation of classes QVMPlayerReader for further specifically info about reading video from a QVision application using MPlayer.
|
| 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 |
bool | writeYUV4MPEG2Header (QFile &file, const int cols, const int rows, const int fps) |
| Create a yuv4mpeg2 video file.
|
bool | writeYUV4MPEG2Frame (QFile &file, const QVImage< uChar, 1 > imageY, const QVImage< uChar, 1 > imageU, const QVImage< uChar, 1 > imageV) |
| Write YUV image frames to a yuv4mpeg2 video file.
|
bool | writeYUV4MPEG2Frame (QFile &file, const QVImage< uChar, 1 > imageGray) |
| Write YUV image frames to a yuv4mpeg2 video file.
|
bool | writeYUV4MPEG2Frame (QFile &file, const QVImage< uChar, 3 > imageRGB) |
| Write RGB image frames to a yuv4mpeg2 video file.
|
bool | writeQVImageToFile (const QString fileName, const QVImage< uChar, 3 > &image) |
| Write the content of a QVImage (RGB) object in an image file.
|
bool | readQVImageFromFile (const QString fileName, QVImage< uChar, 3 > &image) |
| Reads the content of a QVImage (RGB) object from an image file.
|
bool | readYUV4MPEG2Frame (QFile &file, QVImage< uChar > &imageY, QVImage< uChar > &imageU, QVImage< uChar > &imageV) |
| Read YUV image frames from a yuv4mpeg2 video file.
|
bool | readYUV4MPEG2Header (QFile &file, int &cols, int &rows, int &fps) |
| Read yuv4mpeg2 header from a video file.
|
void | FilterHarrisCornerResponseImage (const QVImage< uChar > &image, QVImage< sFloat > &result, int aperture=3, int avgwindow=5, const QPoint &destROIOffset=QPoint(0, 0)) |
| Obtains the Harris corner response image.
|
void | FilterDoG (const QVImage< uChar > &image, QVImage< uChar > &result) |
| Obtains the DoG corner response image.
|
void | SobelCornerResponseImage (const QVImage< sFloat > &image, QVImage< sFloat > &result) |
| Obtains the Sobel corner response image.
|
void | FilterHessianCornerResponseImage (const QVImage< sFloat > &image, QVImage< sFloat > &result, const QPoint &destROIOffset=QPoint(0, 0)) |
| Obtains the Hessian corner response image.
|
void | FilterSeparable (const QVImage< sFloat, 1 > &image, QVImage< sFloat, 1 > &dest, const QVVector &rowFilter, const QVVector &colFilter, const QPoint &destROIOffset=QPoint(0, 0)) |
| Applies a separable filter.
|
QMap< sFloat, QPointF > | fastMaximalPoints (const QVImage< sFloat > &image, const double threshold=1.0, const int windowSize=2) |
| Finds luminance peaks in the input image.
|
QMap< sFloat, QPointF > | fastMaximalPoints (const QVImage< uChar > &image, const double threshold, const int windowRadius) |
| Finds luminance peaks in the input image This is an overloaded version provided for convenience. Processing 8 bit depth images is faster than doing it on 64 floating images.
|
QMap< sFloat, QPointF > | maximalPoints (const QVImage< sFloat > &image, const double threshold=1.0, const int windowRadius=2) |
| Finds luminance peaks in the input image.
|
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.
|
QVector< QVector< QPoint > > | CountingSort (const QVImage< uChar, 1 > &img) |
| Sorts pixels in an image, given their gray-scale value.
This function uses the Counting Sort algorithm to get an arrangement of the pixels of an input 8-bit image, regarding their gray-scale value. This arrangement is useful when you need to process the pixels of that image, which contain a certain gray-scale value.
|
double | IterativePointElimination (const QVPolyline &polyline, QVPolyline &result, const double param, bool maxNumberOfPointsMethod=FALSE, bool intersectLines=TRUE, double *max_removed_cost=NULL) |
| Eliminates points of a polyline of small shape contribution using the 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) |
| Eliminates points of a polyline of small shape contribution using the IPE algorithm
This is an overloaded version of the IterativePointElimination, provided for convenience. It simplifies floating point polylines.
|
QList< QVPolyline > | getConnectedSetBorderContoursThreshold (const QVImage< uChar > &image, const uChar threshold=128) |
| Obtains the borders of connected sets of pixels, containing gray-scale values equal or greater than a given threshold.
This function thresholds an input image. Then it obtains the borders of the connected sets of the pixels remaining. An example of these connected sets, and the borders this function obtains can be seen in the following picture:.
|
QList< QVPolyline > | getLineContoursThreshold4Connectivity (const QVImage< uChar > &image, const uChar threshold=128) |
| Obtains a list of the 4-connected pixel lines in the image
This function can be used to obtain the 4-connected lines appearing in a border response image. It returns the lines as a QVPolyline objects.
|
QList< QVPolyline > | getLineContoursThreshold8Connectivity (const QVImage< uChar > &image, const uChar threshold=128) |
| Obtains a list of the 8-connected pixel lines in the image
This function can be used to obtain the 8-connected lines appearing in a border response image. It returns the lines as a QVPolyline objects.
|
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.
The basic image i/o functionallity is based on Qt's functionality to load/store images from and to PNG or JPG files.
To create a new video file, and store image frames in it, or in the case the MPlayer is not available, the QVision offers functions to create/read video files coded in the YUV4MPEG2 format.
- Todo:
- Expand this documentation
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 170 of file qvimage.h.
#define QVIMAGE_INIT_READ |
( |
TYPE, |
|
|
IMAGE |
|
) |
|
#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 74 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 181 of file qvimage.h.
#define QVIMAGE_PIXEL |
( |
IMAGE, |
|
|
Col, |
|
|
Row, |
|
|
Channel |
|
) |
(__qv_data_##IMAGE##__ [(Row)* __qv_step_##IMAGE##__ + __qv_planes_##IMAGE##__ *(Col)+(Channel)]) |
#define QVIMAGE_PIXEL_PTR |
( |
IMAGE, |
|
|
Col, |
|
|
Row, |
|
|
Channel |
|
) |
(& (__qv_data_##IMAGE##__ [(Row)* __qv_step_##IMAGE##__ + __qv_planes_##IMAGE##__ *(Col)+(Channel)])) |
#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 93 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 112 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 158 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 uses the Counting Sort algorithm to get an arrangement of the pixels of an input 8-bit image, regarding their gray-scale value. This arrangement is useful when you need to process the pixels of that image, which contain a certain gray-scale value.
- Parameters:
-
| img | Image to obtain the pixel arrangement. |
- Returns:
- A vector of 256 lists of points. The element n of the vector is the list of the image pixels (points) that contain the gray-scale value n.
Definition at line 99 of file qvip.cpp.
QMap<sFloat, QPointF> fastMaximalPoints |
( |
const QVImage< uChar > & |
image, |
|
|
const double |
threshold, |
|
|
const int |
windowRadius | |
|
) |
| | |
Finds luminance peaks in the input image This is an overloaded version provided for convenience. Processing 8 bit depth images is faster than doing it on 64 floating images.
Pixels with a maximal luminance value inside a search window centered at them will be considered peaks. The search algorithm filters low response peaks with a threshold value to improve the performance time.
- Parameters:
-
| image | Image to detect luminance peaks. |
| threshold | Threshold used to filter out low luminance value peaks. |
| windowRadius | Radius for the search window. |
- See also:
- maximalPoints(const QVImage<sFloat> &, const double, const int)
fastMaximalPoints(const QVImage<sFloat> &, const double, const int)
Definition at line 195 of file qvip.cpp.
QMap<sFloat, QPointF> fastMaximalPoints |
( |
const QVImage< sFloat > & |
image, |
|
|
const double |
threshold = 1.0 , |
|
|
const int |
windowSize = 2 | |
|
) |
| | |
void FilterDoG |
( |
const QVImage< uChar > & |
image, |
|
|
QVImage< uChar > & |
result | |
|
) |
| | |
Obtains the DoG corner response image.
- Note:
- This function is based on the IPP library functionallity. Thus it requires that library, to be available.
- Todo:
- document this
Definition at line 124 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) | |
|
) |
| | |
Obtains the Harris corner response image.
- Note:
- This function is based on the IPP library functionallity. Thus it requires that library, to be available.
- Todo:
- document this
Definition at line 116 of file qvip.cpp.
void FilterHessianCornerResponseImage |
( |
const QVImage< sFloat > & |
image, |
|
|
QVImage< sFloat > & |
result, |
|
|
const QPoint & |
destROIOffset = QPoint(0, 0) | |
|
) |
| | |
Obtains the Hessian corner response image.
- Note:
- This function is based on the IPP library functionallity. Thus it requires that library, to be available.
- Todo:
- document this
Definition at line 144 of file qvip.cpp.
Referenced by 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 250 of file qvip.cpp.
void FilterSeparable |
( |
const QVImage< sFloat, 1 > & |
image, |
|
|
QVImage< sFloat, 1 > & |
dest, |
|
|
const QVVector & |
rowFilter, |
|
|
const QVVector & |
colFilter, |
|
|
const QPoint & |
destROIOffset = QPoint(0, 0) | |
|
) |
| | |
Applies a separable filter.
- Note:
- This function is based on the IPP library functionallity. Thus it requires that library, to be available.
- Todo:
- document this
Definition at line 164 of file qvip.cpp.
QList<QVPolyline> getConnectedSetBorderContoursThreshold |
( |
const QVImage< uChar > & |
image, |
|
|
const uChar |
threshold = 128 | |
|
) |
| | |
Obtains the borders of connected sets of pixels, containing gray-scale values equal or greater than a given threshold.
This function thresholds an input image. Then it obtains the borders of the connected sets of the pixels remaining. An example of these connected sets, and the borders this function obtains can be seen in the following picture:.
Circles indicate the first of the pixels in each border set. The last of the pixels in each detected border is indicated with an asterisk. The function detects inner and outer borders for each connected set. The image displays inner borders in blue color, and outer borders in red color.
The function returns a list of polylines, each one representing a different border.
- Parameters:
-
| image | Image to obtain from the borders. |
| threshold | Threshold separating the pixels inside and outside the connected sets. |
- Returns:
- A list, containing the polylines corresponding to the borders of the connected sets.
Definition at line 1137 of file qvip.cpp.
QList<QVPolyline> getLineContoursThreshold4Connectivity |
( |
const QVImage< uChar > & |
image, |
|
|
const uChar |
threshold = 128 | |
|
) |
| | |
Obtains a list of the 4-connected pixel lines in the image
This function can be used to obtain the 4-connected lines appearing in a border response image. It returns the lines as a QVPolyline objects.
A pixel will be considered as a line pixel if it contains a gray-scale value equal or larger than the given threshold.
Circles indicate the first of the pixels in each line. The last of the pixels in each detected line is indicated 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 line pixels or not. |
- Returns:
- the list of contours (as QVPolyline) in the image.
- See also:
- Canny
Definition at line 1316 of file qvip.cpp.
QList<QVPolyline> getLineContoursThreshold8Connectivity |
( |
const QVImage< uChar > & |
image, |
|
|
const uChar |
threshold = 128 | |
|
) |
| | |
Obtains a list of the 8-connected pixel lines in the image
This function can be used to obtain the 8-connected lines appearing in a border response image. It returns the lines as a QVPolyline objects.
A pixel will be considered as a line pixel if it contains a gray-scale value equal or larger than the given threshold.
Circles indicate the first of the pixels in each line. The last of the pixels in each detected line is indicated 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 1439 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 | |
|
) |
| | |
double IterativePointElimination |
( |
const QVPolyline & |
polyline, |
|
|
QVPolyline & |
result, |
|
|
const double |
param, |
|
|
bool |
maxNumberOfPointsMethod = FALSE , |
|
|
bool |
intersectLines = TRUE , |
|
|
double * |
max_removed_cost = NULL | |
|
) |
| | |
Eliminates points of a polyline of small shape contribution using the 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 493 of file qvip.cpp.
QMap<sFloat, QPointF> maximalPoints |
( |
const QVImage< sFloat > & |
image, |
|
|
const double |
threshold = 1.0 , |
|
|
const int |
windowRadius = 2 | |
|
) |
| | |
Finds luminance peaks in the input image.
- Todo:
- document this
Definition at line 384 of file qvip.cpp.
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 990 of file qvimage.h.
bool readQVImageFromFile |
( |
const QString |
fileName, |
|
|
QVImage< uChar, 3 > & |
image | |
|
) |
| | |
Reads the content of a QVImage (RGB) object from an image file.
- Parameters:
-
| fileName | The name of the image file to read from. File format is inferred from fileName suffix. Supported formats: BMP,JPG,PNG,PPM,TIFF,XBM,XPM,GIF,PBM,PGM. |
| image | The image to store in the file. |
- Returns:
- TRUE if success, FALSE otherwise.
Definition at line 98 of file qvimageio.cpp.
bool readYUV4MPEG2Frame |
( |
QFile & |
file, |
|
|
QVImage< uChar > & |
imageY, |
|
|
QVImage< uChar > & |
imageU, |
|
|
QVImage< uChar > & |
imageV | |
|
) |
| | |
Read YUV image frames from a yuv4mpeg2 video file.
This function retrieves a frame from a video file coded in YUV format. The parameters of this function must be three images to store the three chanels for the YUV image.
See section Reading from YUV4MPEG video files. for further info about the usage of this function.
- Parameters:
-
| file | The input file object. It must be already opened when received as argument by this function. |
| imageY | Image object to contain the Y channel for the YUV image, to store in the video file. |
| imageU | Image object to contain the U channel for the YUV image, to store in the video file. |
| imageV | Image object to contain the V channel for the YUV image, to store in the video file. |
- See also:
- readYUV4MPEG2Header
Definition at line 177 of file qvimageio.cpp.
Referenced by QVYUV4MPEG2ReaderBlock::grab().
bool readYUV4MPEG2Header |
( |
QFile & |
file, |
|
|
int & |
cols, |
|
|
int & |
rows, |
|
|
int & |
fps | |
|
) |
| | |
Read yuv4mpeg2 header from a video file.
This function reads the header of a video file encoded in yuv4mpeg2 format. This header contains information about the size of the frames in the video file, as well as the number of frames per second of the video sequence.
See section Reading from YUV4MPEG video files. for further info about the usage of this function.
- Parameters:
-
| file | The input file object. It must be already opened when received as argument by this function. |
| cols | (output parameter) Number of cols readed in the header |
| rows | (output parameter) Number of rows readed in the header |
| fps | (output parameter) Video fps readed in the header |
- See also:
- readYUV4MPEG2Frame
Definition at line 136 of file qvimageio.cpp.
Referenced by QVMPlayerReader::open(), and QVYUV4MPEG2ReaderBlock::open().
void SobelCornerResponseImage |
( |
const QVImage< sFloat > & |
image, |
|
|
QVImage< sFloat > & |
result | |
|
) |
| | |
Obtains the Sobel corner response image.
- Note:
- This function is based on the IPP library functionallity. Thus it requires that library, to be available.
- Todo:
- document this
Definition at line 138 of file qvip.cpp.
bool writeQVImageToFile |
( |
const QString |
fileName, |
|
|
const QVImage< uChar, 3 > & |
image | |
|
) |
| | |
Write the content of a QVImage (RGB) object in an image file.
- Parameters:
-
| fileName | The name of the image file to create. It is overwritten if already exists. File format is inferred from fileName suffix. Supported formats: BMP,JPG,PNG,PPM,TIFF,XBM,XPM. |
| image | The image to store in the file. |
- Returns:
- TRUE if success, FALSE otherwise.
Definition at line 95 of file qvimageio.cpp.
bool writeYUV4MPEG2Frame |
( |
QFile & |
file, |
|
|
const QVImage< uChar, 3 > |
imageRGB | |
|
) |
| | |
Write RGB image frames to a yuv4mpeg2 video file.
This is an overloaded version of the function writeYUV4MPEG2Frame(QFile &, const QVImage<uChar,3>) provided for convenience. This version stores a RGB frame in a YUV4MPEG2 video file. The parameter of this function is a single 3-channel image containing the RGB image. For further information about its usage, see documentation for function writeYUV4MPEG2Header.
See section Writting to YUV4MPEG video files. for further info about the usage of this function.
- Note:
- This function is based on functionallity from the Intel IPP library. Thus compatibility with that library must be enabled to be available.
- Parameters:
-
| file | The input file object. It must be already opened when received as argument by this function. |
| imageRGB | RGB image object, to store in the video file. |
- See also:
- writeYUV4MPEG2Header
Definition at line 82 of file qvimageio.cpp.
bool writeYUV4MPEG2Frame |
( |
QFile & |
file, |
|
|
const QVImage< uChar, 1 > |
imageGray | |
|
) |
| | |
Write YUV image frames to a yuv4mpeg2 video file.
This function stores a gray scale frame in a YUV4MPEG2 video file. The parameter of this function is a single 1-channel image, containing the gray scale image. For further information about its usage, see documentation for function writeYUV4MPEG2Header.
See section Writting to YUV4MPEG video files. for further info about the usage of this function.
- Parameters:
-
| file | The input file object. It must be already opened when received as argument by this function. |
| imageGray | Gray scale image to store in the video file. |
- See also:
- writeYUV4MPEG2Header
Definition at line 70 of file qvimageio.cpp.
bool writeYUV4MPEG2Frame |
( |
QFile & |
file, |
|
|
const QVImage< uChar, 1 > |
imageY, |
|
|
const QVImage< uChar, 1 > |
imageU, |
|
|
const QVImage< uChar, 1 > |
imageV | |
|
) |
| | |
Write YUV image frames to a yuv4mpeg2 video file.
This function stores a YUV frame in a YUV4MPEG2 video file. The parameters of this function must be three images containing the three chanels for the YUV image. For further information about its usage, see documentation for function writeYUV4MPEG2Header.
See section Writting to YUV4MPEG video files. for further info about the usage of this function.
- Parameters:
-
| file | The input file object. It must be already opened when received as argument by this function. |
| imageY | Image object containing the Y channel for the YUV image, to store in the video file. |
| imageU | Image object containing the Y channel for the YUV image, to store in the video file. |
| imageV | Image object containing the Y channel for the YUV image, to store in the video file. |
- See also:
- writeYUV4MPEG2Header
Definition at line 55 of file qvimageio.cpp.
Referenced by writeYUV4MPEG2Frame().
bool writeYUV4MPEG2Header |
( |
QFile & |
file, |
|
|
const int |
cols, |
|
|
const int |
rows, |
|
|
const int |
fps | |
|
) |
| | |
|