Changeset 15762
- Timestamp:
- Dec 7, 2007, 11:46:29 AM (18 years ago)
- Location:
- trunk/psModules/src/imcombine
- Files:
-
- 2 added
- 1 edited
-
pmPSFEnvelope.c (added)
-
pmPSFEnvelope.h (added)
-
pmSubtractionEquation.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmSubtractionEquation.c
r15761 r15762 704 704 double diff = NAN; // Difference between iterations 705 705 psVector *vector = NULL; // RHS for equations 706 int iter = 0; // Iteration number 706 707 do { 707 708 if (!vector) { … … 765 766 // Get difference produced by iteration 766 767 diff = 0.0; 768 #if 0 767 769 psVector *sol2 = kernels->solution2; // Solution of second equation 768 770 for (int i = 0; i < numParams2; i++) { 769 diff += fabs(sol2->data.F64[i] - lastSol2->data.F64[i]) / sol2->data.F64[i];771 diff += fabs(sol2->data.F64[i] - lastSol2->data.F64[i]); 770 772 } 771 773 lastSol2 = psVectorCopy(lastSol2, sol2, PS_TYPE_F64); 774 psTrace("psModules.imcombine", 4, "Solution iteration %d: %lf\n", iter, diff); 775 #endif 776 777 psVectorInit(kernels->solution2, 0.0); 778 779 iter++; 772 780 } while (diff > tolerance); 773 781 … … 877 885 } 878 886 879 #ifdef TESTING880 psImageInit(residual->image, 0.0);881 #endif882 883 887 for (int j = 0; j < numKernels; j++) { 884 888 psKernel *conv1 = convolutions1->data[j]; // Convolution of first image … … 890 894 for (int y = - footprint; y <= footprint; y++) { 891 895 for (int x = - footprint; x <= footprint; x++) { 892 residual->kernel[y][x] += conv1->kernel[y][x] * coefficient1 -896 residual->kernel[y][x] += conv1->kernel[y][x] * coefficient1 + 893 897 conv2->kernel[y][x] * coefficient2; 894 898 }
Note:
See TracChangeset
for help on using the changeset viewer.
