/*
 * processimage.h
 *
 * Prototype of the function 'processImage()'.
 *
 * See the implementation file 'processimage.c' for comments.
 */


#ifndef _PROCESSIMAGE_H_
#define _PROCESSIMAGE_H_


#include "comp.h"     /* comp_t  */
#include "image.h"    /* image_t, pix_t, pixel values.  */

#include "lineacc.h"  /* lineAcc_t  */
#include "lmap.h"     /* lm_t  */



/*
 * processImage()
 *    -- Find the pixel counts, centers-of-mass, and bounding boxes of
 *       all the four-connected components in a binary (black-or-white) 
 *       image.
 *
 * Parameters:
 * 
 *    in_pImg          = The input image.  Pixels must have value
 *                       either 0x00 (blank) or 0xff (component pixel).
 *
 *    io_pLineAcc      = Pointer to lineAcc_t instance.  Used internally
 *                       in the function to hold component label IDs for 
 *                       the pixels in one line.
 *   
 *    io_pLabelMap     = Pointer to lm_t instance.  Used internally in the
 *                       function to store all data for each component label.
 *
 *    usrOutComp       = User-defined function.  Called once for each 
 *                       completed component.  This is how the output 
 *                       components are transferred to the caller.
 *
 * See implementation file 'processimage.c' for more comments.
 */
void processImage(
	image_t const *  in_pImg,      
	lineAcc_t *      io_pLineAcc,  
	lm_t *           io_pLabelMap, 
	void             (*usrOutComp)( comp_t const * ) );



#endif /*_PROCESSIMAGE_H_ */