#include <qvcore/qvimage.h>
Inherits QVGenericImage.
Public Member Functions | |
QVImage () | |
Default constructor. | |
QVImage (uInt cols, uInt rows, uInt step=0, const Type *buffer=NULL) | |
Dimensions and buffer constructor. | |
QVImage (QVImage< uChar, 1 > const &img) | |
Copy constructor. | |
QVImage (QVImage< uChar, 3 > const &img) | |
QVImage (QVImage< uShort, 1 > const &img) | |
QVImage (QVImage< uShort, 3 > const &img) | |
QVImage (QVImage< sShort, 1 > const &img) | |
QVImage (QVImage< sShort, 3 > const &img) | |
QVImage (QVImage< sInt, 1 > const &img) | |
QVImage (QVImage< sInt, 3 > const &img) | |
QVImage (QVImage< sFloat, 1 > const &img) | |
QVImage (QVImage< sFloat, 3 > const &img) | |
QVImage (QVImage< uChar, 1 > const &red, QVImage< uChar, 1 > const &green, QVImage< uChar, 1 > const &blue) | |
Compose copy constructor. | |
QVImage (QVImage< uShort, 1 > const &red, QVImage< uShort, 1 > const &green, QVImage< uShort, 1 > const &blue) | |
QVImage (QVImage< sShort, 1 > const &red, QVImage< sShort, 1 > const &green, QVImage< sShort, 1 > const &blue) | |
QVImage (QVImage< sInt, 1 > const &red, QVImage< sInt, 1 > const &green, QVImage< sInt, 1 > const &blue) | |
QVImage (QVImage< sFloat, 1 > const &red, QVImage< sFloat, 1 > const &green, QVImage< sFloat, 1 > const &blue) | |
const char * | getTypeQString () const |
uInt | getRows () const |
uInt | getCols () const |
uInt | getStep () const |
uInt | getChannels () const |
uInt | getDataSize () const |
uInt | getTypeSize () const |
const Type * | getReadData () const |
Method to obtain image data buffer, in read mode. | |
Type * | getWriteData () |
Method to obtain image data buffer, in read/write mode. | |
void | set (Type c1=0, Type c2=0, Type c3=0) |
Sets pixel values for an image, to a given value. | |
Type & | operator() (const uInt col, const uInt row, const uInt channel=0) |
Operator to access pixel values for a pixel channel, given it's coordinates. | |
Type | operator() (const uInt col, const uInt row, const uInt channel=0) const |
Type & | operator() (const QPoint point, const uInt channel=0) |
Overload of operator (), to access pixel values for a pixel channel, given a QVPoint and a channel number. | |
Type | operator() (const QPoint point, const uInt channel=0) const |
QVImage< Type, 1 > | operator() (const uInt channel=0) const |
Operator to access pixel values for a pixel channel, given it's coordinates. | |
QVImage< Type, Channels > & | operator= (const QVImage< uChar, 1 > &sourceImage) |
Copy operator. | |
QVImage< Type, Channels > & | operator= (const QVImage< uChar, 3 > &sourceImage) |
QVImage< Type, Channels > & | operator= (const QVImage< uShort, 1 > &sourceImage) |
QVImage< Type, Channels > & | operator= (const QVImage< uShort, 3 > &sourceImage) |
QVImage< Type, Channels > & | operator= (const QVImage< sShort, 1 > &sourceImage) |
QVImage< Type, Channels > & | operator= (const QVImage< sShort, 3 > &sourceImage) |
QVImage< Type, Channels > & | operator= (const QVImage< sInt, 1 > &sourceImage) |
QVImage< Type, Channels > & | operator= (const QVImage< sInt, 3 > &sourceImage) |
QVImage< Type, Channels > & | operator= (const QVImage< sFloat, 1 > &sourceImage) |
QVImage< Type, Channels > & | operator= (const QVImage< sFloat, 3 > &sourceImage) |
bool | operator== (const QVImage< Type, Channels > &img) const |
Equality compare operator. | |
bool | operator!= (const QVImage< Type, Channels > &img) const |
Inequality compare operator. | |
QVImage< uChar, 1 > | operator< (const QVImage< uChar, Channels > &img) const |
Pixel wise 'less than' compare operator. | |
QVImage< uChar, 1 > | operator< (const QVImage< uShort, Channels > &img) const |
Pixel wise 'less than' compare operator. | |
QVImage< uChar, 1 > | operator< (const QVImage< sShort, Channels > &img) const |
Pixel wise 'less than' compare operator. | |
QVImage< uChar, 1 > | operator< (const QVImage< sInt, Channels > &img) const |
Pixel wise 'less than' compare operator. | |
QVImage< uChar, 1 > | operator< (const QVImage< sFloat, Channels > &img) const |
Pixel wise 'less than' compare operator. | |
QVImage< uChar, 1 > | operator> (const QVImage< uChar, Channels > &img) const |
Pixel wise 'greater than' compare operator. | |
QVImage< uChar, 1 > | operator> (const QVImage< uShort, Channels > &img) const |
Pixel wise 'greater than' compare operator. | |
QVImage< uChar, 1 > | operator> (const QVImage< sShort, Channels > &img) const |
Pixel wise 'greater than' compare operator. | |
QVImage< uChar, 1 > | operator> (const QVImage< sInt, Channels > &img) const |
Pixel wise 'greater than' compare operator. | |
QVImage< uChar, 1 > | operator> (const QVImage< sFloat, Channels > &img) const |
Pixel wise 'greater than' compare operator. | |
QVImage< uChar, 1 > | operator<= (const QVImage< uChar, Channels > &img) const |
Pixel wise 'less or equal than' compare operator. | |
QVImage< uChar, 1 > | operator<= (const QVImage< uShort, Channels > &img) const |
Pixel wise 'less or equal than' compare operator. | |
QVImage< uChar, 1 > | operator<= (const QVImage< sShort, Channels > &img) const |
Pixel wise 'less or equal than' compare operator. | |
QVImage< uChar, 1 > | operator<= (const QVImage< sInt, Channels > &img) const |
Pixel wise 'less or equal than' compare operator. | |
QVImage< uChar, 1 > | operator<= (const QVImage< sFloat, Channels > &img) const |
Pixel wise 'less or equal than' compare operator. | |
QVImage< uChar, 1 > | operator>= (const QVImage< uChar, Channels > &img) const |
Pixel wise 'greater or equal than' compare operator. | |
QVImage< uChar, 1 > | operator>= (const QVImage< uShort, Channels > &img) const |
Pixel wise 'greater or equal than' compare operator. | |
QVImage< uChar, 1 > | operator>= (const QVImage< sShort, Channels > &img) const |
Pixel wise 'greater or equal than' compare operator. | |
QVImage< uChar, 1 > | operator>= (const QVImage< sInt, Channels > &img) const |
Pixel wise 'greater or equal than' compare operator. | |
QVImage< uChar, 1 > | operator>= (const QVImage< sFloat, Channels > &img) const |
Pixel wise 'greater or equal than' compare operator. | |
QVImage< Type, Channels > | operator+ (const Type constant) const |
Pixel wise constant add operator. | |
QVImage< Type, Channels > | operator * (const Type constant) const |
Pixel wise constant product operator. | |
QVImage< Type, Channels > | operator- (const Type constant) const |
Pixel wise constant subtraction operator. | |
QVImage< Type, Channels > | operator/ (const Type constant) const |
Pixel wise constant division operator. | |
QVImage< Type, Channels > | operator<< (const Type constant) const |
Pixel wise bit-wise left shift operator. | |
QVImage< Type, Channels > | operator>> (const Type constant) const |
Pixel wise bit-wise right shift operator. | |
QVImage< Type, Channels > | operator! () const |
Pixel wise bit-wise NOT operation. | |
QVImage< Type, Channels > | operator & (const Type constant) const |
Pixel wise bit-wise boolean and operator. | |
QVImage< Type, Channels > | operator| (const Type constant) const |
Pixel wise bit-wise boolean or operator. | |
QVImage< Type, Channels > | operator^ (const Type constant) const |
Pixel wise bit-wise boolean xor operator. | |
QVImage< Type, Channels > | operator+ (const QVImage< Type, Channels > &img) const |
Pixel wise add operator. | |
QVImage< Type, Channels > | operator * (const QVImage< Type, Channels > &img) const |
Pixel wise mult operator. | |
QVImage< Type, Channels > | operator- (const QVImage< Type, Channels > &img) const |
Pixel wise subtraction operator. | |
QVImage< Type, Channels > | operator/ (const QVImage< Type, Channels > &img) const |
Pixel wise division operator. | |
template<> | |
const char * | getTypeQString () const |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage. | |
template<> | |
const char * | getTypeQString () const |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage. | |
template<> | |
const char * | getTypeQString () const |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage. | |
template<> | |
const char * | getTypeQString () const |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage. | |
template<> | |
const char * | getTypeQString () const |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage. | |
template<> | |
const char * | getTypeQString () const |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage. | |
template<> | |
const char * | getTypeQString () const |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage. | |
template<> | |
const char * | getTypeQString () const |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage. | |
template<> | |
const char * | getTypeQString () const |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage. | |
template<> | |
const char * | getTypeQString () const |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage. | |
Protected Attributes | |
QSharedDataPointer < QVImageBuffer < Type, Channels > > | imageBuffer |
QVImage class extends QVGenericImage, and wraps image data in a simple and lightweight structure, easy to use. It is a template class, as you can see in the header of the class:
template <typename Type, int Channels = 1> class QVImage: public QVGenericImage { [...] }
Virtually, you can specify pixel types of any kind, but QVision has defined functionality to process pixels of the following types:
C++ type | QVision type | IPP type | Bit depth |
---|---|---|---|
unsigned char | uChar | Ipp8u | 8 |
unsigned short | uShort | Ipp16u | 16 |
unsigned int | uInt | Ipp32u | 32 |
signed char | sChar | Ipp8s | 8 |
signed short | sShort | Ipp16s | 16 |
signed int | sInt | Ipp32s | 32 |
typedef float | sFloat | Ipp32f | 32 |
typedef double | sDouble | Ipp64f | 64 |
In practice, most of the functions will work with images of type uChar, sShort, and sFloat.
For example, the following code line creates images of 8 bit-depth, 16 bit-depth, and 32 bit-depth, of one and three channels:
QVImage<uChar, 1> image8uC1; QVImage<sShort, 1> image16sC1; QVImage<sInt, 1> image32sC1; QVImage<uChar, 3> image8uC3; QVImage<sShort, 3> image16sC3; QVImage<sInt, 3> image32sC3;
You can ommit the number of channels, if you want to create a one channel image, because that will be the default value for that template parameter. Thus the first three code lines of the previous example can be written like this:
QVImage<uChar> image8uC1; QVImage<sShort> image16sC1; QVImage<sInt> image32sC1;
with identic results.
As in the case of the Type parameter, this parameter can be assigned any arbitrary positive integer value, but generally there wouldn't be functionality to work with images with a channel number different of one or three channels.
The first one is using operator (). It is the least efficient access method in execution time performance, but the easiest one to use, and the safest. This operator is overloaded for the QVImage class to allow reading and writting pixel values over image objects.
It is slow because it performs some sanity checks, for example to ensure you don't read pixels outside the image area. An usage example follows:
QVImage<uChar> imageCharBis = imageChar; [...] // This line assigns the value 0 to pixel (10,10) in the image imageChar: imageCharBis(10,10) = 0; // And this line reads value of pixel (11,11) of the image imageChar in the variable value: uChar value = imageCharBis(11,11); [...] // The following code shows how to read and write all the pixels from QVImage's of size 100x100: QVImage<uChar> imageChar1(100,100), imageChar2(100,100); [...] for (uInt row = 0; row != imageChar1.getRows(); row++) for (uInt col = 0; col != imageChar1.getCols(); col++) imageCharData2(col, row) = imageCharData1(col, row); [...]
The second method for image pixel accessing is working directly with the raw data buffer. It is the fastest and the rawest of the three methods for image pixel access.
You can obtain a pointer to the memory area containing the image data with the functions getWriteData() and getReadData(). The method getStep() returns the row size of an image in memory, and the methods getCols() and getRows() can be used to know the bounds of the memory area of the image.
The following code illustrates the use of these functions for raw image pixel access method:
QVImage<uChar> imageChar1(100,100), imageChar2(100, 100); [...] uInt step1 = imageChar1.getStep(), step2 = imageChar2.getStep(); uChar *imageCharData1 = imageChar1.getReadData(), const *imageCharData2 = imageChar2.getWriteData(); // The contents of imageChar1 will be copied to the image imageChar2. for (uInt row = 0; row != imageChar1.getRows(); row++) for (uInt col = 0; col != imageChar1.getCols(); col++) imageCharData2[row*step2 + col] = imageCharData1[row*step1 + col]; [...]
That code copies the content of image imageChar1 to the image imageChar2.
The last way is using a set of macros provided by the QVision for image pixel accessing. These macros are:
The first two macros, QVIMAGE_INIT_READ and QVIMAGE_INIT_READ are used to initalize macro access for a given image. The following code illustrates their usage:
[...] QVImage<sFloat, 1> imageFloat(100,100); QVImage<uChar, 3> imageChar3(100,100); [...] QVIMAGE_INIT_READ(sFloat,imageFloat); QVIMAGE_INIT_WRITE(uChar,imageChar3); [...]
To access a random pixel located in a previously initialized image, you should use the macro QVIMAGE_PIXEL like this:
[ ... follows from previous example code ...] for(uInt row = 0; row != imageFloat.getRows(); row++) for(uInt col = 0; col != imageFloat.getCols(); col++) QVIMAGE_PIXEL(imageChar3, col, row,1) = QVIMAGE_PIXEL(imageFloat, col, row,0); [...]
Macro QVIMAGE_PIXEL takes always parameters: image name, row, column, and channel number, starting with number 0 for the first channel. In one channel images, only 0 value should be valid for this last parameter.
Macros QVIMAGE_PTR_INIT_READ and QVIMAGE_PTR_INIT_WRITE work like macros QVIMAGE_INIT_READ and QVIMAGE_INIT_WRITE, only that they are given a pointer to the image to be accessed with macro QVIMAGE_PIXEL, not the name of the image itselft. An example of use of these macros follows:
QVImage<sFloat, 1> * ptrImageFloat(100,100); QVImage<uChar, 3> * ptrImageChar3(100,100); [...] QVIMAGE_PTR_INIT_READ(sFloat,ptrImageFloat); QVIMAGE_PTR_INIT_WRITE(uChar,ptrImageChar3); // The contents of 1-channel image pointed by ptrImageFloat will be copied to the second channel of // the 3-channel image pointed by ptrImageChar3. for(uInt row = 0; row != ptrImageFloat.getRows(); row++) for(uInt col = 0; col != ptrImageFloat.getCols(); col++) QVIMAGE_PIXEL(ptrImageChar3, col, row,1) = QVIMAGE_PIXEL(ptrImageFloat, col, row,0); [...]
Use of macro QVIMAGE_PIXEL is the same for both pointer and non-pointer macro types.
Macros QVIMAGE_PIXEL_PTR, QVIMAGE_COL_INCREMENT_PTR, QVIMAGE_ROW_INCREMENT_PTR, QVIMAGE_NEXT_LINE_INCREMENT_PTR may be used to perform a more efficient image access than the random access previously reviewed with macro QVIMAGE_PIXEL.
Like the latter, macros QVIMAGE_INIT_READ or QVIMAGE_INIT_WRITE must be used to initialize the image. Later, a pointer to the starting pixel in the image is obtained with the macro QVIMAGE_PIXEL_PTR, and using the macros QVIMAGE_COL_INCREMENT_PTR and QVIMAGE_ROW_INCREMENT_PTR we can transverse the image from each pixel to another one in a 4-connected neighbourhood.
Using the macro QVIMAGE_NEXT_LINE_INCREMENT_PTR we can obtain the distance from the last pixel of a line, to the location in memory of the first pixel of the following line for sequential accesses through the lines of an image.
The following code ilustrates their usage:
QVImage<sFloat, 1> imageFloat(100,100); QVImage<uChar, 1> imageChar(100,100); [...] QVIMAGE_INIT_READ(sFloat,imageFloat); QVIMAGE_INIT_WRITE(uChar,imageChar); const sFloat *imagePtr = QVIMAGE_PIXEL_PTR(imageFloat, 0, 0, 0); uChar *destPtr = QVIMAGE_PIXEL_PTR(imageChar, 0, 0, 0); // The contents of imageFloat will be copied to image imageChar. for (int i = 0; i != rows; ++i, imagePtr += QVIMAGE_NEXT_LINE_INCREMENT_PTR(imageFloat), destPtr += QVIMAGE_NEXT_LINE_INCREMENT_PTR(imageChar)) for (int j = 0; j != cols; ++j, imagePtr += QVIMAGE_COL_INCREMENT_PTR(imageFloat), destPtr += QVIMAGE_COL_INCREMENT_PTR(imageChar)) *destPtr = *imagePtr; [...]
This kind of access is very common, and using these macros to access the pixels of the image is more efficient than with the QVIMAGE_PIXEL macro.
Definition at line 604 of file qvimage.h.
QVImage< Type, Channels >::QVImage | ( | uInt | cols, | |
uInt | rows, | |||
uInt | step = 0 , |
|||
const Type * | buffer = NULL | |||
) | [inline] |
Dimensions and buffer constructor.
uChar data_buffer[10][12] = { { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 3, 7 }, { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 3, 7 }, { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 3, 7 }, { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 3, 7 }, { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 3, 7 }, { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 3, 7 }, { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 3, 7 }, { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 3, 7 }, { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 3, 7 }, { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 3, 7 } }; // Creates a QVImage of size 10x10, ROI covering the whole image, and anchor pointing at pixel (0,0). // Data buffer of the image will point to matrix data_buffer. // The final values of each line, those in 11th and 12th columns will not be considered as part of the // image. Step is the length of the lines of data_buffer, 12, not the number of columns. QVImage<uChar> imageCharBuffer(10,10, 12, data_buffer);
cols | number of columns for the image. | |
rows | number of rows for the image. | |
step | defined step for the data buffer of the image. It should always be greater than the number of columns. | |
buffer | pointer to a memory zone where image is and will be stored. |
QVImage< Type, Channels >::QVImage | ( | QVImage< uChar, 1 > const & | img | ) |
Copy constructor.
This constructor can be used to construct an image from another one with same bit depth and channel number, or from an image differing in type or number of channels.
In the former case, this constructor will do a copy-on-write, duplicating the pointer to the data buffer of the image, and efectively copying the data only when modifying it if shared by more than one QVImage object.
In the latter case, it will always allocate a new data buffer for the image, and make a conversion from different bit depth or channel number. Note that you can never convert from an image that differs in data type and bit-depth with the constructed image.
This constructor will copy the ROI and anchor of the parameter image.
img | image to be copied. |
QVImage< Type, Channels >::QVImage | ( | QVImage< uChar, 3 > const & | img | ) |
Overloaded copy constructor.
QVImage< Type, Channels >::QVImage | ( | QVImage< uShort, 1 > const & | img | ) |
Overloaded copy constructor.
QVImage< Type, Channels >::QVImage | ( | QVImage< uShort, 3 > const & | img | ) |
Overloaded copy constructor.
QVImage< Type, Channels >::QVImage | ( | QVImage< sShort, 1 > const & | img | ) |
Overloaded copy constructor.
QVImage< Type, Channels >::QVImage | ( | QVImage< sShort, 3 > const & | img | ) |
Overloaded copy constructor.
QVImage< Type, Channels >::QVImage | ( | QVImage< sInt, 1 > const & | img | ) |
Overloaded copy constructor.
QVImage< Type, Channels >::QVImage | ( | QVImage< sInt, 3 > const & | img | ) |
Overloaded copy constructor.
QVImage< Type, Channels >::QVImage | ( | QVImage< sFloat, 1 > const & | img | ) |
Overloaded copy constructor.
QVImage< Type, Channels >::QVImage | ( | QVImage< sFloat, 3 > const & | img | ) |
Overloaded copy constructor.
QVImage< Type, Channels >::QVImage | ( | QVImage< uChar, 1 > const & | red, | |
QVImage< uChar, 1 > const & | green, | |||
QVImage< uChar, 1 > const & | blue | |||
) |
Compose copy constructor.
This constructor can be used to construct a 3-channels image from 3 1-channel images.
This constructor will copy the ROI and anchor of the first parameter image.
red | image to be copied to the first channel. | |
green | image to be copied to the second channel. | |
blue | image to be copied to the third channel. |
QVImage< Type, Channels >::QVImage | ( | QVImage< uShort, 1 > const & | red, | |
QVImage< uShort, 1 > const & | green, | |||
QVImage< uShort, 1 > const & | blue | |||
) |
Overloaded compose copy constructor
QVImage< Type, Channels >::QVImage | ( | QVImage< sShort, 1 > const & | red, | |
QVImage< sShort, 1 > const & | green, | |||
QVImage< sShort, 1 > const & | blue | |||
) |
Overloaded compose copy constructor
QVImage< Type, Channels >::QVImage | ( | QVImage< sInt, 1 > const & | red, | |
QVImage< sInt, 1 > const & | green, | |||
QVImage< sInt, 1 > const & | blue | |||
) |
Overloaded compose copy constructor
QVImage< Type, Channels >::QVImage | ( | QVImage< sFloat, 1 > const & | red, | |
QVImage< sFloat, 1 > const & | green, | |||
QVImage< sFloat, 1 > const & | blue | |||
) |
Overloaded compose copy constructor
const char* QVImage< Type, Channels >::getTypeQString | ( | ) | const [virtual] |
Overloaded function from QVGenericImage::getTypeQString()
Implements QVGenericImage.
uInt QVImage< Type, Channels >::getRows | ( | ) | const [inline, virtual] |
Overloaded function from QVGenericImage::getRows()
Implements QVGenericImage.
Definition at line 735 of file qvimage.h.
Referenced by CountingSort(), FilterDoG(), FilterHarrisCornerResponseImage(), FilterHessianCornerResponseImage(), FilterLocalMax(), FilterSeparable(), getConnectedSetBorderContoursThreshold(), getLineContoursThreshold4Connectivity(), getLineContoursThreshold8Connectivity(), getLineContourThreshold4Connectivity(), getLineContourThreshold8Connectivity(), GetMaximalResponsePoints1(), GetMaximalResponsePoints1bis(), GetMaximalResponsePoints3(), GetMaximalResponsePoints3bis(), getMSERContours(), QVMPlayerCamera::grab(), ContourPainter::iterate(), CannyWorker::iterate(), ContourExtractorWorker::iterate(), MyWorker::iterate(), myFloodFill(), QVImage< Type, Channels >::operator()(), QVImage< Type, Channels >::operator==(), and QVComponentTree::QVComponentTree().
uInt QVImage< Type, Channels >::getCols | ( | ) | const [inline, virtual] |
Overloaded function from QVGenericImage::getCols()
Implements QVGenericImage.
Definition at line 738 of file qvimage.h.
Referenced by CountingSort(), FilterDoG(), FilterHarrisCornerResponseImage(), FilterHessianCornerResponseImage(), FilterLocalMax(), FilterSeparable(), getConnectedSetBorderContoursThreshold(), getLineContoursThreshold4Connectivity(), getLineContoursThreshold8Connectivity(), getLineContourThreshold4Connectivity(), getLineContourThreshold8Connectivity(), GetMaximalResponsePoints1(), GetMaximalResponsePoints1bis(), GetMaximalResponsePoints3(), GetMaximalResponsePoints3bis(), getMSERContours(), QVMPlayerCamera::grab(), ContourPainter::iterate(), CannyWorker::iterate(), ContourExtractorWorker::iterate(), MyWorker::iterate(), myFloodFill(), QVImage< Type, Channels >::operator()(), QVImage< Type, Channels >::operator==(), and QVComponentTree::QVComponentTree().
uInt QVImage< Type, Channels >::getStep | ( | ) | const [inline, virtual] |
Overloaded function from QVGenericImage::getStep()
Implements QVGenericImage.
Definition at line 741 of file qvimage.h.
Referenced by Abs(), AbsDiff(), Add(), AddC(), AddRandUniform_Direct(), AndC(), Canny(), Compare(), CompareC(), ComputeThreshold_Otsu(), Convert(), Copy(), Dilate3x3(), Div(), DivC(), Erode3x3(), FastMarching(), Filter(), FilterBox(), FilterColumn(), FilterGauss(), FilterHipass(), FilterLaplace(), FilterLowpass(), FilterMax(), FilterMedian(), FilterMedianColor(), FilterMedianCross(), FilterMedianHoriz(), FilterMedianVert(), FilterMedianWeightedCenter3x3(), FilterMin(), FilterRow(), FilterSobelHoriz(), FilterSobelHorizMask(), FilterSobelVert(), FilterSobelVertMask(), HistogramRange(), Inpaint(), InpaintInitAllocC1(), InpaintInitAllocC3(), Integral(), Ln(), LShiftC(), Max(), Mean(), Min(), MinEigenVal(), Mul(), MulC(), MulScale(), Not(), QVImage< Type, Channels >::operator()(), OrC(), RGBToGray(), RShiftC(), Scale(), Set(), Sqr(), Sub(), SubC(), Sum(), Threshold(), Threshold_LTValGTVal(), Threshold_Val(), XorC(), and YUV420ToRGB().
uInt QVImage< Type, Channels >::getChannels | ( | ) | const [inline, virtual] |
Overloaded function from QVGenericImage::getChannels()
Implements QVGenericImage.
Definition at line 744 of file qvimage.h.
Referenced by QVImage< Type, Channels >::operator==().
uInt QVImage< Type, Channels >::getDataSize | ( | ) | const [inline, virtual] |
Overloaded function from QVGenericImage::getDataSize()
Implements QVGenericImage.
Definition at line 747 of file qvimage.h.
Referenced by QVImage< Type, Channels >::operator()().
uInt QVImage< Type, Channels >::getTypeSize | ( | ) | const [inline, virtual] |
Overloaded function from QVGenericImage::getTypeSize()
Implements QVGenericImage.
const Type* QVImage< Type, Channels >::getReadData | ( | ) | const [inline] |
Method to obtain image data buffer, in read mode.
This method can be used to program fast access algorithms to pixel values in an image.
It is intended to be used only to read pixels in an image, thus getWriteData() method should be used when access to write or read/write is intended to be done.
This function will generally be faster than getWriteData(), because it will not need to realize copy on write, in the case that the image data buffer where shared with other QVImage.
Definition at line 762 of file qvimage.h.
Referenced by InpaintInitAllocC1(), and InpaintInitAllocC3().
Type* QVImage< Type, Channels >::getWriteData | ( | ) | [inline] |
Method to obtain image data buffer, in read/write mode.
This method can be used to program fast access algorithms to pixel values in an image.
This function will perform copy on write in the case that the data buffer for this image where shared with other QVImage's.
Thus can be slower than getReadData() method to access image pixels, but will ensure avoiding side effects on modifying shared buffers with other images.
Definition at line 774 of file qvimage.h.
Referenced by Canny(), FastMarching(), and MinEigenVal().
void QVImage< Type, Channels >::set | ( | Type | c1 = 0 , |
|
Type | c2 = 0 , |
|||
Type | c3 = 0 | |||
) |
Sets pixel values for an image, to a given value.
This method uses the region of interest of the image, to set pixels inside it to a given value. It can be used either for one channel, or several channel images.
In the former case, it should be used with one parameter, only specifying value for the first channel, otherwise, values for other channels will be ignored. If no parameters are given, the image region of interest will be set to zero value pixels.
In the latter case, default values of 0 will be used if there are unspecified channel values.
c1 | value to set pixel's first channel in the region of interest of the image. | |
c2 | value to set pixel's second channel in the region of interest of the image. | |
c3 | value to set pixel's third channel in the region of interest of the image. |
Type& QVImage< Type, Channels >::operator() | ( | const uInt | col, | |
const uInt | row, | |||
const uInt | channel = 0 | |||
) | [inline] |
Operator to access pixel values for a pixel channel, given it's coordinates.
This operator can be used either with one channel or multichannel images. In the first case, it shouldn't be given a channel number, to use the default zero value.
col | column number of pixel to be accessed. | |
row | row number of pixel to be accessed. | |
channel | channel number of pixel to be accessed. |
Type& QVImage< Type, Channels >::operator() | ( | const QPoint | point, | |
const uInt | channel = 0 | |||
) | [inline] |
Overload of operator (), to access pixel values for a pixel channel, given a QVPoint and a channel number.
This overload is like the previous, but can be used with a QPoint, to access a concrete pixel in the image.
point | QPoint indicating location of the pixel to be accessed. | |
channel | channel number of pixel to be accessed. |
QVImage<Type, 1> QVImage< Type, Channels >::operator() | ( | const uInt | channel = 0 |
) | const |
Operator to access pixel values for a pixel channel, given it's coordinates.
This operator can be used either with one channel or multichannel images. In the first case, it shouldn't be given a channel number, to use the default zero value.
col | column number of pixel to be accessed. | |
row | row number of pixel to be accessed. | |
channel | channel number of pixel to be accessed. |
QVImage<Type, Channels>& QVImage< Type, Channels >::operator= | ( | const QVImage< uChar, 1 > & | sourceImage | ) |
Copy operator.
Like the copy constructor, this operator can be used to copy an image from another one with same bit depth and channel number, or from an image differing in type or number of channels.
In the former case, this operator will do a copy-on-write, duplicating the pointer to the data buffer of the image, and efectively copying the data only when modifying it if shared by more than one QVImage object.
In the latter case, it will always allocate a new data buffer for the image, and make a conversion from different bit depth or channel number. Note that you can never convert from an image that differs in data type and bit-depth with the constructed image.
The copy operator will copy the ROI and anchor of the parameter image.
img | image to be copied. |
QVImage<Type, Channels>& QVImage< Type, Channels >::operator= | ( | const QVImage< uChar, 3 > & | sourceImage | ) |
Overloaded copy operator.
QVImage<Type, Channels>& QVImage< Type, Channels >::operator= | ( | const QVImage< uShort, 1 > & | sourceImage | ) |
Overloaded copy operator.
QVImage<Type, Channels>& QVImage< Type, Channels >::operator= | ( | const QVImage< uShort, 3 > & | sourceImage | ) |
Overloaded copy operator.
QVImage<Type, Channels>& QVImage< Type, Channels >::operator= | ( | const QVImage< sShort, 1 > & | sourceImage | ) |
Overloaded copy operator.
QVImage<Type, Channels>& QVImage< Type, Channels >::operator= | ( | const QVImage< sShort, 3 > & | sourceImage | ) |
Overloaded copy operator.
QVImage<Type, Channels>& QVImage< Type, Channels >::operator= | ( | const QVImage< sInt, 1 > & | sourceImage | ) |
Overloaded copy operator.
QVImage<Type, Channels>& QVImage< Type, Channels >::operator= | ( | const QVImage< sInt, 3 > & | sourceImage | ) |
Overloaded copy operator.
QVImage<Type, Channels>& QVImage< Type, Channels >::operator= | ( | const QVImage< sFloat, 1 > & | sourceImage | ) |
Overloaded copy operator.
QVImage<Type, Channels>& QVImage< Type, Channels >::operator= | ( | const QVImage< sFloat, 3 > & | sourceImage | ) |
Overloaded copy operator.
bool QVImage< Type, C >::operator== | ( | const QVImage< Type, C > & | img | ) | const [inline] |
Equality compare operator.
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:
img | image to compare with this image. |
bool QVImage< Type, Channels >::operator!= | ( | const QVImage< Type, Channels > & | img | ) | const [inline] |
Inequality compare operator.
This operator will compare two images of same bit depth and channel number, and will return true if images differ in any of:
img | image to compare with this image. |
QVImage<uChar, 1> QVImage< Type, Channels >::operator< | ( | const QVImage< uChar, Channels > & | img | ) | const |
Pixel wise 'less than' compare operator.
img | image to compare with this image. |
QVImage<uChar, 1> QVImage< Type, Channels >::operator< | ( | const QVImage< uShort, Channels > & | img | ) | const |
Pixel wise 'less than' compare operator.
img | image to compare with this image. |
QVImage<uChar, 1> QVImage< Type, Channels >::operator< | ( | const QVImage< sShort, Channels > & | img | ) | const |
Pixel wise 'less than' compare operator.
img | image to compare with this image. |
QVImage<uChar, 1> QVImage< Type, Channels >::operator< | ( | const QVImage< sInt, Channels > & | img | ) | const |
Pixel wise 'less than' compare operator.
img | image to compare with this image. |
QVImage<uChar, 1> QVImage< Type, Channels >::operator< | ( | const QVImage< sFloat, Channels > & | img | ) | const |
Pixel wise 'less than' compare operator.
img | image to compare with this image. |
QVImage<uChar, 1> QVImage< Type, Channels >::operator> | ( | const QVImage< uChar, Channels > & | img | ) | const |
Pixel wise 'greater than' compare operator.
img | image to compare with this image. |
QVImage<uChar, 1> QVImage< Type, Channels >::operator> | ( | const QVImage< uShort, Channels > & | img | ) | const |
Pixel wise 'greater than' compare operator.
img | image to compare with this image. |
QVImage<uChar, 1> QVImage< Type, Channels >::operator> | ( | const QVImage< sShort, Channels > & | img | ) | const |
Pixel wise 'greater than' compare operator.
img | image to compare with this image. |
QVImage<uChar, 1> QVImage< Type, Channels >::operator> | ( | const QVImage< sInt, Channels > & | img | ) | const |
Pixel wise 'greater than' compare operator.
img | image to compare with this image. |
QVImage<uChar, 1> QVImage< Type, Channels >::operator> | ( | const QVImage< sFloat, Channels > & | img | ) | const |
Pixel wise 'greater than' compare operator.
img | image to compare with this image. |
QVImage<uChar, 1> QVImage< Type, Channels >::operator<= | ( | const QVImage< uChar, Channels > & | img | ) | const |
Pixel wise 'less or equal than' compare operator.
img | image to compare with this image. |
QVImage<uChar, 1> QVImage< Type, Channels >::operator<= | ( | const QVImage< uShort, Channels > & | img | ) | const |
Pixel wise 'less or equal than' compare operator.
img | image to compare with this image. |
QVImage<uChar, 1> QVImage< Type, Channels >::operator<= | ( | const QVImage< sShort, Channels > & | img | ) | const |
Pixel wise 'less or equal than' compare operator.
img | image to compare with this image. |
QVImage<uChar, 1> QVImage< Type, Channels >::operator<= | ( | const QVImage< sInt, Channels > & | img | ) | const |
Pixel wise 'less or equal than' compare operator.
img | image to compare with this image. |
QVImage<uChar, 1> QVImage< Type, Channels >::operator<= | ( | const QVImage< sFloat, Channels > & | img | ) | const |
Pixel wise 'less or equal than' compare operator.
img | image to compare with this image. |
QVImage<uChar, 1> QVImage< Type, Channels >::operator>= | ( | const QVImage< uChar, Channels > & | img | ) | const |
Pixel wise 'greater or equal than' compare operator.
img | image to compare with this image. |
QVImage<uChar, 1> QVImage< Type, Channels >::operator>= | ( | const QVImage< uShort, Channels > & | img | ) | const |
Pixel wise 'greater or equal than' compare operator.
img | image to compare with this image. |
QVImage<uChar, 1> QVImage< Type, Channels >::operator>= | ( | const QVImage< sShort, Channels > & | img | ) | const |
Pixel wise 'greater or equal than' compare operator.
img | image to compare with this image. |
QVImage<uChar, 1> QVImage< Type, Channels >::operator>= | ( | const QVImage< sInt, Channels > & | img | ) | const |
Pixel wise 'greater or equal than' compare operator.
img | image to compare with this image. |
QVImage<uChar, 1> QVImage< Type, Channels >::operator>= | ( | const QVImage< sFloat, Channels > & | img | ) | const |
Pixel wise 'greater or equal than' compare operator.
img | image to compare with this image. |
QVImage<Type, Channels> QVImage< Type, Channels >::operator+ | ( | const Type | constant | ) | const |
Pixel wise constant add operator.
Uses as the second operand a constant value for every pixel computed.
Saturation is used for integer bit depth data (any except sFloat bit depth). Regions of interests, and anchors are applied in this operator.
constant | second operand value. |
QVImage<Type, Channels> QVImage< Type, Channels >::operator * | ( | const Type | constant | ) | const |
Pixel wise constant product operator.
Uses as the second operand a constant value for every pixel computed.
Saturation is used for integer bit depth data (any except sFloat bit depth). Regions of interests, and anchors are applied in this operator.
constant | second operand value. |
QVImage<Type, Channels> QVImage< Type, Channels >::operator- | ( | const Type | constant | ) | const |
Pixel wise constant subtraction operator.
Uses as the second operand a constant value for every pixel computed.
Saturation is used for integer bit depth data (any except sFloat bit depth). Regions of interests, and anchors are applied in this operator.
constant | second operand value. |
QVImage<Type, Channels> QVImage< Type, Channels >::operator/ | ( | const Type | constant | ) | const |
Pixel wise constant division operator.
Uses as the second operand a constant value for every pixel computed.
Saturation is used for integer bit depth data (any except sFloat bit depth). Regions of interests, and anchors are applied in this operator.
constant | second operand value. |
QVImage<Type, Channels> QVImage< Type, Channels >::operator<< | ( | const Type | constant | ) | const |
Pixel wise bit-wise left shift operator.
Uses as the value to shift a constant value for every pixel computed.
Saturation is used for integer bit depth data (any except sFloat bit depth). Regions of interests, and anchors are applied in this operator.
constant | second operand value. |
QVImage<Type, Channels> QVImage< Type, Channels >::operator>> | ( | const Type | constant | ) | const |
Pixel wise bit-wise right shift operator.
Uses as the value to shift a constant value for every pixel computed.
Saturation is used for integer bit depth data (any except sFloat bit depth). Regions of interests, and anchors are applied in this operator.
constant | second operand value. |
QVImage<Type, Channels> QVImage< Type, Channels >::operator! | ( | ) | const |
Pixel wise bit-wise NOT operation.
Regions of interests, and anchors are applied in this operator.
QVImage<Type, Channels> QVImage< Type, Channels >::operator & | ( | const Type | constant | ) | const |
Pixel wise bit-wise boolean and operator.
Regions of interests, and anchors are applied in this operator.
constant | second operand value. |
QVImage<Type, Channels> QVImage< Type, Channels >::operator| | ( | const Type | constant | ) | const |
Pixel wise bit-wise boolean or operator.
Regions of interests, and anchors are applied in this operator.
constant | second operand value. |
QVImage<Type, Channels> QVImage< Type, Channels >::operator^ | ( | const Type | constant | ) | const |
Pixel wise bit-wise boolean xor operator.
Regions of interests, and anchors are applied in this operator.
constant | second operand value. |
QVImage<Type, Channels> QVImage< Type, Channels >::operator+ | ( | const QVImage< Type, Channels > & | img | ) | const |
Pixel wise add operator.
Saturation is used for integer bit depth data (any except sFloat bit depth). Regions of interests, and anchors are applied in this operator.
img | operand image. |
QVImage<Type, Channels> QVImage< Type, Channels >::operator * | ( | const QVImage< Type, Channels > & | img | ) | const |
Pixel wise mult operator.
Saturation is used for integer bit depth data (any except sFloat bit depth). Regions of interests, and anchors are applied in this operator.
img | operand image. |
QVImage<Type, Channels> QVImage< Type, Channels >::operator- | ( | const QVImage< Type, Channels > & | img | ) | const |
Pixel wise subtraction operator.
Saturation is used for integer bit depth data (any except sFloat bit depth). Regions of interests, and anchors are applied in this operator.
img | operand image. |
QVImage<Type, Channels> QVImage< Type, Channels >::operator/ | ( | const QVImage< Type, Channels > & | img | ) | const |
Pixel wise division operator.
Saturation is used for integer bit depth data (any except sFloat bit depth). Regions of interests, and anchors are applied in this operator.
img | operand image. |
const char * QVImage< uChar, 1 >::getTypeQString | ( | ) | const [inline, virtual] |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage.
Implements QVGenericImage.
Definition at line 29 of file qvimage.cpp.
const char * QVImage< uChar, 3 >::getTypeQString | ( | ) | const [inline, virtual] |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage.
Implements QVGenericImage.
Definition at line 30 of file qvimage.cpp.
const char * QVImage< uShort, 1 >::getTypeQString | ( | ) | const [inline, virtual] |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage.
Implements QVGenericImage.
Definition at line 31 of file qvimage.cpp.
const char * QVImage< uShort, 3 >::getTypeQString | ( | ) | const [inline, virtual] |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage.
Implements QVGenericImage.
Definition at line 32 of file qvimage.cpp.
const char * QVImage< sShort, 1 >::getTypeQString | ( | ) | const [inline, virtual] |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage.
Implements QVGenericImage.
Definition at line 33 of file qvimage.cpp.
const char * QVImage< sShort, 3 >::getTypeQString | ( | ) | const [inline, virtual] |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage.
Implements QVGenericImage.
Definition at line 34 of file qvimage.cpp.
const char * QVImage< sInt, 1 >::getTypeQString | ( | ) | const [inline, virtual] |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage.
Implements QVGenericImage.
Definition at line 35 of file qvimage.cpp.
const char * QVImage< sInt, 3 >::getTypeQString | ( | ) | const [inline, virtual] |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage.
Implements QVGenericImage.
Definition at line 36 of file qvimage.cpp.
const char * QVImage< sFloat, 1 >::getTypeQString | ( | ) | const [inline, virtual] |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage.
Implements QVGenericImage.
Definition at line 37 of file qvimage.cpp.
const char * QVImage< sFloat, 3 >::getTypeQString | ( | ) | const [inline, virtual] |
Function to make introspection in the image, and obtain a char string identifying the type of the real image contained in the QVGenericImage.
Implements QVGenericImage.
Definition at line 38 of file qvimage.cpp.