Changeset 21290 for trunk/psLib/src/imageops/psImageInterpolate.c
- Timestamp:
- Feb 4, 2009, 11:43:11 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/imageops/psImageInterpolate.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/imageops/psImageInterpolate.c
r21284 r21290 7 7 * @author Paul Price, IfA 8 8 * 9 * @version $Revision: 1.3 4$ $Name: not supported by cvs2svn $10 * @date $Date: 2009-02-04 2 0:46:40$9 * @version $Revision: 1.35 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2009-02-04 21:43:11 $ 11 11 * 12 12 * Copyright 2004-2007 Institute for Astronomy, University of Hawaii … … 978 978 interpolationKernel(yKernel, yFrac, mode); 979 979 980 // Need to normalise the kernel, since that's what the interpolation does 981 double xSum = 0.0, ySum = 0.0; 982 for (int i = 0; i < size; i++) { 983 xSum += xKernel[i]; 984 ySum += yKernel[i]; 985 } 986 for (int i = 0; i < size; i++) { 987 xKernel[i] /= xSum; 988 yKernel[i] /= ySum; 989 } 990 980 991 int min = -size/2, max = (size - 1) / 2; // Range for kernel 981 992 psKernel *kernel = psKernelAlloc(min, max, min, max); // Kernel to return
Note:
See TracChangeset
for help on using the changeset viewer.
