Changeset 14922
- Timestamp:
- Sep 20, 2007, 1:52:52 PM (19 years ago)
- Location:
- trunk/psLib/src/imageops
- Files:
-
- 2 edited
-
psImageBackground.c (modified) (2 diffs)
-
psImageBackground.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/imageops/psImageBackground.c
r12444 r14922 18 18 // XXX allow the user to choose the stats method? 19 19 // (SAMPLE_MEAN, CLIPPED_MEAN, ROBUST_MEDIAN, FITTED_MEAN) 20 bool psImageBackground(psStats *stats, const psImage *image, const psImage *mask, psMaskType maskValue, psRandom *rng)20 bool psImageBackground(psStats *stats, psVector **sample, const psImage *image, const psImage *mask, psMaskType maskValue, psRandom *rng) 21 21 { 22 22 PS_ASSERT_IMAGE_NON_NULL(image, NULL); … … 115 115 } 116 116 117 psFree(values); 117 if (sample != NULL) { 118 *sample = values; 119 } else { 120 psFree(values); 121 } 118 122 return true; 119 123 } -
trunk/psLib/src/imageops/psImageBackground.h
r11248 r14922 5 5 * @author EAM, IfA 6 6 * 7 * $Revision: 1. 4$ $Name: not supported by cvs2svn $8 * $Date: 2007-0 1-23 22:47:23$7 * $Revision: 1.5 $ $Name: not supported by cvs2svn $ 8 * $Date: 2007-09-20 23:52:52 $ 9 9 * Copyright 2004-2005 IfA, University of Hawaii 10 10 */ … … 22 22 // Get the background for an image 23 23 bool psImageBackground(psStats *stats, // desired measurement and options 24 psVector **sample, // vector of data used for analysis 24 25 const psImage *image, // Image for which to get the background 25 26 const psImage *mask, // Mask image … … 30 31 /// @} 31 32 #endif // #ifndef PS_IMAGE_BACKGROUND_H 33 34 /* the user may supply a psVector ** or NULL to sample. if a vector is supplied, 35 the user must free the resulting vector */
Note:
See TracChangeset
for help on using the changeset viewer.
