Main Page | Modules | Class List | File List | Class Members | File Members

Image Pyramids
[Image Package]


Classes

struct  Gan_ImagePyramid
 Structure to hold image and mask at a single pyramid level. More...

Typedefs

typedef Gan_ImagePyramid Gan_ImagePyramid
 Structure to hold image and mask at a single pyramid level.
typedef enum Gan_ImagePyramidAverage Gan_ImagePyramidAverage
 Type of averaging used when combining four pixels into one.

Enumerations

enum  Gan_ImagePyramidAverage { GAN_AVERAGE_ALL, GAN_AVERAGE_IN_MASK }
 Type of averaging used when combining four pixels into one. More...

Functions

Gan_Imagegan_image_halve_size (Gan_Image *image, Gan_Image *himage)
 Halve the size of an image.
Gan_Bool gan_image_pyramid_build_preallocated (Gan_Image *img, Gan_Image *mask, unsigned no_levels, Gan_ImagePyramidAverage average_type, unsigned no_neighbours, Gan_Image **imgarray, Gan_Image **maskarray, Gan_ImagePyramid **pyramid)
 Builds an image pyramid.using preallocated image buffers passed in.
void gan_image_pyramid_free (Gan_ImagePyramid *pyramid, unsigned no_levels, Gan_Bool free_top_level)
 Frees an image pyramid.
Gan_Bool gan_image_pyramid_build (Gan_Image *img, Gan_Image *mask, unsigned no_levels, Gan_ImagePyramidAverage average_type, unsigned no_neighbours, Gan_ImagePyramid **pyramid)
 Macro: Builds an image pyramid.

Enumeration Type Documentation

enum Gan_ImagePyramidAverage
 

Type of averaging used when combining four pixels into one.

Enumeration values:
GAN_AVERAGE_ALL  take average of all four pixels
GAN_AVERAGE_IN_MASK  take average only of pixels in the mask


Function Documentation

Gan_Image * gan_image_halve_size Gan_Image image,
Gan_Image himage
 

Halve the size of an image.

Parameters:
image Input image
himage Output image or NULL
Returns:
Result image or NULL with error on failure.

Gan_Bool gan_image_pyramid_build Gan_Image img,
Gan_Image mask,
unsigned  no_levels,
Gan_ImagePyramidAverage  average_type,
unsigned  no_neighbours,
Gan_ImagePyramid **  pyramid
 

Macro: Builds an image pyramid.

Parameters:
img The top-level image in the pyramid
mask The mask corresponding to the top-level image or NULL
no_levels The number of levels in the pyramid
average_type The type of averaging of four-pixel neighbourhoods
no_neighbours Minimum number of neighbours set to transfer resolution
pyramid Pointer to the pyramid
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Builds an image pyramid. If the mask is NULL, the pyramid is built without masks, i.e. assuming that all the pixels are valid.

no_neighbours is the least number of number of pixels in any four-pixel neighbourhood of mask pixels needed to be one in order for the lower resolution mask to be set to one.

This is a macro call to gan_image_pyramid_build_preallocated().

See also:
gan_image_pyramid_free().

Gan_Bool gan_image_pyramid_build_preallocated Gan_Image img,
Gan_Image mask,
unsigned  no_levels,
Gan_ImagePyramidAverage  average_type,
unsigned  no_neighbours,
Gan_Image **  imgarray,
Gan_Image **  maskarray,
Gan_ImagePyramid **  pyramid
 

Builds an image pyramid.using preallocated image buffers passed in.

Parameters:
img The top-level image in the pyramid
mask The mask corresponding to the top-level image or NULL
no_levels The number of levels in the pyramid
average_type The type of averaging of four-pixel neighbourhoods
no_neighbours Minimum number of neighbours set to transfer resolution
imgarray Array of at least no_levels-1 preallocated image buffers or NULL
maskarray Array of at least no_levels-1 preallocated mask buffers or NULL
pyramid Pointer to the pyramid
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Builds an image pyramid. If the mask is NULL, the pyramid is built without masks, i.e. assuming that all the pixels are valid.

no_neighbours is the least number of number of pixels in any four-pixel neighbourhood of mask pixels needed to be one in order for the lower resolution mask to be set to one.

See also:
gan_image_pyramid_free().

void gan_image_pyramid_free Gan_ImagePyramid pyramid,
unsigned  no_levels,
Gan_Bool  free_top_level
 

Frees an image pyramid.

Parameters:
pyramid Pointer to the pyramid
no_levels The number of levels in the pyramid
free_top_level Whether to free the top level image
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Frees an image pyramid. The free_top_levels flag indicates whether the top-level image should be freed.

See also:
gan_image_pyramid_build().


Generated on Fri Mar 17 12:45:01 2006 by  doxygen 1.3.9.1