Changeset 12513 for trunk/psLib/test/imageops/tap_psImageShiftKernel.c
- Timestamp:
- Mar 19, 2007, 5:57:25 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/imageops/tap_psImageShiftKernel.c
r12094 r12513 10 10 plan_tests(34); 11 11 12 diag("psImageShiftKernel() tests");12 // diag("psImageShiftKernel() tests"); 13 13 14 14 // tests using BILINEAR interpolation … … 17 17 psMemId id = psMemGetId(); 18 18 19 diag("shift a delta function by an integer offset");19 // diag("shift a delta function by an integer offset"); 20 20 21 21 // generate simple image (delta function) … … 50 50 psMemId id = psMemGetId(); 51 51 52 diag("shift a delta function by an fractional pixel offset");52 // diag("shift a delta function by an fractional pixel offset"); 53 53 54 54 // generate simple image (delta function) … … 65 65 // fractional shifts introduce smoothing, 66 66 psImage *shift = psImageShiftKernel (NULL, image, 0.2, 0.4, PS_INTERPOLATE_BICUBE); 67 diag("these require tolerance of 4 epsilon (why?)");67 // diag("these require tolerance of 4 epsilon (why?)"); 68 68 ok_float_tol (shift->data.F32[10][10], 0.8*0.6, 4*FLT_EPSILON, "point 10,10 should be %f : %f", 0.8*0.6, shift->data.F32[10][10]); 69 69 ok_float_tol (shift->data.F32[10][11], 0.2*0.6, 4*FLT_EPSILON, "point 10,11 should be %f : %f", 0.2*0.6, shift->data.F32[10][11]); … … 88 88 psMemId id = psMemGetId(); 89 89 90 diag("shift a gaussian and measure centroid");90 // diag("shift a gaussian and measure centroid"); 91 91 92 92 // generate simple image (gauss function) … … 117 117 yo /= no; 118 118 119 diag ("these require a tolerance of 100 epsilon");119 // diag ("these require a tolerance of 100 epsilon"); 120 120 ok_float_tol (xo, 16.0, 100*FLT_EPSILON, "x-centroid should be %f : %f", 16.0, xo); 121 121 ok_float_tol (xo, 16.0, 100*FLT_EPSILON, "y-centroid should be %f : %f", 16.0, yo); … … 136 136 yo /= no; 137 137 138 diag ("these require a tolerance of 100 epsilon");138 // diag ("these require a tolerance of 100 epsilon"); 139 139 ok_float_tol (xo, 17.2, 100*FLT_EPSILON, "x-centroid should be %f : %f", 17.2, xo); 140 140 ok_float_tol (yo, 14.8, 100*FLT_EPSILON, "y-centroid should be %f : %f", 14.8, yo); … … 161 161 // fractional shifts introduce smoothing, 162 162 psImage *shift = psImageShiftKernel (NULL, image, 0.2, 0.4, PS_INTERPOLATE_BICUBE); 163 diag ("please check these values: this kernel is very steep and ringy. what is the right BICUBE kernel?");163 // diag ("please check these values: this kernel is very steep and ringy. what is the right BICUBE kernel?"); 164 164 ok_float_tol (shift->data.F32[10][10], -1.444445, 4*FLT_EPSILON, "point 10,10 should be %f : %f", -1.444445, shift->data.F32[10][10]); 165 165 ok_float_tol (shift->data.F32[10][11], -0.277778, 4*FLT_EPSILON, "point 10,11 should be %f : %f", -0.277778, shift->data.F32[10][11]); … … 184 184 psMemId id = psMemGetId(); 185 185 186 diag("shift a gaussian and measure centroid");186 // diag("shift a gaussian and measure centroid"); 187 187 188 188 // generate simple image (gauss function) … … 215 215 yo /= no; 216 216 217 diag ("these require a tolerance of 100 epsilon");217 // diag ("these require a tolerance of 100 epsilon"); 218 218 ok_float_tol (xo, 16.0, 100*FLT_EPSILON, "x-centroid should be %f : %f", 16.0, xo); 219 219 ok_float_tol (xo, 16.0, 100*FLT_EPSILON, "y-centroid should be %f : %f", 16.0, yo); … … 235 235 yo /= no; 236 236 237 diag ("these require a tolerance of 100 epsilon");237 // diag ("these require a tolerance of 100 epsilon"); 238 238 ok_float_tol (xo, 16.2, 100*FLT_EPSILON, "x-centroid should be %f : %f", 16.2, xo); 239 239 ok_float_tol (yo, 15.8, 100*FLT_EPSILON, "y-centroid should be %f : %f", 15.8, yo); … … 281 281 psMemId id = psMemGetId(); 282 282 283 diag("shift a gaussian and measure centroid");283 // diag("shift a gaussian and measure centroid"); 284 284 285 285 // generate simple image (gauss function) … … 312 312 yo /= no; 313 313 314 diag ("these require a tolerance of 100 epsilon");314 // diag ("these require a tolerance of 100 epsilon"); 315 315 ok_float_tol (xo, 16.0, 100*FLT_EPSILON, "x-centroid should be %f : %f", 16.0, xo); 316 316 ok_float_tol (xo, 16.0, 100*FLT_EPSILON, "y-centroid should be %f : %f", 16.0, yo); … … 332 332 yo /= no; 333 333 334 diag ("these require a tolerance of 100 epsilon");334 // diag ("these require a tolerance of 100 epsilon"); 335 335 ok_float_tol (xo, 16.2, 100*FLT_EPSILON, "x-centroid should be %f : %f", 16.2, xo); 336 336 ok_float_tol (yo, 15.8, 100*FLT_EPSILON, "y-centroid should be %f : %f", 15.8, yo);
Note:
See TracChangeset
for help on using the changeset viewer.
