Topic "image"

IMAGE			    Monash Image Library			IMAGE


The IMAGE structure which this library of routines is based is defined
in "image.h" as:

typedef struct IMAGE_T {
	long	magic;		/* magic number == I_MAGIC */
	long	rows;		/* number of scan lines */
	long	cols;		/* pixels per scan line */
	uchar	**rowbuf;	/* pointer->array of pointers->row buffers */
	long	bitsperpixel;	/* pixel size */
	long	colourspace;	/* Colour Space Flag */
	long 	compression;	/* compressionmethod used in CIF file */
	ulong	flags;		/* I_REGIONFLAG | ... etc */
	struct  IMAGE_T *parent;/* parent image if flags & I_REGIONFLAGS */
	long	identifier;	/* unique handle */
	char	name[I_MAXNAM];	/* name of image */
	uchar	redmap[256];	/* Red colour map, default: linear grey */
	uchar	greenmap[256];	/* Green colour map */
	uchar	bluemap[256];	/* Blue colour map */
        uchar   gammamap[256];  /* Gamma mapping (default linear) */
        uchar   *maskptr;       /* Pointer to position in a mask */
        int     maskpos;        /* Position in a mask */

} IMAGE;	

When using this structure there should be no direct manipulation of these
variables. The routines within the library should provide all the means for
modifying the image structure safely, thus maintaining portability.

The rows, cols and bitsperpixel are the most commonly referenced variables
in the structure. Note the rows indicates vertical size, and colomns
horizontal.

The colourspace flag indicates the colour space of the image (see ihelp
colour).

The compression variable is not presently used.

The possible flags are (these should not be modified):

I_REGIONFLAG	row buffers point to a block in another image
I_CLOSEDFLAG	image has been closed and free'ed - dangling
I_CIEFLAG	image is using CIE illuminants, not NTSC
I_NORMFLAG	colour space values are normalised to 0-1
I_DTOIFLAG	image has been rounded from 192 bpp to int bpp using i_csdtoi
I_MASKFLAG	image is a (spatial array) mask.

The colour maps are for 8 bits per pixel (bpp) colour images.

The possible bits per pixel the image library supports are 8,16,32 bit
integers and 64 bit doubles. These are all single band images. Also
supported are 3-band images: 24,48,96 and 192 bpp.

COMPLEX images use 128 and 384 bits per pixel.

Eventually the bits per pixel variable should be represented by both logical
and physical bits per pixel variables.

Related Functions

icast convert image to newBPP Bits Per Pixel
icut cut out part of an image
idouble doubles the size of the image
ihalf shear 50% both dimensions
imagnify magnification of the image, may not work on binary images.
iname set the name of an image for display. Note that functions that return a new image do not in general copy the name of the target image.
iresize arbitrary resize of an image, may not work on binary images.

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