ee554_lib.c file documentation page





* * -- get_image_pels -- * * Author : Noel O'Connor * * * Created : 02/08/2000 * * * Description : Returns a pointer to the pixel (pel) data stored in * an image data structure. * * *** n.b. *** * This function should be used to access an image * data structure rather than the usual * pointer operator: img->pels * * Arguments in : image *img - a pointer to the image data structure * * * Arguments in/out : None * * * Arguments out : None * * * Return values : A pointer to an array of pels * * * Side effects : None * * * See also : * * * Modified : * *
* * -- put_image_width -- * * Author : Noel O'Connor * * * Created : 02/08/2000 * * * Description : Stores the value of the width passed in the * corresponding element of an image data structure. * * *** n.b. *** * These functions should be used to access an image * data structure rather than the usual * pointer operator: img->width * * * Arguments in : image *img - pointer to the image data structure * int width - width of the image * * * Arguments in/out : None * * * Arguments out : None * * * Return values : None * * * Side effects : None * * * See also : get_image_width() * * * Modified : * *
* * -- put_image_height -- * * Author : Noel O'Connor * * * Created : 02/08/2000 * * * Description : Stores the value of the height passed in the * corresponding element of an image data structure. * * *** n.b. *** * These functions should be used to access an image * data structure rather than the usual * pointer operator: img->width * * * Arguments in : image *img - pointer to the image data structure * int width - width of the image * * * Arguments in/out : None * * * Arguments out : None * * * Return values : None * * * Side effects : None * * * See also : get_image_height() * * * Modified : * *
* * -- pgm_read_image -- * * Author : Noel O'Connor * * * Created : 02/08/2000 * * * Description : Reads a PGM format image on disk into an image data * structure. The PGM image on disk must be of type * P5 (i.e. byte PGM). Any existing pixel data in the * image structure will be overwritten. * * *** n.b. *** * (1) It is assumed that memory for the image data * structure is already allocated! * (2) The size of the image in memory and the size * of the image on disk must be equal! * * Note: Allocates a temporary byte buffer, reads * into buffer, and then copies buffer to pels. This * effectively decouples pel data type and PGM format. * As a consequence, currently only 8-bit PGM byte * format is supported. * * * * Arguments in : char *file_name - file name of image file on disk * image *img - pointer to image data structure * to be filled * * * Arguments in/out : None * * * Arguments out : None * * * Return values : None * * * Side effects : None * * * See also : pgm_read_image_header(), pgm_read_image_header_bytes(), * pgm_write_image() * * * Modified : * *
* * -- pgm_read_image_header -- * * Author : Noel O'Connor * * * Created : 02/08/2000 * * * Description : Reads the header information of a PGM format image * file on disk. Useful for finding out the size of * an image on disk prior to allocating memory for * it. * * * Arguments in : char *file_name - file name of PGM image on disk * * * Arguments in/out : None * * * Arguments out : int *width - width of image on disk * int *height - height of image on disk * int *max_gl - maximum grey level in image on disk * * * Return values : None * * * Side effects : None * * * See also : pgm_read_image(), pgm_read_image_header_bytes(), * pgm_write_image() * * * Modified : * *
* * -- pgm_read_image_header_bytes -- * * Author : Noel O'Connor * * * Created : 02/08/2000 * * * Description : Reads the header information of a PGM format image * file on disk from a file pointer which points to the * ***already opened*** file. * * * * Arguments in : FILE *fpfile - file pointer to *opened* image file * * * Arguments in/out : None * * * Arguments out : int *width - width of image on disk * int *height - height of image on disk * int *max_gl - maximum grey level in image on disk * * * Return values : None * * * Side effects : None * * * See also : pgm_read_image(), pgm_read_image_header(), * pgm_write_image() * * * Modified : 13/07/2001 - Vivien Chappelier: fixed bug in parser * *
* * -- calc_MSE_image -- * * Author : Noel O'Connor * * * Created : 02/08/2000 * * * Description : Calculates the Mean Square Error (MSE) between two * input images * * * Arguments in : image *img1 - pointer to the first image * image *img2 - pointer to the second image * * * Arguments in/out : None * * * Arguments out : None * * * Return values : The MSE as a double value * * * Side effects : None * * * See also : calc_PSNR_image() * * * Modified : * *
* * -- estimate_bits_image -- * * Author : Noel O'Connor * * * Created : 02/08/2000 * * * Description : Estimates (very roughly!) the number of bits * required to code an image * * * Arguments in : image *img - pointer to the image * int - indicates whether -ve pel values * are present * (1 -> -ve and +ve pel values) * (0 -> only +ve pel values) * * * Arguments in/out : None * * * Arguments out : None * * * Return values : The estimated number of bits * * * Side effects : None * * * See also : estimate_bits_pel() and estimate_bits_pel_signed() * * * Modified : * *
* * -- estimate_bits_pel -- * * Author : Noel O'Connor * * * Created : 02/08/2000 * * * Description : Estimates (very roughly!) the number of bits * required to code a +ve pel value * * * Arguments in : pel pval - the pel value * * * Arguments in/out : None * * * Arguments out : None * * * Return values : The estimated number of bits * * * Side effects : None * * * See also : estimate_bits_image() and estimate_bits_pel_signed() * * * Modified : * *
* * -- estimate_bits_pel_signed -- * * Author : Noel O'Connor * * * Created : 02/08/2000 * * * Description : Estimates (very roughly!) the number of bits * required to code a pel value where the value * could be -ve or +ve (e.g. a difference image) * * * Arguments in : pel pval - the pel value * * * Arguments in/out : None * * * Arguments out : None * * * Return values : The estimated number of bits * * * Side effects : None * * * See also : estimate_bits_image() and estimate_bits_pel() * * * Modified : * *
* * -- copy_image -- * * Author : Noel O'Connor * * * Created : 02/08/2000 * * * Description : Copies the pixel data of one image to another * (thereby overwriting its contents). Assumes * *both* images are already allocated. * * * Arguments in : image *in - a pointer to the image to be copied * * * Arguments in/out : None * * * Arguments out : image *out - where to copy the input image * * * Return values : None * * * Side effects : None * * * See also : * * * Modified : * *


Last edited: 16-Aug-2001