00001
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _GAN_IMAGE_GL_PYRAMID_H
00030 #define _GAN_IMAGE_GL_PYRAMID_H
00031
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035
00036 #include <gandalf/image/image_defs.h>
00037
00051 typedef struct Gan_ImagePyramid
00052 {
00053 Gan_Image *img;
00054 Gan_Image *mask;
00055 Gan_Bool img_alloc, mask_alloc;
00056 } Gan_ImagePyramid;
00057
00061 typedef enum Gan_ImagePyramidAverage
00062 {
00063 GAN_AVERAGE_ALL,
00064 GAN_AVERAGE_IN_MASK
00065 } Gan_ImagePyramidAverage;
00066
00067 Gan_Image *gan_image_halve_size ( Gan_Image *image, Gan_Image *himage);
00068 Gan_Bool gan_image_pyramid_build_preallocated ( Gan_Image *img, Gan_Image *mask,
00069 unsigned no_levels,
00070 Gan_ImagePyramidAverage average_type,
00071 unsigned no_neighbours,
00072 Gan_Image **imgarray,
00073 Gan_Image **maskarray,
00074 Gan_ImagePyramid **pyramid );
00075 void gan_image_pyramid_free ( Gan_ImagePyramid *pyramid, unsigned no_levels,
00076 Gan_Bool free_top_level );
00077
00099 Gan_Bool gan_image_pyramid_build ( Gan_Image *img, Gan_Image *mask,
00100 unsigned no_levels,
00101 Gan_ImagePyramidAverage average_type,
00102 unsigned no_neighbours,
00103 Gan_ImagePyramid **pyramid );
00104
00113 #ifdef __cplusplus
00114 }
00115 #endif
00116
00117 #endif