Topic "rgb"

RGB			   Monash Image Library				RGB


Most image library routines have been written for single band 8 bpp images,
although some will also work with 16, 32 and even 64 bpp images. To apply
these routines to 3-band images the image must be split into its three
bands.

When programming in C, this can be achieved using the routines i_rgbsplit(), 
i_rgbextract and i_rgbmerge().

When using the Unix shell, the -b flag may be specified to indicate that
this is a three band image, and that you want to apply a single band routine
to each band of the 3-band image.

eg.
-b1 indicates that the routine should be applied to only the first band,
-b23 indicates that the routine should be applied to the second and third
-bands, and -ba will apply the routine to all three bands.

Note that a 3-band image is usually the result when using these flags, and
that there are some routines where this will result in an error if the
resulting images cannot be merged (eg: ihalf on one band only).

Pixel manipulation with three band images is more difficult as the pixel in
each band much modified individually. i_getrgb and i_putrgb may can be used
if all three values are to be modified at once.

Note: All these functions do not check or use the colour space information
of an image.
 

Related Functions

i24to8 merges three bands into one 8 bpp colour image
idefcolour set monash default colour map
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
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
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
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
igreyramp linear grey scale colour map
iis1band returns 1 if bpp = 8, 16, 32 or 64
iis3band returns 1 if bpp = 8, 24, 32, 48, 96 or 192 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
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
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
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
irgbcorrelate calcuate the correlation coeficients between the bands of a three band image. Returns an array of three doubles as there are three combinations of coefficients eg Red-Green, Red-Blue and Green-Blue.
irgbextract extract all three bands from an rgb image
irgbmerge merge 3 images -> single 24bit rgb format image
irgbsplit extract red, green or blue band from a colour image
irgbto8 median split rgb 24bit -> colour mapped 8 bit
irgbtogrey convert from rgb to grey (NTSC luminance)

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