Changeset 14420 for trunk/psModules/src/imcombine/pmSubtraction.c
- Timestamp:
- Aug 7, 2007, 9:02:55 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/imcombine/pmSubtraction.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmSubtraction.c
r14360 r14420 4 4 * @author GLG, MHPCC 5 5 * 6 * @version $Revision: 1.3 2$ $Name: not supported by cvs2svn $7 * @date $Date: 2007-0 7-21 04:30:57$6 * @version $Revision: 1.33 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2007-08-07 19:02:55 $ 8 8 * 9 9 * Copyright 2004-2007 Institute for Astronomy, University of Hawaii … … 124 124 int vStart = (KERNELS)->v->data.S32[i]; \ 125 125 int vStop = (KERNELS)->vStop->data.S32[i]; \ 126 /* Normalising sum of kernel component to unity */ \ 127 value /= FUNC((uStop - uStart) * (vStop - vStart)); \ 126 128 for (int v = vStart; v <= vStop; v++) { \ 127 129 for (int u = uStart; u <= uStop; u++) { \ … … 180 182 psVector *poly = preCalc->data[2]; /* Polynomial values */ \ 181 183 int num = uCoords->n; /* Number of pixels */ \ 184 value /= weightFunc(num); /* Normalising sum of kernel component to unity */ \ 182 185 for (int j = 0; j < num; j++) { \ 183 186 int u = uCoords->data.S32[j], v = vCoords->data.S32[j]; /* Kernel coordinates */ \ … … 248 251 int vStart = kernels->v->data.S32[i]; 249 252 int vStop = kernels->vStop->data.S32[i]; 253 254 // Normalising sum of kernel component to unity 255 value /= weightFunc((uStop - uStart) * (vStop - vStart)); 256 250 257 for (int v = vStart; v <= vStop; v++) { 251 258 for (int u = uStart; u <= uStop; u++) { … … 304 311 psVector *poly = preCalc->data[2]; // Polynomial values 305 312 int num = uCoords->n; // Number of pixels 306 313 value /= weightFunc(num); // Normalising sum of kernel component to unity 307 314 for (int j = 0; j < num; j++) { 308 315 int u = uCoords->data.S32[j], v = vCoords->data.S32[j]; // Kernel coordinates … … 362 369 } 363 370 } 371 sum /= (uStop - uStart) * (vStop - vStart); // Normalising sum of kernel component to unity 364 372 if (kernels->spatialOrder > 0 && index != kernels->subIndex) { 365 373 // The (0,0) element is subtracted from most kernels to preserve photometric scaling … … 424 432 sum += image->data.F32[y + v][x + u] * poly->data.F32[j]; 425 433 } 434 sum /= (double)num; // Normalising sum of kernel component to unity 426 435 // The (0,0) kernel is subtracted from other kernels to preserve photometric scaling 427 436 return polyValue * sum - image->data.F32[0][0];
Note:
See TracChangeset
for help on using the changeset viewer.
