Changeset 12513 for trunk/psLib/test/imageops/tap_psImageShift.c
- Timestamp:
- Mar 19, 2007, 5:57:25 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/imageops/tap_psImageShift.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/imageops/tap_psImageShift.c
r9875 r12513 10 10 plan_tests(39); 11 11 12 diag("psImageShift() tests");12 // diag("psImageShift() tests"); 13 13 14 14 // tests using BILINEAR interpolation … … 16 16 psMemId id = psMemGetId(); 17 17 18 diag("shift a delta function by an integer offset");18 // diag("shift a delta function by an integer offset"); 19 19 20 20 // generate simple image (delta function) … … 48 48 psMemId id = psMemGetId(); 49 49 50 diag("shift a delta function by an fractional pixel offset");50 // diag("shift a delta function by an fractional pixel offset"); 51 51 52 52 // generate simple image (delta function) … … 63 63 // fractional shifts introduce smoothing, 64 64 psImage *shift = psImageShift (NULL, image, 0.2, 0.4, 0.0, PS_INTERPOLATE_BILINEAR); 65 diag("these require tolerance of 4 epsilon (why?)");65 // diag("these require tolerance of 4 epsilon (why?)"); 66 66 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]); 67 67 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]); … … 85 85 psMemId id = psMemGetId(); 86 86 87 diag("shift a gaussian and measure centroid");87 // diag("shift a gaussian and measure centroid"); 88 88 89 89 // generate simple image (gauss function) … … 116 116 yo /= no; 117 117 118 diag ("these require a tolerance of 100 epsilon");118 // diag ("these require a tolerance of 100 epsilon"); 119 119 ok_float_tol (xo, 16.0, 100*FLT_EPSILON, "x-centroid should be %f : %f", 16.0, xo); 120 120 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);
Note:
See TracChangeset
for help on using the changeset viewer.
