Changeset 25994 for trunk/psLib/src/imageops/psImageCovariance.c
- Timestamp:
- Nov 1, 2009, 4:10:12 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/imageops/psImageCovariance.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/imageops/psImageCovariance.c
r24832 r25994 212 212 } 213 213 214 float psImageCovarianceFactorForAperture(const psKernel *covar, float radius) 215 { 216 if (!covar) return 1.0; 217 218 float Sum = 0.0; 219 220 for (int y = covar->yMin; y <= covar->yMax; y++) { 221 if (y < -radius) continue; 222 if (y > +radius) continue; 223 for (int x = covar->xMin; x <= covar->xMax; x++) { 224 if (x < -radius) continue; 225 if (x > +radius) continue; 226 227 if (hypot(x, y) > radius) continue; 228 229 psAssert (isfinite(covar->kernel[y][x]), "invalid NAN in covariance matrix"); 230 Sum += covar->kernel[y][x]; 231 } 232 } 233 234 return Sum; 235 } 236 214 237 psKernel *psImageCovarianceSum(const psArray *array) 215 238 {
Note:
See TracChangeset
for help on using the changeset viewer.
