00001 /** @file pmFlatField.h 00002 * 00003 * @brief Given an input image and a flat field image, pmFlatField shall divide the input image by the flat 00004 * field image. 00005 * 00006 * The input image, in, and the flat field image, flat, need not be the same size, since the input image may 00007 * already have been trimmed (following overscan subtraction), but the function shall use the offsets in the 00008 * image (in->x0 and in->y0) to determine the appropriate offsets to obtain the correct pixel on the flat 00009 * field. In the event that the flat image is too small (i.e., pixels on the input image refer to pixels 00010 * outside the range of the flat image), the function shall generate an error. Pixels which are negative or 00011 * zero in the flat shall be masked in the input image with the value PM_MASK_FLAT. Negative pixels in the 00012 * flat may be set to zero so that they are treated identically to zeroes. Any pixels masked in the flat 00013 * shall be masked with corresponding values in the output. The function shall not normalize the flat; this 00014 * responsibility is left to the caller. This function is basically equivalent to a divide (with psImageOp), 00015 * but with care for the region that is divided, checking for negative pixels, and copying of the mask from 00016 * the flat to the output. 00017 * 00018 * @author Ross Harman, MHPCC 00019 * 00020 * @version $Revision: 1.1.1.1 $ $Name: $ 00021 * @date $Date: 2005/10/14 00:29:27 $ 00022 * 00023 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 00024 */ 00025 00026 #include "pslib.h" 00027 #include "pmAstrometry.h" 00028 00029 00030 /** Execute flat field module. 00031 * 00032 * Given an input image and a flat-field image, pmFlatField shall divide the input image by the flat field 00033 * image. 00034 * 00035 * @return bool: True or false for success or failure 00036 */ 00037 bool pmFlatField( 00038 pmReadout *in, ///< Readout with input image 00039 pmReadout *mask, ///< Input image mask 00040 const pmReadout *flat ///< Readout with flat image 00041 ); 00042
1.4.2