Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

psImageStats.h

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

Generated on Mon Jul 3 14:13:44 2006 for Pan-STARRS Foundation Library by  doxygen 1.4.4