#include <gandalf/common/bit_array.h>
#include <stdlib.h>
#include <gandalf/common/misc_defs.h>
#include <gandalf/image/image_defs.h>
Go to the source code of this file.
Defines | |
#define | GAN_PIXEL Gan_BitWord |
#define | GAN_PIXEL_FORMAT grey-level |
#define | GAN_PIXEL_TYPE Gan_Bool |
#define | GAN_IMTYPE b |
#define | GAN_IMAGE_FORM_GEN gan_image_form_gen_b |
#define | GAN_IMAGE_SET_GEN gan_image_set_gen_b |
#define | GAN_IMAGE_ALLOC gan_image_alloc_b |
#define | GAN_IMAGE_ALLOC_DATA gan_image_alloc_data_b |
#define | GAN_IMAGE_FORM gan_image_form_b |
#define | GAN_IMAGE_FORM_DATA gan_image_form_data_b |
#define | GAN_IMAGE_SET gan_image_set_b |
#define | GAN_IMAGE_SET_PIX gan_image_set_pix_b |
#define | GAN_IMAGE_GET_PIX gan_image_get_pix_b |
#define | GAN_IMAGE_FILL_CONST gan_image_fill_const_b |
#define | GAN_IMAGE_GET_ACTIVE_SUBWINDOW gan_image_get_active_subwindow_b |
#define | GAN_IMAGE_MASK_WINDOW gan_image_mask_window_b |
#define | GAN_BITMAP |
Functions | |
Gan_Image * | gan_image_set_gen_b (struct Gan_Image *img, unsigned long height, unsigned long width, unsigned long stride, Gan_Bool alloc_pix_data) |
Gan_Image * | gan_image_form_gen_b (struct Gan_Image *img, unsigned long height, unsigned long width, unsigned long stride, Gan_Bool alloc_pix_data, Gan_BitWord *pix_data, size_t pix_data_size, Gan_BitWord **row_data, size_t row_data_size) |
Gan_Bool | gan_image_get_active_subwindow_b (Gan_Image *image, Gan_Alignment alignment, Gan_ImageWindow *subwin) |
Computes bounding box of non-zero pixels in binary image. | |
Gan_Bool | gan_image_mask_window_b (Gan_Image *pImage, unsigned r0, unsigned c0, unsigned height, unsigned width) |
Clear binary image except in specified rectangular region. | |
Gan_Image * | gan_image_alloc_b (unsigned long height, unsigned long width) |
Macro: Allocate and return a new grey-level image with type Gan_Bool. | |
Gan_Image * | gan_image_form_b (Gan_Image *img, unsigned long height, unsigned long width) |
Macro: Forms and returns a new grey-level Gan_Bool image. | |
Gan_Image * | gan_image_alloc_data_b (unsigned long height, unsigned long width, unsigned long stride, Gan_BitWord *pix_data, size_t pix_data_size, Gan_BitWord **row_data, size_t row_data_size) |
Macro: Allocates and returns a new grey-level Gan_Bool image. | |
Gan_Image * | gan_image_form_data_b (Gan_Image *img, unsigned long height, unsigned long width, unsigned long stride, Gan_BitWord *pix_data, size_t pix_data_size, Gan_BitWord **row_data, size_t row_data_size) |
Macro: Forms and returns a new grey-level Gan_Bool image. | |
Gan_Image * | gan_image_set_b (Gan_Image *img, unsigned long height, unsigned long width) |
Macro: Set an existing image to be grey-level with type Gan_Bool. | |
Gan_Bool | gan_image_set_pix_b (Gan_Image *img, unsigned row, unsigned col, Gan_Bool pix) |
Macro: Set a pixel in a grey-level Gan_Bool image. | |
Gan_BitWord | gan_image_get_pix_b (Gan_Image *img, unsigned row, unsigned col) |
Macro: Return a pixel from a grey-level Gan_Bool image. | |
Gan_Bool | gan_image_fill_const_b (Gan_Image *img, Gan_Bool pix) |
Macro: Fills all the pixels in a grey-level Gan_Bool image. | |
Gan_Bool | gan_image_bit_get_pix_4group (Gan_Image *image, unsigned row, unsigned col) |
Test local group of four binary pixels. | |
Gan_Bool | gan_image_bit_get_pix_5group (Gan_Image *image, unsigned row, unsigned col) |
Test local group of five binary pixels. | |
Gan_Bool | gan_image_bit_get_pix_3group_horiz (Gan_Image *image, unsigned row, unsigned col) |
Test local group of three binary pixels in a row. | |
Gan_Bool | gan_image_bit_get_pix_3group_vert (Gan_Image *image, unsigned row, unsigned col) |
Test local group of three binary pixels in a column. | |
int | gan_image_get_pixel_count_b (Gan_Image *image, Gan_Bool val, Gan_ImageWindow *subwin) |
Returns number of pixels set or unset in the given binary image. | |
Gan_Image * | gan_image_bit_invert_q (Gan_Image *image, Gan_Image *result_image) |
Invert binary image. | |
Gan_Image * | gan_image_bit_and_q (Gan_Image *image1, Gan_Image *image2, Gan_Image *result_image) |
Binary AND of all pixels in a binary image. | |
Gan_Image * | gan_image_bit_nand_q (Gan_Image *image1, Gan_Image *image2, Gan_Image *result_image) |
Binary NAND of all pixels in a binary image. | |
Gan_Image * | gan_image_bit_or_q (Gan_Image *image1, Gan_Image *image2, Gan_Image *result_image) |
Binary OR of all pixels in a binary image. | |
Gan_Image * | gan_image_bit_eor_q (Gan_Image *image1, Gan_Image *image2, Gan_Image *result_image) |
Binary EOR of all pixels in a binary image. | |
Gan_Image * | gan_image_bit_andnot_q (Gan_Image *image1, Gan_Image *image2, Gan_Image *result_image) |
Binary AND-NOT of all pixels in a binary image. | |
Gan_Bool | gan_image_bit_fill_row (Gan_Image *image, unsigned y, unsigned x, unsigned width, Gan_Bool pix) |
Fill part of a row of a binary image. | |
Gan_Bool | gan_image_bit_invert_row (Gan_Image *image, unsigned y, unsigned x, unsigned width) |
Invert part of a row of a binary image. | |
Gan_Image * | gan_image_bit_invert_s (Gan_Image *image) |
Macro: Invert binary image. | |
Gan_Image * | gan_image_bit_invert_i (Gan_Image *image) |
Macro: Invert binary image. | |
Gan_Image * | gan_image_bit_and_s (Gan_Image *image1, Gan_Image *image2) |
Binary AND of all pixels in a binary image. | |
Gan_Image * | gan_image_bit_nand_s (Gan_Image *image1, Gan_Image *image2) |
Binary NAND of all pixels in a binary image. | |
Gan_Image * | gan_image_bit_or_s (Gan_Image *image1, Gan_Image *image2) |
Binary OR of all pixels in a binary image. | |
Gan_Image * | gan_image_bit_eor_s (Gan_Image *image1, Gan_Image *image2) |
Binary EOR of all pixels in a binary image. | |
Gan_Image * | gan_image_bit_andnot_s (Gan_Image *image1, Gan_Image *image2) |
Binary AND-NOT of all pixels in a binary image. | |
Gan_Image * | gan_image_bit_and_i (Gan_Image *result, Gan_Image *image) |
Binary AND of all pixels in a binary image. | |
Gan_Image * | gan_image_bit_nand_i (Gan_Image *result, Gan_Image *image) |
Binary NAND of all pixels in a binary image. | |
Gan_Image * | gan_image_bit_or_i (Gan_Image *result, Gan_Image *image) |
Binary OR of all pixels in a binary image. | |
Gan_Image * | gan_image_bit_eor_i (Gan_Image *result, Gan_Image *image) |
Binary EOR of all pixels in a binary image. | |
Gan_Image * | gan_image_bit_andnot_i (Gan_Image *result, Gan_Image *image) |
Binary AND-NOT of all pixels in a binary image. |
Part of: Gandalf Library
Revision: Last edited: Author:
Copyright: (c) 2000 Imagineer Software Limited
|
Binary
AND operation to two input binary images image1 and image2, writing the result into result. |
|
Binary
AND-NOT operation to two input binary images image1 and image2, writing the result into result. |
|
Binary
EOR operation (exclusive OR) to two input binary images image1 and image2, writing the result into result. |
|
Fill part of a row of a binary image. Fill part of a row of a binary image, starting at position x, y and filling width pixels to the right. |
|
Test local group of three binary pixels in a row. Return GAN_TRUE if bits at positions (row,col), (row,col-1) and (row,col+1) are all set to one (true), or GAN_FALSE otherwise. |
|
Test local group of three binary pixels in a column. Return GAN_TRUE if bits at positions (row,col), (row-1,col) and (row+1,col) are all set to one (true), or GAN_FALSE otherwise. |
|
Test local group of four binary pixels. Return GAN_TRUE if bits at positions (row,col), (row,col+1), (row+1,col) and (row+1,col+1) are all set to one (true), or GAN_FALSE otherwise. |
|
Test local group of five binary pixels. Return GAN_TRUE if bits at positions (row,col), (row,col-1), (row,col+1), (row-1,col) and (row+1,col) are all set to one (true), or GAN_FALSE otherwise. |
|
Invert binary image.
|
|
Invert part of a row of a binary image. Invert part of a row of a binary image, starting at position x, y and filling width pixels to the right. |
|
Binary
NAND operation (not AND) to two input binary images image1 and image2, writing the result into result. |
|
Binary
OR operation to two input binary images image1 and image2, writing the result into result. |
|
Returns number of pixels set or unset in the given binary image.
If val is passed as GAN_TRUE, returns the number of pixels set to one (true) in the given image. If val is GAN_FALSE, counts the number of zeros instead. If subwin is not |