Changeset 17806 for trunk/psLib/test/imageops/tap_psImageConvolve2.c
- Timestamp:
- May 24, 2008, 12:22:51 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/imageops/tap_psImageConvolve2.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/imageops/tap_psImageConvolve2.c
r17331 r17806 98 98 int main(int argc, char *argv[]) 99 99 { 100 plan_tests( 20);100 plan_tests(30); 101 101 102 102 diag("psImageConvolve tests"); 103 103 104 104 { 105 diag("Mask convolution"); 106 // Better (separable) mask convolution: 5 tests 107 psMemId id = psMemGetId(); 108 109 psImage *mask = generateMask(); 110 111 psImage *convolved = psImageConvolveMask(NULL, mask, MASK_INITIAL, MASK_FINAL, 112 -KERNEL_SIZE, KERNEL_SIZE, -KERNEL_SIZE, KERNEL_SIZE); 113 ok(convolved, "convolution result"); 114 skip_start(!convolved, 3, "convolution failed"); 115 ok(convolved->type.type == PS_TYPE_MASK, "output type"); 116 ok(convolved->numCols == IMAGE_SIZE && convolved->numRows == IMAGE_SIZE, "output size %dx%d", 117 convolved->numCols, convolved->numRows); 118 ok(checkConvolvedMask(convolved), "convolved mask correct"); 119 psFree(convolved); 120 skip_end(); 121 122 psFree(mask); 123 124 ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks"); 125 } 126 127 { 128 diag("Mask convolution in-place"); 129 // Better (separable) in-place FFT mask convolution: 5 tests 130 psMemId id = psMemGetId(); 131 132 psImage *mask = generateMask(); 133 134 bool result = psImageConvolveMask(mask, mask, MASK_INITIAL, MASK_FINAL, -KERNEL_SIZE, KERNEL_SIZE, 135 -KERNEL_SIZE, KERNEL_SIZE); 136 ok(result, "convolution result"); 137 skip_start(!result, 3, "convolution failed"); 138 ok(mask->type.type == PS_TYPE_MASK, "output type"); 139 ok(mask->numCols == IMAGE_SIZE && mask->numRows == IMAGE_SIZE, "output size %dx%d", 140 mask->numCols, mask->numRows); 141 ok(checkConvolvedMask(mask), "convolved mask correct"); 142 skip_end(); 143 144 psFree(mask); 145 146 ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks"); 147 } 148 149 { 150 diag("Direct convolution"); 105 151 // Direct convolution: 5 tests 106 152 psMemId id = psMemGetId(); … … 126 172 127 173 { 174 diag("FFT convolution"); 128 175 // FFT convolution: 5 tests 129 176 psMemId id = psMemGetId(); … … 149 196 150 197 { 198 diag("FFT mask convolution"); 151 199 // FFT mask convolution: 5 tests 152 200 psMemId id = psMemGetId(); … … 172 220 173 221 { 222 diag("FFT mask convolution in-place"); 174 223 // In-place FFT mask convolution: 5 tests 175 224 psMemId id = psMemGetId(); … … 192 241 } 193 242 194 195 243 return exit_status(); 196 244 }
Note:
See TracChangeset
for help on using the changeset viewer.
