PARP Research Group University of Murcia, Spain


src/qvcore/qvimage.h File Reference

File from the QVision library. More...

#include <QMetaType>
#include <qvcore/qvimagebuffer.h>
#include <QVGenericImage>
#include <QImage>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>

Go to the source code of this file.

Classes

class  QVImage< Type, Channels >
 Image representation class for the QVision. 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.

Typedefs

typedef QVImage
< uChar, 1 > 
QVImageUCharC1
typedef QVImage
< uChar, 3 > 
QVImageUCharC3
typedef QVImage
< uShort, 1 > 
QVImageUShortC1
typedef QVImage
< uShort, 3 > 
QVImageUShortC3
typedef QVImage
< sShort, 1 > 
QVImageSShortC1
typedef QVImage
< sShort, 3 > 
QVImageSShortC3
typedef QVImage
< sInt, 1 > 
QVImageSIntC1
typedef QVImage
< sInt, 3 > 
QVImageSIntC3
typedef QVImage
< sFloat, 1 > 
QVImageSFloatC1
typedef QVImage
< sFloat, 3 > 
QVImageSFloatC3


Detailed Description

File from the QVision library.

Author:
PARP Research Group. University of Murcia, Spain.

Definition in file qvimage.h.


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 PixelAccess for detailed usage of this macro.

See also:
QVIMAGE_PIXEL_PTR

Definition at line 140 of file qvimage.h.

#define QVIMAGE_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 image to be 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 PixelAccess 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 46 of file qvimage.h.

Referenced by CountingSort(), FilterLocalMax(), getConnectedSetBorderContoursThreshold(), getConnectedSetBorderContourThreshold(), getLineContoursThreshold4Connectivity(), getLineContoursThreshold8Connectivity(), GetMaximalResponsePoints(), QVImage< Type, Channels >::operator==(), and QVComponentTree::QVComponentTree().

#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 PixelAccess 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 62 of file qvimage.h.

Referenced by FilterLocalMax(), getConnectedSetBorderContoursThreshold(), getLineContourThreshold4Connectivity(), getLineContourThreshold8Connectivity(), 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 PixelAccess for detailed usage of this macro.

See also:
QVIMAGE_PIXEL_PTR

Definition at line 148 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)]))

Obtains a reference to the memory location of a pixel.

This macro can be used to obtain the location of arbitrary pixels in an image, with a good time performance. See section PixelAccess for detailed usage of this macro.

See also:
QVIMAGE_INIT_READ

QVIMAGE_INIT_WRITE

QVIMAGE_PTR_INIT_READ

QVIMAGE_PTR_INIT_WRITE.

Definition at line 122 of file qvimage.h.

#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 PixelAccess 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 78 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 PixelAccess 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 94 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 PixelAccess for detailed usage of this macro.

See also:
QVIMAGE_PIXEL_PTR

Definition at line 131 of file qvimage.h.




QVision framework. PARP research group, copyright 2007, 2008.