Changeset 25027 for branches/pap/psLib/src/imageops/psImageMapFit.c
- Timestamp:
- Aug 7, 2009, 4:08:25 PM (17 years ago)
- Location:
- branches/pap
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
psLib/src/imageops/psImageMapFit.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap
- Property svn:mergeinfo changed
-
branches/pap/psLib/src/imageops/psImageMapFit.c
r21183 r25027 73 73 74 74 // XXX does ROBUST_MEDIAN work with weight? 75 psVectorStats(map->stats, f, NULL, mask, maskValue); 75 if (!psVectorStats(map->stats, f, NULL, mask, maskValue)) { 76 psError(PS_ERR_UNKNOWN, false, "failure to measure stats"); 77 return false; 78 } 76 79 77 80 map->map->data.F32[0][0] = psStatsGetValue(map->stats, mean); … … 305 308 # endif 306 309 307 if (!psMatrixGJSolveF32(A, B)) { 308 psAbort ("failed on linear equations"); 310 if (!psMatrixGJSolve(A, B)) { 309 311 psError(PS_ERR_UNKNOWN, false, "Could not solve linear equations. Returning NULL.\n"); 310 312 psFree (A); … … 574 576 } 575 577 576 if (!psMatrixGJSolveF32(A, B)) { 577 psAbort ("failed on linear equations"); 578 psError(PS_ERR_UNKNOWN, false, "Could not solve linear equations. Returning NULL.\n"); 578 if (!psMatrixGJSolve(A, B)) { 579 psError(PS_ERR_UNKNOWN, false, "Could not solve linear equations.\n"); 579 580 psFree (A); 580 581 psFree (B); 582 psFree (Empty); 581 583 return false; 582 584 } … … 722 724 } 723 725 724 if (!psMatrixGJSolveF32(A, B)) { 725 psAbort ("failed on linear equations"); 726 psError(PS_ERR_UNKNOWN, false, "Could not solve linear equations. Returning NULL.\n"); 726 if (!psMatrixGJSolve(A, B)) { 727 psError(PS_ERR_UNKNOWN, false, "Could not solve linear equations..\n"); 727 728 psFree (A); 728 729 psFree (B); 730 psFree (Empty); 729 731 return false; 730 732 } … … 739 741 740 742 for (int m = 0; m < Nx; m++) { 741 int I = m; // XXX I'm not entirely sure about this; it wasn't set for this scope --- PAP. 742 map->map->data.F32[0][m] = B->data.F32[I]; 743 map->error->data.F32[0][m] = sqrt(A->data.F32[I][I]); 743 map->map->data.F32[0][m] = B->data.F32[m]; 744 map->error->data.F32[0][m] = sqrt(A->data.F32[m][m]); 744 745 } 745 746
Note:
See TracChangeset
for help on using the changeset viewer.
