Changeset 1105
- Timestamp:
- Jun 25, 2004, 2:37:55 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/archive/modules/include/phase2.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/archive/modules/include/phase2.h
r975 r1105 24 24 /* Convolution */ 25 25 26 /** A convolution kernel */ 27 typedef struct { 28 int xMin, yMin; ///< Most negative indices 29 int xMax, yMax; ///< Most positive indices 30 float **kernel; ///< The kernel data 31 } psKernel; 32 33 /** Constructor */ 34 psKernel *psKernelAlloc(int xMin, ///< Size of the kernel in the negative x direction 35 int xMax, ///< Size of the kernel in the positive x direction 36 int yMin, ///< Size of the kernel in the negative y direction 37 int yMax ///< Size of the kernel in the positive y direction 38 ); 39 /** Destructor */ 40 void psKernelFree(psKernel *myKernel ///< Kernel to destroy 41 ); 42 26 43 /** Returns the kernel of OT shifts made during the course of the exposure. */ 27 psImage *psPhase2GetKernel(psVector *xShifts, ///< List of OT shifts in x; integers 28 psVector *yShifts ///< List of OT shifts in y; integers; xshifts->n == yShifts->n 29 ); 44 psKernel *psPhase2GetKernel(const psVector *xShifts, ///< List of OT shifts in x; integers 45 const psVector *yShifts ///< List of OT shifts in y; integers; 46 ///< xshifts->n == yShifts->n 47 ); 30 48 31 49 /** Returns an image that is the result of convolving the input image with the specified kernel. */ 32 psImage *psPhase2ConvolveWithKernel(psImage *out, ///< Output image, or NULL 33 const psImage *in, ///< Input image to be convolved 34 const psImage *kernel ///< Kernel by which to convolve 35 ); 50 psImage *psConvolveWithKernel(psImage *out, ///< Output image, or NULL 51 const psImage *in, ///< Input image to be convolved 52 const psKernel *kernel, ///< Kernel by which to convolve 53 bool direct ///< Do direct convolution? If not, use FFT 54 ); 36 55 37 56 /************************************************************************************************************/ … … 55 74 ); 56 75 76 /** A 1D cubic-spline */ 77 typedef struct { 78 int n; ///< Number of spline pieces 79 float *coeff[4]; ///< Coefficients. There are 4 coefficients for each spline piece. 80 float *coeffErr[4]; ///< Errors in the coefficients. 81 bool *mask[4]; ///< Mask for the coefficients. 82 float *domains; ///< The boundaries between each spline piece. Size is n+1. 83 } psSpline1D; 84 85 /** Constructors */ 86 psSpline1D *psSpline1DAlloc(int n, ///< Number of spline pieces 87 float min, ///< Minimum data value 88 float max ///< Maximum data value 89 ); 90 psSpline1D *psSpline1DAllocGeneric(const psVector *bounds ///< Boundaries between each spline piece. Number 91 ///< of spline pieces can hence be inferred. 92 ); 93 /** Destructor */ 94 void psSpline1DFree(psSpline1D *mySpline ///< Spline to destroy 95 ); 96 /** Evaluator */ 97 float psSpline1DEval(const psSpline1D *spline, ///< Spline to evaluate 98 float x ///< Coordinates at which to evaluate 99 ); 100 101 57 102 /** Overscan axis */ 58 103 typedef enum { 59 PS_OVERSCAN_NONE = 0, ///< No overscan subtraction 60 PS_OVERSCAN_ROWS = 1, ///< Subtract rows 61 PS_OVERSCAN_COLUMNS = 2, ///< Subtract columns 62 PS_OVERSCAN_ROWS_FIT = -1, ///< Subtract a fit to rows 63 PS_OVERSCAN_COLUMNS_FIT = -2, ///< Subtract a fit to columns 64 PS_OVERSCAN_ALL = 3 ///< Subtract the statistic of all pixels in overscan region 104 PS_OVERSCAN_NONE, ///< No overscan subtraction 105 PS_OVERSCAN_ROWS, ///< Subtract rows 106 PS_OVERSCAN_COLUMNS, ///< Subtract columns 107 PS_OVERSCAN_ALL ///< Subtract the statistic of all pixels in overscan region 65 108 } psOverscanAxis; 109 110 /** Fit type for bias */ 111 typedef enum { 112 PS_OVERSCAN_FIT_NONE, ///< No fit to bias 113 PS_OVERSCAN_FIT_LINEAR, ///< Do linear interpolation on bias 114 PS_OVERSCAN_FIT_POLYNOMIAL, ///< Fit polynomial to bias 115 PS_OVERSCAN_FIT_CHEBYSHEV, ///< Fit chebyshev to bias 116 PS_OVERSCAN_FIT_SPLINE ///< Fit cubic splines to bias 117 } psBiasFit; 66 118 67 119 /** Subtracts an overscan and bias from the input image. */ 68 120 psReadout *psPhase2SubtractBias(psReadout *in, ///< Input image to be de-biased, and output 69 psPolynomial1D *polySpec, ///< Polynomial specification to use for fit, 70 ///< outputed 121 void *fitSpec, ///< Polynomial/Spline/Some other function(?) specification, 122 ///< Also outputted 123 psOverscanAxis overscanAxis, ///< Overscan axis 124 psBiasFit fit, ///< How to fit the bias 125 int nBin, ///< Number of bins for overscan vector before fitting 71 126 const psList *regions, ///< Linked list of psImageRegion types. 72 psOverscanAxis overscanAxis, ///< Overscan axis 73 const psStatsOptions *stat, ///< Statistic to use 127 const psStats *stat, ///< Statistic to use 74 128 const psImage *bias ///< Bias (or dark) image to subtract 75 129 );
Note:
See TracChangeset
for help on using the changeset viewer.
