Changeset 2100
- Timestamp:
- Oct 13, 2004, 3:03:57 PM (22 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 2 edited
-
image/psImageStats.c (modified) (8 diffs)
-
imageops/psImageStats.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/image/psImageStats.c
r1955 r2100 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1.4 0$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-10- 05 01:46:02$12 * @version $Revision: 1.41 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-10-14 01:03:57 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 30 30 #include "psFunctions.h" 31 31 #include "psImageStats.h" 32 #include "psConstants.h" 32 33 33 34 #include "psImageErrors.h" … … 106 107 NOTE: verify that image/mask have the, correct types and sizes. 107 108 *****************************************************************************/ 108 psHistogram* psImageHistogram(psHistogram* out, psImage* in, psImage* mask, unsigned int maskVal) 109 psHistogram* psImageHistogram(psHistogram* out, 110 psImage* in, 111 psImage* mask, 112 unsigned int maskVal) 109 113 { 110 114 psVector* junkData = NULL; … … 112 116 113 117 // NOTE: Verify this action. 114 if ((out == NULL) || (in == NULL)) { 115 return (NULL); 116 } 118 PS_CHECK_NULL_PTR_RETURN_NULL(out); 119 PS_CHECK_NULL_PTR_RETURN_NULL(in); 117 120 118 121 junkData = psAlloc(sizeof(psVector)); … … 150 153 } 151 154 155 // XXX: Why do we have this function? 152 156 float *p_psCalcScaleFactorsFit(int n) 153 157 { … … 195 199 } 196 200 201 // XXX: Use a static array of CHebyshev polynomials. 197 202 psPolynomial1D **p_psCreateChebyshevPolys(int maxChebyPoly) 198 203 { 204 if (maxChebyPoly < 1) { 205 return(NULL); 206 } 199 207 psPolynomial1D **chebPolys = NULL; 200 208 int i = 0; … … 235 243 psPolynomial1DEval((float) y, chebPolys[j]); 236 244 over all pixels (x,y) in the image. 245 246 XXX: Currently we only support F32. 237 247 *****************************************************************************/ 238 psPolynomial2D* psImageFitPolynomial(psPolynomial2D* coeffs, const psImage* input) 248 psPolynomial2D* psImageFitPolynomial(psPolynomial2D* coeffs, 249 const psImage* input) 239 250 { 240 251 int x = 0; … … 352 363 353 364 /***************************************************************************** 365 XXX: Use static variables for chebyshev polynomials and scaling factors. 354 366 367 XXX: Currently we only support F32. 355 368 *****************************************************************************/ 356 369 psImage* psImageEvalPolynomial(psImage* input, const psPolynomial2D* coeffs) -
trunk/psLib/src/imageops/psImageStats.c
r1955 r2100 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1.4 0$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-10- 05 01:46:02$12 * @version $Revision: 1.41 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-10-14 01:03:57 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 30 30 #include "psFunctions.h" 31 31 #include "psImageStats.h" 32 #include "psConstants.h" 32 33 33 34 #include "psImageErrors.h" … … 106 107 NOTE: verify that image/mask have the, correct types and sizes. 107 108 *****************************************************************************/ 108 psHistogram* psImageHistogram(psHistogram* out, psImage* in, psImage* mask, unsigned int maskVal) 109 psHistogram* psImageHistogram(psHistogram* out, 110 psImage* in, 111 psImage* mask, 112 unsigned int maskVal) 109 113 { 110 114 psVector* junkData = NULL; … … 112 116 113 117 // NOTE: Verify this action. 114 if ((out == NULL) || (in == NULL)) { 115 return (NULL); 116 } 118 PS_CHECK_NULL_PTR_RETURN_NULL(out); 119 PS_CHECK_NULL_PTR_RETURN_NULL(in); 117 120 118 121 junkData = psAlloc(sizeof(psVector)); … … 150 153 } 151 154 155 // XXX: Why do we have this function? 152 156 float *p_psCalcScaleFactorsFit(int n) 153 157 { … … 195 199 } 196 200 201 // XXX: Use a static array of CHebyshev polynomials. 197 202 psPolynomial1D **p_psCreateChebyshevPolys(int maxChebyPoly) 198 203 { 204 if (maxChebyPoly < 1) { 205 return(NULL); 206 } 199 207 psPolynomial1D **chebPolys = NULL; 200 208 int i = 0; … … 235 243 psPolynomial1DEval((float) y, chebPolys[j]); 236 244 over all pixels (x,y) in the image. 245 246 XXX: Currently we only support F32. 237 247 *****************************************************************************/ 238 psPolynomial2D* psImageFitPolynomial(psPolynomial2D* coeffs, const psImage* input) 248 psPolynomial2D* psImageFitPolynomial(psPolynomial2D* coeffs, 249 const psImage* input) 239 250 { 240 251 int x = 0; … … 352 363 353 364 /***************************************************************************** 365 XXX: Use static variables for chebyshev polynomials and scaling factors. 354 366 367 XXX: Currently we only support F32. 355 368 *****************************************************************************/ 356 369 psImage* psImageEvalPolynomial(psImage* input, const psPolynomial2D* coeffs)
Note:
See TracChangeset
for help on using the changeset viewer.
