psImageStats.h

Go to the documentation of this file.
00001 /* @file psImageStats.h
00002  *
00003  * @brief Routines for calculating statistics on images.
00004  *
00005  * This file will hold the prototypes for procedures which calculate
00006  * statistic on images, histograms on images, and fit/evaluate Chebyshev
00007  * polynomials to images.
00008  *
00009  * @author GLG, MHPCC
00010  *
00011  * @version $Revision: 1.30 $ $Name:  $
00012  * @date $Date: 2007/01/23 22:47:23 $
00013  * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
00014  */
00015 
00016 #ifndef PS_IMAGE_STATS_H
00017 #define PS_IMAGE_STATS_H
00018 
00019 /// @addtogroup ImageOps Image Operations
00020 /// @{
00021 
00022 #include "psType.h"
00023 #include "psVector.h"
00024 #include "psImage.h"
00025 #include "psStats.h"
00026 #include "psHistogram.h"
00027 #include "psPolynomial.h"
00028 #include "psRegion.h"
00029 
00030 /** This routine must determine the various statistics for the image.
00031  *
00032  *  Determine statistics for image (or subimage). The statistics to be
00033  *  determined are specified by stats. The mask allows pixels to be excluded
00034  *  if their corresponding mask pixel value matches the value of maskVal.
00035  *  This function must be defined for the following types: psS8, psU16, psF32,
00036  *  psF64.
00037  *
00038  *  @return psStats*    the resulting statistics result(s)
00039  */
00040 psStats* psImageStats(
00041     psStats* stats,                    ///< defines statistics to be calculated
00042     const psImage* in,                 ///< image (or subimage) to calculate stats
00043     const psImage* mask,               ///< mask data for image (NULL ok)
00044     psMaskType maskVal                 ///< mask value for mask
00045 );
00046 
00047 /** Construct a histogram from an image (or subimage).
00048  *
00049  *  The histogram to generate is specified by psHistogram hist (see section
00050  *  4.3.2 in SDRS). This function must be defined for the following types:
00051  *  psS8, psU16, psF32, psF64.
00052  *
00053  *  @return psHistogram*     the resulting histogram
00054  */
00055 psHistogram* psImageHistogram(
00056     psHistogram* out,                  ///< input histogram description & target
00057     const psImage* in,                 ///< Image data to be histogramed.
00058     const psImage* mask,               ///< mask data for image (NULL ok)
00059     psMaskType maskVal                 ///< mask Mask for mask
00060 );
00061 
00062 /** Fit a 2-D polynomial surface to an image.
00063  *
00064  *  The input structure coeffs contains the desired order and terms of
00065  *  interest. This function must be defined for the following types: psS8,
00066  *  psU16, psF32, psF64.
00067  *
00068  *  @return psPolynomial2D*     fitted polynomial result
00069  *
00070  */
00071 psPolynomial2D* psImageFitPolynomial(
00072     psPolynomial2D* coeffs,            ///< coefficient structure carries in desired terms & target
00073     const psImage* input               ///< input image
00074 );
00075 
00076 /** Evaluate a 2-D polynomial surface for the image pixels.
00077  *
00078  *  Given the input polynomial coefficients, set the image pixel values on the
00079  *  basis of the polynomial function. This function must be defined for the
00080  *  following types: psS8, psU16, psF32, psF64.
00081  *
00082  *  @return psImage*    the resulting image
00083  */
00084 psImage* psImageEvalPolynomial(
00085     psImage* input,                    ///< input image
00086     const psPolynomial2D* coeffs       ///< coefficient structure carries in desired terms
00087 );
00088 
00089 /** Returns the number of pixels in the image region which satisfy any of the mask bits.
00090  *
00091  *  An error (eg, invalid image, invalid region) results in a return value of -1.
00092  *  The vector must be U8.
00093  *
00094  *  @return long:       the number of pixels counted
00095  */
00096 long psImageCountPixelMask(
00097     psImage *mask,                     ///< input image to count
00098     psRegion region,                   ///< input region of image
00099     psMaskType value                   ///< the mask value to satisfy
00100 );
00101 
00102 /// @}
00103 #endif // #ifndef PS_IMAGE_STATS_H

Generated on Fri Feb 2 22:24:35 2007 for pslib by  doxygen 1.5.1