Topic "pixel"

PIXEL			    Monash Image Library			PIXEL

To support many different pixel sizes, there are many functions for getting
and putting pixel values. These functions account for integer, double and
COMPLEX pixel sizes, one and three band images, and the colour space of the
image.

For most applications, i_getpix is the most appropiate function for
obtaining pixel values from an image, as this function will work on 8, 16
and 32 bpp images. The same goes for i_putpix for putting pixel values into
images.

If specific bits per pixel images are being used, a programs efficiency can
be improved by using functions which do not check the bpp of the image. Such
functions are i_getlong, i_putshort etc. Once a program is stable, the
efficiency can be improved even further by including this in the program
(before the include for image.h):

#define FAST

This specifies more efficient macros for the functions which do not check
the bounds of the image.  If mapped image access is being used (see "ihelp
mapping") then you must also define (before the include for image.h):

#define REMAP_ON_FLY

All three band images must use i_getred, i_getgreen and i_getblue functions
which account for colour maps (in 8 bpp images) and the different storage
formats of pixels (24 bpp compared to 32 bpp). If all three values are being
manipulated at once then functions such as i_getrgb should be used as this
is faster.

The colour space pixel functions convert the pixels to/from the colour space
specified.

Related Functions

icsgetpixel returns the pixel values for the cs using NTSC=0 or XYZ=1 xyz
icsputpixel sets the pixel at row, col to the values of the cs specified
igetany return double pixel in image at row,col of 8, 16, 32 or 64 bpp
igetblue return blue component of coloured pixel in image at row,col
igetcblue get blue component value from 384 bpp images
igetcgreen get green component value from 384 bpp images
igetcomplex return 128 bit COMPLEX pixel value (using struct assignments)
igetcred get red component value from 384 bpp images
igetdblue get blue component value from 8,24,32,48,96, 192 bpp images
igetdgreen get green component value from 8,24,32,48,96, 192 bpp images
igetdouble return 64 bit double floating point pixel value
igetdred get red component value from 8,24,32,48,96, 192 bpp images
igetdrgb get red,green & blue values from 8,24,32,48,96 or 192 bpp image
igetgreen return green component of colougreen pixel in image at row,col
igetlong return 32 bit long pixel value
igetpix return integer pixel in image at row,col
igetred return red component of coloured pixel in image at row,col
igetrgb get red, green & green values from 8,24,32,48 or 96 bpp image
igetshort return 16 bit short pixel value
igetuchar return 8 bit unsigned pixel value
iputany put double pixel in image at row,col of 8, 16, 32 or 64 bpp
iputblue put blue component of coloured pixel in image at row,col
iputcblue put blue component value into 384 bpp image
iputcgreen put green component value into 384 bpp image
iputcomplex put 128 bit COMPLEX pixel value, using struct assignments
iputcred put red component value into 384 bpp image
iputdblue put blue component value into 8,24,32,48,96 or 192 bpp image
iputdgreen put green component value into 8,24,32,48,96, or 192 bpp image
iputdouble put 64 bit double floating point pixel value
iputdred put red component value into 8,24,32,48,96, or 192 bpp image
iputdrgb put red, green & blue values in 8,24,32,48,96 or 192 bpp image
iputgreen put green component of coloured pixel in image at row,col
iputlong put 32 bit long pixel value
iputpix put integer pixel in image at row,col of 8, 16 or 32 bpp image
iputred put red component of coloured pixel in image at row,col
iputrgb put red, green & blue values into 8,24,32,48 or 96 bpp image
iputshort put 16 bit short pixel value
iputuchar put 8 bit unsigned pixel value

Other Topics

index | userguide | full | arithmetic | basic | binary | blocks | colour | compress | display | docs | fft | hist | image | io | makefile | masks | memory | misc | morph | pixel | rgb | stats | transform | error | mapping