Changeset 21322 for trunk/psLib/src/imageops/psImageCovariance.c
- Timestamp:
- Feb 5, 2009, 10:40:34 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/imageops/psImageCovariance.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/imageops/psImageCovariance.c
r21316 r21322 192 192 double threshold = (1.0 - frac) * sum; // Threshold for truncation 193 193 int maxRadius = PS_MAX(PS_MAX(PS_MAX(xMax, yMax), -xMin), yMin); // Maximum radius of covariance matrix 194 double enclosed = NAN; // Enclosed value194 double enclosed = 0.0; // Enclosed value 195 195 int radius; // Radius at which to truncate 196 196 for (radius = 0; radius <= maxRadius && enclosed < threshold; radius++) { … … 208 208 int numBytes = (2 * radius + 1) * PSELEMTYPE_SIZEOF(PS_TYPE_F32); // Number of bytes to copy 209 209 for (int y = -radius; y <= radius; y++) { 210 memcpy( trunc->kernel[y], covar->kernel[y], numBytes);210 memcpy(&trunc->kernel[y][-radius], &covar->kernel[y][-radius], numBytes); 211 211 } 212 212
Note:
See TracChangeset
for help on using the changeset viewer.
