**************************************************************************** * LIST OF C-PROGRAMS FROM A BOOK BY RANDY CRANE * Title: A simplified approach to image processing * Source: http://math.ewha.ac.kr/~jylee/SciComp/dip-crane **************************************************************************** iplib.c * File: iplib.c * * Desc: general purpose image processing routines * * Func: read_pnm * * Desc: reads a portable bitmap file * * Func: getnum * * Desc: reads an ASCII number from a portable bitmap file header * * Func: write_pnm * * Desc: writes out a portable bitmap file * * Func: pnm_open * * Desc: opens a pnm file and determines rows, cols, and maxval * * Func: read_mesh * * Desc: reads mesh data into a mesh structure * ============================================================= = Images : Sample Images ============================================================= images/birdgirl.pgm images/bullfigt.ppm images/painter.pgm images/trainsta.pgm ============================================================= = CHAPTER 1 : Introduction ============================================================= chapter1/list1_1.c * Func: rgb2hsi * * Desc: converts a value from RGB to HSI color space * chapter1/list1_2.c * Func: hsi2rgb * * Desc: converts a value from HSI to RGB color space * ============================================================= = CHAPTER 2 : Point Processing ============================================================= chapter2/list2_1.c * File: arithlut.c * * Desc: This program performs arithmetic point operations via LUTs * chapter2/list2_2.c * Func: histogram_equalize * * Desc: histogram equalize an input image and write it out * chapter2/list2_3.c * Func: histogram_specification * * Desc: perform histogram specification on an input image * chapter2/list2_4.c * Func: auto_contrast_stretch * * Desc: performs basic contrast stretching on an image * chapter2/list2_5.c * Func: e_i_contrast * * Desc: perform ends-in contrast stretch on image * ============================================================= = CHAPTER 3 : Area Processes ============================================================= chapter3/list3_1.c * Func: convolve * * Desc: convolves an image with the floating point kernel passed and * chapter3/list3_2.c * Func: homog_op * * Desc: detects edges in an image using the homogeneity operator * * Func: homogeneity * * Desc: finds edges in an image window * chapter3/list3_3.c * Func: difference * * Desc: finds edges in an image window using the difference operator * chapter3/list3_5.c * Func: median_filt * * Desc: median filters an image using a block mask * * Func: median * * Desc: finds median value of an image block * * Func: quicksort * * Desc: sorts an array of integers using the quicksort algorithm * * Func: swap * * Desc: swaps two elements in an array * chapter3/list3_6.c * Func: color_median * * Desc: Median filters a color image by finding the median of RGB using * * Func: find_color_median * * Desc: computes median pixel of group by determining the lowest sum of * ============================================================= = CHAPTER 4 : Geometric Processes ============================================================= chapter4/list4_3.c * Func: cubic_interpolation * * Desc: takes 16 unsigned characters in an array and outputs the results * chapter4/list4_4.c * Func: spline_interpolation * * Desc: takes 16 unsigned characters in an array and outputs the results * chapter4/list4_5.c * Func: scale_pnm * * Desc: scale an image using nearest neighbor interpolation * chapter4/list4_6.c * Func: median_shrink * * Desc: reduces an image using median representation * chapter4/list4_7.c * Func: average_shrink * * Desc: Reduces an image using pixel averages * * Func: average * * Description: calculates the average of an array of numbers * chapter4/list4_8.c * Func: rotate_pgm * * Desc: rotate an image some arbitrary angle. New pixels are generated * chapter4/list4_9.c * Func: rotate_90 * * Desc: rotates an image clockwise by simply transposing rows. * chapter4/list4_10.c * Func: trans_pgm * * Desc: translates a block in an image * ============================================================= = CHAPTER 5 : Frame Processes ============================================================= chapter5/list5_1.c * File: frame.c * * Desc: This program performs frame operations between 2 images * ============================================================= = CHAPTER 6 : Digital Halftone ============================================================= chapter6/list6_1.c * Func: pattern * * Desc: halftones a gray-scale image via patterning and writes a pbm file * chapter6/list6_2.c * Func: dither * * Desc: dithers a pgm file, writes out a pbm file * chapter6/list6_3.c * Func: error_diffusion * * Desc: halftones an image via error diffusion, implements the zig-zag * ============================================================= = CHAPTER 7 : Image Transforms ============================================================= chapter7/list7_1.c * Func: twoD_FFT * * Desc: performs an FFT on image data * * Func: fft * * Desc: performs forward and reverse Fast Fourier Transform * * Func: scramble * * Desc: Scrambles the input data by swapping data with data in * * Func: butterflies * * Desc: Calculates the butterflies for data in fft * chapter7/list7_2.c * Func: filter * * Desc: filters an array of complex data (assumes data is unordered) * chapter7/list7_3.c * Func: dct * * Desc: forward Discrete Cosine Transform on MxN array * chapter7/list7_4.c * Func: inv_dct * * Desc: performs an inverse Discrete Cosine Transform on an MxN array * ============================================================= = CHAPTER 8 : Image Warping and Morphing ============================================================= chapter8/list8_1.c * Func: affine * * Desc: performs an affine transformation on a PPM or PGM image in memory * chapter8/list8_2.c * Func: perspective * * Desc: performs a perspective transformation and writes out image file * chapter8/list8_3.c * Func: bilinear * * Desc: performs a bilinear transformation and writes out image file * chapter8/list8_4.c * Func: bilinear * * Desc: performs a bilinear transformation and writes out image file * chapter8/list8_5.c * Func: mesh_warp * * Desc: performs 2-pass mesh warp using Douglas Smythe's algorithm * chapter8/list8_6.c * Func: interp * * Desc: This function inputs a set of knots and outputs an array of values * chapter8/list8_7.c * Func: fant_resample * * Desc: performs resample of image row or column using Fant's resampling * chapter8/list8_8.c * Func: fields_warp * * Desc: warps an image base on the fields warping algorithm presented in * ============================================================= = CHAPTER 9 :Image Compression ============================================================= chapter9/list9_1.c