#include <dvmimap.h>
An ImageMap performs lookup table operation on a ByteImage to another.
typedef struct ImageMap { unsigned char table[256]; int dimension; } ImageMap;
- table
- Table of lookup values. Value i will be mapped to table[i].
- dimension
- The intention of this slot is to indicate what type of ImageMap it is. The setting dimension=1 indicates that the ImageMap should be applied on one ByteImage, and is currently the only valid value.
ImageMap *ImageMapNew()
This function creates a new ImageMap and returns a handle to it. The contents of the map are undefined.
void ImageMapFree (ImageMap *map)
Free the memory allocated for ImageMap map.
void ImageMapCopy (ImageMap *src, ImageMap *dest)
Copies the lookup table entries from src into dest.
void ImageMapInit (ImageMap *map, unsigned char *values)
Initializes the entries of map using values.
The parameter values must be an array of 256 integers in the range 0..255. The entries are copied, so values can be freed after this operation completes.
void ImageMapInitIdentity(Image *map)
Initializes map to the identity function (i.e., the value of entry i is i).
void ImageMapInitInverse(Image *map)
Initializes map to the complement function (i.e., the value of entry i is 255-i)
void ImageMapInitHistoEqual(ByteImage *image, ImageMap *map)
Sets the values of map so that they will perform histogram equalization on image.
void ImageMapCompose (ImageMap *map1, ImageMap *map2, ImageMap *dest)
Compute the composition of map1 and map2 and store it in dest. Applying dest to a ByteImage is equivalent to applying map1 and then applying map2 to that image.
void ImageMapApply (ImageMap *map, ByteImage *src, ByteImage *dest)
Applies map to src and stores the result in dest. Src and dest should have the same dimensions.
unsigned char *ImageMapGetValues (ImageMap *map)
This macro returns a pointer to the lookup table of map. This pointer is just the table slot in the ImageMap structure.
Last updated : Saturday, November 14, 1998, 07:50 PM