Changeset 5718 for trunk/psphot/src/pmSourceContour.c
- Timestamp:
- Dec 6, 2005, 9:55:31 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/pmSourceContour.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/pmSourceContour.c
r5672 r5718 100 100 new implementation of source contour function 101 101 *****************************************************************************/ 102 psArray *pmSourceContour_EAM (psImage *image, int x , int y, float threshold) {102 psArray *pmSourceContour_EAM (psImage *image, int xc, int yc, float threshold) { 103 103 104 104 int xR, yR, x0, x1, x0s, x1s; … … 106 106 psTrace(__func__, 3, "---- %s() begin ----\n", __func__); 107 107 PS_ASSERT_PTR_NON_NULL(image, false); 108 109 int x = xc - image->col0; 110 int y = yc - image->row0; 108 111 109 112 // the requested point must be within the contour … … 141 144 x0 = findContourPos (image, threshold, xR, yR, RIGHT, x1); 142 145 if (x0 == x1) { 143 fprintf (stderr, "top: %d (%d - %d)\n", yR, xR, x1);146 // fprintf (stderr, "top: %d (%d - %d)\n", yR, xR, x1); 144 147 goto pt1; 145 148 } … … 150 153 x1 = findContourNeg (image, threshold, xR, yR, RIGHT); 151 154 } 152 fprintf (stderr, "pos: %d (%d - %d)\n", yR, x0, x1);155 // fprintf (stderr, "pos: %d (%d - %d)\n", yR, x0, x1); 153 156 154 157 xVec->data.F32[Npt + 0] = image->col0 + x0; … … 175 178 x0 = findContourPos (image, threshold, xR, yR, RIGHT, x1); 176 179 if (x0 == x1) { 177 fprintf (stderr, "top: %d (%d - %d)\n", yR, xR, x1);180 // fprintf (stderr, "top: %d (%d - %d)\n", yR, xR, x1); 178 181 goto pt2; 179 182 } … … 184 187 x1 = findContourNeg (image, threshold, xR, yR, RIGHT); 185 188 } 186 fprintf (stderr, "neg: %d (%d - %d)\n", yR, x0, x1);189 // fprintf (stderr, "neg: %d (%d - %d)\n", yR, x0, x1); 187 190 188 191 xVec->data.F32[Npt + 0] = image->col0 + x0; … … 202 205 yVec->n = Npt; 203 206 204 fprintf (stderr, "done\n");207 // fprintf (stderr, "done\n"); 205 208 psArray *tmpArray = psArrayAlloc(2); 206 209 tmpArray->data[0] = (psPtr *) xVec;
Note:
See TracChangeset
for help on using the changeset viewer.
