Changeset 904
- Timestamp:
- Jun 7, 2004, 3:08:33 PM (22 years ago)
- Location:
- trunk/psLib/test/image
- Files:
-
- 2 edited
-
tst_psImageStats00.c (modified) (2 diffs)
-
verified/tst_psImageStats00.stdout (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/image/tst_psImageStats00.c
r887 r904 11 11 #define NUM_BINS 20 12 12 #define IMAGE_SIZE 20 13 #define N 32 14 #define M 64 13 15 14 16 int main() 15 17 { 16 18 psHistogram *myHist = NULL; 19 psHistogram *myHist2= NULL; 17 20 psImage *tmpImage = NULL; 18 21 psImage *tmpMask = NULL; 19 22 int testStatus = true; 20 23 int memLeaks = 0; 24 int nb = 0; 21 25 int i = 0; 22 26 int j = 0; 27 int IMAGE_X_SIZE = 0; 28 int IMAGE_Y_SIZE = 0; 23 29 int currentId = 0; 24 30 25 31 currentId = psMemGetId(); 26 /*************************************************************************/ 27 /* Allocate and initialize data structures */ 28 /*************************************************************************/ 29 tmpImage = psImageAlloc(IMAGE_SIZE, IMAGE_SIZE, PS_TYPE_F32); 30 for (i=0;i<IMAGE_SIZE;i++) { 31 for (j=0;j<IMAGE_SIZE;j++) { 32 tmpImage->data.F32[i][j] = (float) (i + j); 32 for (nb=0;nb<6;nb++) { 33 if (nb == 0) { 34 IMAGE_X_SIZE = 1; 35 IMAGE_Y_SIZE = 1; 33 36 } 34 } 35 tmpMask = psImageAlloc(IMAGE_SIZE, IMAGE_SIZE, PS_TYPE_U8); 36 for (i=0;i<IMAGE_SIZE;i++) { 37 for (j=0;j<IMAGE_SIZE;j++) { 38 if ((i > (IMAGE_SIZE/2)) && 39 (j > (IMAGE_SIZE/2))) { 40 tmpMask->data.U8[i][j] = 1; 41 } else { 42 tmpMask->data.U8[i][j] = 0; 37 if (nb == 1) { 38 IMAGE_X_SIZE = 1; 39 IMAGE_Y_SIZE = N; 40 } 41 if (nb == 2) { 42 IMAGE_X_SIZE = N; 43 IMAGE_Y_SIZE = 1; 44 } 45 if (nb == 3) { 46 IMAGE_X_SIZE = N; 47 IMAGE_Y_SIZE = N; 48 } 49 if (nb == 4) { 50 IMAGE_X_SIZE = N; 51 IMAGE_Y_SIZE = M; 52 } 53 if (nb == 5) { 54 IMAGE_X_SIZE = M; 55 IMAGE_Y_SIZE = N; 56 } 57 printf("*******************************\n"); 58 printf("* IMAGE SIZE is (%d by %d)\n", IMAGE_X_SIZE, IMAGE_Y_SIZE); 59 printf("*******************************\n"); 60 /*********************************************************************/ 61 /* Allocate and initialize data structures */ 62 /*********************************************************************/ 63 tmpImage = psImageAlloc(IMAGE_X_SIZE, IMAGE_Y_SIZE, PS_TYPE_F32); 64 65 for (i=0;i<tmpImage->numRows;i++) { 66 for (j=0;j<tmpImage->numCols;j++) { 67 tmpImage->data.F32[i][j] = (float) (i + j); 43 68 } 44 69 } 70 tmpMask = psImageAlloc(IMAGE_X_SIZE, IMAGE_Y_SIZE, PS_TYPE_U8); 71 for (i=0;i<tmpMask->numRows;i++) { 72 for (j=0;j<tmpMask->numCols;j++) { 73 if ((i > (tmpMask->numRows/2)) && 74 (j > (tmpMask->numCols/2))) { 75 tmpMask->data.U8[i][j] = 1; 76 } else { 77 tmpMask->data.U8[i][j] = 0; 78 } 79 } 80 } 81 82 /*************************************************************************/ 83 /* Calculate Histogram with no mask */ 84 /*************************************************************************/ 85 printPositiveTestHeader(stdout, 86 "psImageStats functions", 87 "Calculate Histogram, no mask"); 88 89 myHist = psHistogramAlloc(0.0, (float) (IMAGE_X_SIZE + IMAGE_Y_SIZE), 90 NUM_BINS); 91 myHist = psImageHistogram(myHist, tmpImage, NULL, 0); 92 for (i=0;i<NUM_BINS;i++) { 93 printf("Bin number %d bounds: (%f - %f) data (%d)\n", i, 94 myHist->bounds->data.F32[i], 95 myHist->bounds->data.F32[i+1], 96 myHist->nums->data.S32[i]); 97 } 98 psHistogramFree(myHist); 99 100 psMemCheckCorruption(1); 101 printFooter(stdout, 102 "psImageStats functions", 103 "Calculate Histogram, no mask", 104 testStatus); 105 106 /*************************************************************************/ 107 /* Calculate Histogram with mask */ 108 /*************************************************************************/ 109 printPositiveTestHeader(stdout, 110 "psImageStats functions", 111 "Calculate Histogram with mask"); 112 113 myHist = psHistogramAlloc(0.0, (float) (IMAGE_X_SIZE + IMAGE_Y_SIZE), 114 NUM_BINS); 115 myHist = psImageHistogram(myHist, tmpImage, tmpMask, 1); 116 for (i=0;i<NUM_BINS;i++) { 117 printf("Bin number %d bounds: (%f - %f) data (%d)\n", i, 118 myHist->bounds->data.F32[i], 119 myHist->bounds->data.F32[i+1], 120 myHist->nums->data.S32[i]); 121 } 122 123 psMemCheckCorruption(1); 124 printFooter(stdout, 125 "psImageStats functions", 126 "Calculate Histogram with mask", 127 testStatus); 128 129 /*************************************************************************/ 130 /* Deallocate data structures */ 131 /*************************************************************************/ 132 printPositiveTestHeader(stdout, 133 "psImageStats functions", 134 "Deallocate the psHistogram/psImage structure."); 135 psHistogramFree(myHist); 136 psImageFree(tmpImage); 137 psImageFree(tmpMask); 138 139 psMemCheckCorruption(1); 140 memLeaks = psMemCheckLeaks(currentId,NULL,NULL); 141 if (0 != memLeaks) { 142 psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks); 143 } 144 145 printFooter(stdout, 146 "psImageStats functions", 147 "Deallocate the psHistogram/psImage structure.", 148 testStatus); 45 149 } 46 /*************************************************************************/47 /* Calculate Histogram with no mask */48 /*************************************************************************/49 150 printPositiveTestHeader(stdout, 50 151 "psImageStats functions", 51 "Cal culate Histogram, no mask");152 "Calling psImageHistogram() with NULL parameters"); 52 153 53 myHist = psHistogramAlloc(0.0, (float) (2 * IMAGE_SIZE), NUM_BINS); 54 myHist = psImageHistogram(myHist, tmpImage, NULL, 0); 55 for (i=0;i<NUM_BINS;i++) { 56 printf("Bin number %d bounds: (%f - %f) data (%d)\n", i, 57 myHist->bounds->data.F32[i], 58 myHist->bounds->data.F32[i+1], 59 myHist->nums->data.S32[i]); 154 tmpImage = psImageAlloc(IMAGE_X_SIZE, IMAGE_Y_SIZE, PS_TYPE_F32); 155 myHist = psHistogramAlloc(0.0, (float) (IMAGE_X_SIZE + IMAGE_Y_SIZE), 156 NUM_BINS); 157 myHist2 = psImageHistogram(NULL, tmpImage, NULL, 0); 158 if (myHist2 != NULL) { 159 printf("ERROR: myHist2 not equal to NULL\n"); 60 160 } 61 psHistogramFree(myHist);62 161 63 psMemCheckCorruption(1); 64 printFooter(stdout, 65 "psImageStats functions", 66 "Calculate Histogram, no mask", 67 testStatus); 68 69 /*************************************************************************/ 70 /* Calculate Histogram with mask */ 71 /*************************************************************************/ 72 printPositiveTestHeader(stdout, 73 "psImageStats functions", 74 "Calculate Histogram with mask"); 75 76 myHist = psHistogramAlloc(0.0, (float) (2 * IMAGE_SIZE), NUM_BINS); 77 myHist = psImageHistogram(myHist, tmpImage, tmpMask, 1); 78 for (i=0;i<NUM_BINS;i++) { 79 printf("Bin number %d bounds: (%f - %f) data (%d)\n", i, 80 myHist->bounds->data.F32[i], 81 myHist->bounds->data.F32[i+1], 82 myHist->nums->data.S32[i]); 162 myHist2 = psImageHistogram(myHist, NULL, NULL, 0); 163 myHist2 = psImageHistogram(NULL, tmpImage, NULL, 0); 164 if (myHist2 != NULL) { 165 printf("ERROR: myHist2 not equal to NULL\n"); 83 166 } 84 167 85 168 psMemCheckCorruption(1); 86 printFooter(stdout,87 "psImageStats functions",88 "Calculate Histogram with mask",89 testStatus);90 91 /*************************************************************************/92 /* Deallocate data structures */93 /*************************************************************************/94 printPositiveTestHeader(stdout,95 "psImageStats functions",96 "Deallocate the psHistogram/psImage structure.");97 169 psHistogramFree(myHist); 98 170 psImageFree(tmpImage); 99 psImageFree(tmpMask);100 101 171 psMemCheckCorruption(1); 102 172 memLeaks = psMemCheckLeaks(currentId,NULL,NULL); … … 107 177 printFooter(stdout, 108 178 "psImageStats functions", 109 " Deallocate the psHistogram/psImage structure.",179 "Calling psImageHistogram() with NULL parameters", 110 180 testStatus); 111 181 -
trunk/psLib/test/image/verified/tst_psImageStats00.stdout
r890 r904 1 /----------------------------- TESTPOINT ------------------------------------------\ 2 | TestFile: tst_psImageStats00.c | 3 | TestPoint: psImageStats functions{Calculate Histogram, no mask} | 4 | TestType: Positive | 5 \----------------------------------------------------------------------------------/ 6 7 Bin number 0 bounds: (0.000000 - 2.000000) data (3) 8 Bin number 1 bounds: (2.000000 - 4.000000) data (7) 9 Bin number 2 bounds: (4.000000 - 6.000000) data (11) 10 Bin number 3 bounds: (6.000000 - 8.000000) data (15) 11 Bin number 4 bounds: (8.000000 - 10.000000) data (19) 12 Bin number 5 bounds: (10.000000 - 12.000000) data (23) 13 Bin number 6 bounds: (12.000000 - 14.000000) data (27) 14 Bin number 7 bounds: (14.000000 - 16.000000) data (31) 15 Bin number 8 bounds: (16.000000 - 18.000000) data (35) 16 Bin number 9 bounds: (18.000000 - 20.000000) data (39) 17 Bin number 10 bounds: (20.000000 - 22.000000) data (37) 18 Bin number 11 bounds: (22.000000 - 24.000000) data (33) 19 Bin number 12 bounds: (24.000000 - 26.000000) data (29) 20 Bin number 13 bounds: (26.000000 - 28.000000) data (25) 21 Bin number 14 bounds: (28.000000 - 30.000000) data (21) 22 Bin number 15 bounds: (30.000000 - 32.000000) data (17) 23 Bin number 16 bounds: (32.000000 - 34.000000) data (13) 24 Bin number 17 bounds: (34.000000 - 36.000000) data (9) 25 Bin number 18 bounds: (36.000000 - 38.000000) data (5) 26 Bin number 19 bounds: (38.000000 - 40.000000) data (1) 27 28 ---> TESTPOINT PASSED (psImageStats functions{Calculate Histogram, no mask} | tst_psImageStats00.c) 29 30 /----------------------------- TESTPOINT ------------------------------------------\ 31 | TestFile: tst_psImageStats00.c | 32 | TestPoint: psImageStats functions{Calculate Histogram with mask} | 33 | TestType: Positive | 34 \----------------------------------------------------------------------------------/ 35 36 Bin number 0 bounds: (0.000000 - 2.000000) data (3) 37 Bin number 1 bounds: (2.000000 - 4.000000) data (7) 38 Bin number 2 bounds: (4.000000 - 6.000000) data (11) 39 Bin number 3 bounds: (6.000000 - 8.000000) data (15) 40 Bin number 4 bounds: (8.000000 - 10.000000) data (19) 41 Bin number 5 bounds: (10.000000 - 12.000000) data (23) 42 Bin number 6 bounds: (12.000000 - 14.000000) data (27) 43 Bin number 7 bounds: (14.000000 - 16.000000) data (31) 44 Bin number 8 bounds: (16.000000 - 18.000000) data (35) 45 Bin number 9 bounds: (18.000000 - 20.000000) data (39) 46 Bin number 10 bounds: (20.000000 - 22.000000) data (37) 47 Bin number 11 bounds: (22.000000 - 24.000000) data (30) 48 Bin number 12 bounds: (24.000000 - 26.000000) data (22) 49 Bin number 13 bounds: (26.000000 - 28.000000) data (14) 50 Bin number 14 bounds: (28.000000 - 30.000000) data (6) 51 Bin number 15 bounds: (30.000000 - 32.000000) data (0) 52 Bin number 16 bounds: (32.000000 - 34.000000) data (0) 53 Bin number 17 bounds: (34.000000 - 36.000000) data (0) 54 Bin number 18 bounds: (36.000000 - 38.000000) data (0) 55 Bin number 19 bounds: (38.000000 - 40.000000) data (0) 56 57 ---> TESTPOINT PASSED (psImageStats functions{Calculate Histogram with mask} | tst_psImageStats00.c) 58 59 /----------------------------- TESTPOINT ------------------------------------------\ 60 | TestFile: tst_psImageStats00.c | 61 | TestPoint: psImageStats functions{Deallocate the psHistogram/psImage structure.} | 62 | TestType: Positive | 63 \----------------------------------------------------------------------------------/ 64 65 66 ---> TESTPOINT PASSED (psImageStats functions{Deallocate the psHistogram/psImage structure.} | tst_psImageStats00.c) 67 1 ******************************* 2 * IMAGE SIZE is (1 by 1) 3 ******************************* 4 /----------------------------- TESTPOINT ------------------------------------------\ 5 | TestFile: tst_psImageStats00.c | 6 | TestPoint: psImageStats functions{Calculate Histogram, no mask} | 7 | TestType: Positive | 8 \----------------------------------------------------------------------------------/ 9 10 Bin number 0 bounds: (0.000000 - 0.100000) data (1) 11 Bin number 1 bounds: (0.100000 - 0.200000) data (0) 12 Bin number 2 bounds: (0.200000 - 0.300000) data (0) 13 Bin number 3 bounds: (0.300000 - 0.400000) data (0) 14 Bin number 4 bounds: (0.400000 - 0.500000) data (0) 15 Bin number 5 bounds: (0.500000 - 0.600000) data (0) 16 Bin number 6 bounds: (0.600000 - 0.700000) data (0) 17 Bin number 7 bounds: (0.700000 - 0.800000) data (0) 18 Bin number 8 bounds: (0.800000 - 0.900000) data (0) 19 Bin number 9 bounds: (0.900000 - 1.000000) data (0) 20 Bin number 10 bounds: (1.000000 - 1.100000) data (0) 21 Bin number 11 bounds: (1.100000 - 1.200000) data (0) 22 Bin number 12 bounds: (1.200000 - 1.300000) data (0) 23 Bin number 13 bounds: (1.300000 - 1.400000) data (0) 24 Bin number 14 bounds: (1.400000 - 1.500000) data (0) 25 Bin number 15 bounds: (1.500000 - 1.600000) data (0) 26 Bin number 16 bounds: (1.600000 - 1.700000) data (0) 27 Bin number 17 bounds: (1.700000 - 1.800000) data (0) 28 Bin number 18 bounds: (1.800000 - 1.900000) data (0) 29 Bin number 19 bounds: (1.900000 - 2.000000) data (0) 30 31 ---> TESTPOINT PASSED (psImageStats functions{Calculate Histogram, no mask} | tst_psImageStats00.c) 32 33 /----------------------------- TESTPOINT ------------------------------------------\ 34 | TestFile: tst_psImageStats00.c | 35 | TestPoint: psImageStats functions{Calculate Histogram with mask} | 36 | TestType: Positive | 37 \----------------------------------------------------------------------------------/ 38 39 Bin number 0 bounds: (0.000000 - 0.100000) data (1) 40 Bin number 1 bounds: (0.100000 - 0.200000) data (0) 41 Bin number 2 bounds: (0.200000 - 0.300000) data (0) 42 Bin number 3 bounds: (0.300000 - 0.400000) data (0) 43 Bin number 4 bounds: (0.400000 - 0.500000) data (0) 44 Bin number 5 bounds: (0.500000 - 0.600000) data (0) 45 Bin number 6 bounds: (0.600000 - 0.700000) data (0) 46 Bin number 7 bounds: (0.700000 - 0.800000) data (0) 47 Bin number 8 bounds: (0.800000 - 0.900000) data (0) 48 Bin number 9 bounds: (0.900000 - 1.000000) data (0) 49 Bin number 10 bounds: (1.000000 - 1.100000) data (0) 50 Bin number 11 bounds: (1.100000 - 1.200000) data (0) 51 Bin number 12 bounds: (1.200000 - 1.300000) data (0) 52 Bin number 13 bounds: (1.300000 - 1.400000) data (0) 53 Bin number 14 bounds: (1.400000 - 1.500000) data (0) 54 Bin number 15 bounds: (1.500000 - 1.600000) data (0) 55 Bin number 16 bounds: (1.600000 - 1.700000) data (0) 56 Bin number 17 bounds: (1.700000 - 1.800000) data (0) 57 Bin number 18 bounds: (1.800000 - 1.900000) data (0) 58 Bin number 19 bounds: (1.900000 - 2.000000) data (0) 59 60 ---> TESTPOINT PASSED (psImageStats functions{Calculate Histogram with mask} | tst_psImageStats00.c) 61 62 /----------------------------- TESTPOINT ------------------------------------------\ 63 | TestFile: tst_psImageStats00.c | 64 | TestPoint: psImageStats functions{Deallocate the psHistogram/psImage structure.} | 65 | TestType: Positive | 66 \----------------------------------------------------------------------------------/ 67 68 69 ---> TESTPOINT PASSED (psImageStats functions{Deallocate the psHistogram/psImage structure.} | tst_psImageStats00.c) 70 71 ******************************* 72 * IMAGE SIZE is (1 by 32) 73 ******************************* 74 /----------------------------- TESTPOINT ------------------------------------------\ 75 | TestFile: tst_psImageStats00.c | 76 | TestPoint: psImageStats functions{Calculate Histogram, no mask} | 77 | TestType: Positive | 78 \----------------------------------------------------------------------------------/ 79 80 Bin number 0 bounds: (0.000000 - 1.650000) data (2) 81 Bin number 1 bounds: (1.650000 - 3.300000) data (2) 82 Bin number 2 bounds: (3.300000 - 4.950000) data (1) 83 Bin number 3 bounds: (4.950000 - 6.600000) data (2) 84 Bin number 4 bounds: (6.600000 - 8.250000) data (2) 85 Bin number 5 bounds: (8.250000 - 9.900000) data (1) 86 Bin number 6 bounds: (9.900000 - 11.550000) data (2) 87 Bin number 7 bounds: (11.550000 - 13.200000) data (2) 88 Bin number 8 bounds: (13.200000 - 14.849999) data (1) 89 Bin number 9 bounds: (14.849999 - 16.500000) data (2) 90 Bin number 10 bounds: (16.500000 - 18.150000) data (2) 91 Bin number 11 bounds: (18.150000 - 19.799999) data (1) 92 Bin number 12 bounds: (19.799999 - 21.449999) data (2) 93 Bin number 13 bounds: (21.449999 - 23.100000) data (2) 94 Bin number 14 bounds: (23.100000 - 24.750000) data (1) 95 Bin number 15 bounds: (24.750000 - 26.400000) data (2) 96 Bin number 16 bounds: (26.400000 - 28.049999) data (2) 97 Bin number 17 bounds: (28.049999 - 29.699999) data (1) 98 Bin number 18 bounds: (29.699999 - 31.350000) data (2) 99 Bin number 19 bounds: (31.350000 - 33.000000) data (0) 100 101 ---> TESTPOINT PASSED (psImageStats functions{Calculate Histogram, no mask} | tst_psImageStats00.c) 102 103 /----------------------------- TESTPOINT ------------------------------------------\ 104 | TestFile: tst_psImageStats00.c | 105 | TestPoint: psImageStats functions{Calculate Histogram with mask} | 106 | TestType: Positive | 107 \----------------------------------------------------------------------------------/ 108 109 Bin number 0 bounds: (0.000000 - 1.650000) data (2) 110 Bin number 1 bounds: (1.650000 - 3.300000) data (2) 111 Bin number 2 bounds: (3.300000 - 4.950000) data (1) 112 Bin number 3 bounds: (4.950000 - 6.600000) data (2) 113 Bin number 4 bounds: (6.600000 - 8.250000) data (2) 114 Bin number 5 bounds: (8.250000 - 9.900000) data (1) 115 Bin number 6 bounds: (9.900000 - 11.550000) data (2) 116 Bin number 7 bounds: (11.550000 - 13.200000) data (2) 117 Bin number 8 bounds: (13.200000 - 14.849999) data (1) 118 Bin number 9 bounds: (14.849999 - 16.500000) data (2) 119 Bin number 10 bounds: (16.500000 - 18.150000) data (2) 120 Bin number 11 bounds: (18.150000 - 19.799999) data (1) 121 Bin number 12 bounds: (19.799999 - 21.449999) data (2) 122 Bin number 13 bounds: (21.449999 - 23.100000) data (2) 123 Bin number 14 bounds: (23.100000 - 24.750000) data (1) 124 Bin number 15 bounds: (24.750000 - 26.400000) data (2) 125 Bin number 16 bounds: (26.400000 - 28.049999) data (2) 126 Bin number 17 bounds: (28.049999 - 29.699999) data (1) 127 Bin number 18 bounds: (29.699999 - 31.350000) data (2) 128 Bin number 19 bounds: (31.350000 - 33.000000) data (0) 129 130 ---> TESTPOINT PASSED (psImageStats functions{Calculate Histogram with mask} | tst_psImageStats00.c) 131 132 /----------------------------- TESTPOINT ------------------------------------------\ 133 | TestFile: tst_psImageStats00.c | 134 | TestPoint: psImageStats functions{Deallocate the psHistogram/psImage structure.} | 135 | TestType: Positive | 136 \----------------------------------------------------------------------------------/ 137 138 139 ---> TESTPOINT PASSED (psImageStats functions{Deallocate the psHistogram/psImage structure.} | tst_psImageStats00.c) 140 141 ******************************* 142 * IMAGE SIZE is (32 by 1) 143 ******************************* 144 /----------------------------- TESTPOINT ------------------------------------------\ 145 | TestFile: tst_psImageStats00.c | 146 | TestPoint: psImageStats functions{Calculate Histogram, no mask} | 147 | TestType: Positive | 148 \----------------------------------------------------------------------------------/ 149 150 Bin number 0 bounds: (0.000000 - 1.650000) data (2) 151 Bin number 1 bounds: (1.650000 - 3.300000) data (2) 152 Bin number 2 bounds: (3.300000 - 4.950000) data (1) 153 Bin number 3 bounds: (4.950000 - 6.600000) data (2) 154 Bin number 4 bounds: (6.600000 - 8.250000) data (2) 155 Bin number 5 bounds: (8.250000 - 9.900000) data (1) 156 Bin number 6 bounds: (9.900000 - 11.550000) data (2) 157 Bin number 7 bounds: (11.550000 - 13.200000) data (2) 158 Bin number 8 bounds: (13.200000 - 14.849999) data (1) 159 Bin number 9 bounds: (14.849999 - 16.500000) data (2) 160 Bin number 10 bounds: (16.500000 - 18.150000) data (2) 161 Bin number 11 bounds: (18.150000 - 19.799999) data (1) 162 Bin number 12 bounds: (19.799999 - 21.449999) data (2) 163 Bin number 13 bounds: (21.449999 - 23.100000) data (2) 164 Bin number 14 bounds: (23.100000 - 24.750000) data (1) 165 Bin number 15 bounds: (24.750000 - 26.400000) data (2) 166 Bin number 16 bounds: (26.400000 - 28.049999) data (2) 167 Bin number 17 bounds: (28.049999 - 29.699999) data (1) 168 Bin number 18 bounds: (29.699999 - 31.350000) data (2) 169 Bin number 19 bounds: (31.350000 - 33.000000) data (0) 170 171 ---> TESTPOINT PASSED (psImageStats functions{Calculate Histogram, no mask} | tst_psImageStats00.c) 172 173 /----------------------------- TESTPOINT ------------------------------------------\ 174 | TestFile: tst_psImageStats00.c | 175 | TestPoint: psImageStats functions{Calculate Histogram with mask} | 176 | TestType: Positive | 177 \----------------------------------------------------------------------------------/ 178 179 Bin number 0 bounds: (0.000000 - 1.650000) data (2) 180 Bin number 1 bounds: (1.650000 - 3.300000) data (2) 181 Bin number 2 bounds: (3.300000 - 4.950000) data (1) 182 Bin number 3 bounds: (4.950000 - 6.600000) data (2) 183 Bin number 4 bounds: (6.600000 - 8.250000) data (2) 184 Bin number 5 bounds: (8.250000 - 9.900000) data (1) 185 Bin number 6 bounds: (9.900000 - 11.550000) data (2) 186 Bin number 7 bounds: (11.550000 - 13.200000) data (2) 187 Bin number 8 bounds: (13.200000 - 14.849999) data (1) 188 Bin number 9 bounds: (14.849999 - 16.500000) data (2) 189 Bin number 10 bounds: (16.500000 - 18.150000) data (2) 190 Bin number 11 bounds: (18.150000 - 19.799999) data (1) 191 Bin number 12 bounds: (19.799999 - 21.449999) data (2) 192 Bin number 13 bounds: (21.449999 - 23.100000) data (2) 193 Bin number 14 bounds: (23.100000 - 24.750000) data (1) 194 Bin number 15 bounds: (24.750000 - 26.400000) data (2) 195 Bin number 16 bounds: (26.400000 - 28.049999) data (2) 196 Bin number 17 bounds: (28.049999 - 29.699999) data (1) 197 Bin number 18 bounds: (29.699999 - 31.350000) data (2) 198 Bin number 19 bounds: (31.350000 - 33.000000) data (0) 199 200 ---> TESTPOINT PASSED (psImageStats functions{Calculate Histogram with mask} | tst_psImageStats00.c) 201 202 /----------------------------- TESTPOINT ------------------------------------------\ 203 | TestFile: tst_psImageStats00.c | 204 | TestPoint: psImageStats functions{Deallocate the psHistogram/psImage structure.} | 205 | TestType: Positive | 206 \----------------------------------------------------------------------------------/ 207 208 209 ---> TESTPOINT PASSED (psImageStats functions{Deallocate the psHistogram/psImage structure.} | tst_psImageStats00.c) 210 211 ******************************* 212 * IMAGE SIZE is (32 by 32) 213 ******************************* 214 /----------------------------- TESTPOINT ------------------------------------------\ 215 | TestFile: tst_psImageStats00.c | 216 | TestPoint: psImageStats functions{Calculate Histogram, no mask} | 217 | TestType: Positive | 218 \----------------------------------------------------------------------------------/ 219 220 Bin number 0 bounds: (0.000000 - 3.200000) data (10) 221 Bin number 1 bounds: (3.200000 - 6.400000) data (18) 222 Bin number 2 bounds: (6.400000 - 9.600000) data (27) 223 Bin number 3 bounds: (9.600000 - 12.800000) data (36) 224 Bin number 4 bounds: (12.800000 - 16.000000) data (62) 225 Bin number 5 bounds: (16.000000 - 19.200001) data (57) 226 Bin number 6 bounds: (19.200001 - 22.400000) data (66) 227 Bin number 7 bounds: (22.400000 - 25.600000) data (75) 228 Bin number 8 bounds: (25.600000 - 28.800001) data (84) 229 Bin number 9 bounds: (28.800001 - 32.000000) data (124) 230 Bin number 10 bounds: (32.000000 - 35.200001) data (87) 231 Bin number 11 bounds: (35.200001 - 38.400002) data (78) 232 Bin number 12 bounds: (38.400002 - 41.600002) data (69) 233 Bin number 13 bounds: (41.600002 - 44.799999) data (60) 234 Bin number 14 bounds: (44.799999 - 48.000000) data (66) 235 Bin number 15 bounds: (48.000000 - 51.200001) data (39) 236 Bin number 16 bounds: (51.200001 - 54.400002) data (30) 237 Bin number 17 bounds: (54.400002 - 57.600002) data (21) 238 Bin number 18 bounds: (57.600002 - 60.799999) data (12) 239 Bin number 19 bounds: (60.799999 - 64.000000) data (3) 240 241 ---> TESTPOINT PASSED (psImageStats functions{Calculate Histogram, no mask} | tst_psImageStats00.c) 242 243 /----------------------------- TESTPOINT ------------------------------------------\ 244 | TestFile: tst_psImageStats00.c | 245 | TestPoint: psImageStats functions{Calculate Histogram with mask} | 246 | TestType: Positive | 247 \----------------------------------------------------------------------------------/ 248 249 Bin number 0 bounds: (0.000000 - 3.200000) data (10) 250 Bin number 1 bounds: (3.200000 - 6.400000) data (18) 251 Bin number 2 bounds: (6.400000 - 9.600000) data (27) 252 Bin number 3 bounds: (9.600000 - 12.800000) data (36) 253 Bin number 4 bounds: (12.800000 - 16.000000) data (62) 254 Bin number 5 bounds: (16.000000 - 19.200001) data (57) 255 Bin number 6 bounds: (19.200001 - 22.400000) data (66) 256 Bin number 7 bounds: (22.400000 - 25.600000) data (75) 257 Bin number 8 bounds: (25.600000 - 28.800001) data (84) 258 Bin number 9 bounds: (28.800001 - 32.000000) data (124) 259 Bin number 10 bounds: (32.000000 - 35.200001) data (84) 260 Bin number 11 bounds: (35.200001 - 38.400002) data (66) 261 Bin number 12 bounds: (38.400002 - 41.600002) data (48) 262 Bin number 13 bounds: (41.600002 - 44.799999) data (30) 263 Bin number 14 bounds: (44.799999 - 48.000000) data (12) 264 Bin number 15 bounds: (48.000000 - 51.200001) data (0) 265 Bin number 16 bounds: (51.200001 - 54.400002) data (0) 266 Bin number 17 bounds: (54.400002 - 57.600002) data (0) 267 Bin number 18 bounds: (57.600002 - 60.799999) data (0) 268 Bin number 19 bounds: (60.799999 - 64.000000) data (0) 269 270 ---> TESTPOINT PASSED (psImageStats functions{Calculate Histogram with mask} | tst_psImageStats00.c) 271 272 /----------------------------- TESTPOINT ------------------------------------------\ 273 | TestFile: tst_psImageStats00.c | 274 | TestPoint: psImageStats functions{Deallocate the psHistogram/psImage structure.} | 275 | TestType: Positive | 276 \----------------------------------------------------------------------------------/ 277 278 279 ---> TESTPOINT PASSED (psImageStats functions{Deallocate the psHistogram/psImage structure.} | tst_psImageStats00.c) 280 281 ******************************* 282 * IMAGE SIZE is (32 by 64) 283 ******************************* 284 /----------------------------- TESTPOINT ------------------------------------------\ 285 | TestFile: tst_psImageStats00.c | 286 | TestPoint: psImageStats functions{Calculate Histogram, no mask} | 287 | TestType: Positive | 288 \----------------------------------------------------------------------------------/ 289 290 Bin number 0 bounds: (0.000000 - 4.800000) data (15) 291 Bin number 1 bounds: (4.800000 - 9.600000) data (40) 292 Bin number 2 bounds: (9.600000 - 14.400001) data (65) 293 Bin number 3 bounds: (14.400001 - 19.200001) data (90) 294 Bin number 4 bounds: (19.200001 - 24.000000) data (115) 295 Bin number 5 bounds: (24.000000 - 28.800001) data (110) 296 Bin number 6 bounds: (28.800001 - 33.600002) data (157) 297 Bin number 7 bounds: (33.600002 - 38.400002) data (160) 298 Bin number 8 bounds: (38.400002 - 43.200001) data (160) 299 Bin number 9 bounds: (43.200001 - 48.000000) data (160) 300 Bin number 10 bounds: (48.000000 - 52.800003) data (128) 301 Bin number 11 bounds: (52.800003 - 57.600002) data (160) 302 Bin number 12 bounds: (57.600002 - 62.400002) data (160) 303 Bin number 13 bounds: (62.400002 - 67.200005) data (150) 304 Bin number 14 bounds: (67.200005 - 72.000000) data (125) 305 Bin number 15 bounds: (72.000000 - 76.800003) data (82) 306 Bin number 16 bounds: (76.800003 - 81.600006) data (80) 307 Bin number 17 bounds: (81.600006 - 86.400002) data (55) 308 Bin number 18 bounds: (86.400002 - 91.200005) data (30) 309 Bin number 19 bounds: (91.200005 - 96.000000) data (6) 310 311 ---> TESTPOINT PASSED (psImageStats functions{Calculate Histogram, no mask} | tst_psImageStats00.c) 312 313 /----------------------------- TESTPOINT ------------------------------------------\ 314 | TestFile: tst_psImageStats00.c | 315 | TestPoint: psImageStats functions{Calculate Histogram with mask} | 316 | TestType: Positive | 317 \----------------------------------------------------------------------------------/ 318 319 Bin number 0 bounds: (0.000000 - 4.800000) data (15) 320 Bin number 1 bounds: (4.800000 - 9.600000) data (40) 321 Bin number 2 bounds: (9.600000 - 14.400001) data (65) 322 Bin number 3 bounds: (14.400001 - 19.200001) data (90) 323 Bin number 4 bounds: (19.200001 - 24.000000) data (115) 324 Bin number 5 bounds: (24.000000 - 28.800001) data (110) 325 Bin number 6 bounds: (28.800001 - 33.600002) data (157) 326 Bin number 7 bounds: (33.600002 - 38.400002) data (160) 327 Bin number 8 bounds: (38.400002 - 43.200001) data (160) 328 Bin number 9 bounds: (43.200001 - 48.000000) data (160) 329 Bin number 10 bounds: (48.000000 - 52.800003) data (122) 330 Bin number 11 bounds: (52.800003 - 57.600002) data (130) 331 Bin number 12 bounds: (57.600002 - 62.400002) data (105) 332 Bin number 13 bounds: (62.400002 - 67.200005) data (76) 333 Bin number 14 bounds: (67.200005 - 72.000000) data (50) 334 Bin number 15 bounds: (72.000000 - 76.800003) data (22) 335 Bin number 16 bounds: (76.800003 - 81.600006) data (6) 336 Bin number 17 bounds: (81.600006 - 86.400002) data (0) 337 Bin number 18 bounds: (86.400002 - 91.200005) data (0) 338 Bin number 19 bounds: (91.200005 - 96.000000) data (0) 339 340 ---> TESTPOINT PASSED (psImageStats functions{Calculate Histogram with mask} | tst_psImageStats00.c) 341 342 /----------------------------- TESTPOINT ------------------------------------------\ 343 | TestFile: tst_psImageStats00.c | 344 | TestPoint: psImageStats functions{Deallocate the psHistogram/psImage structure.} | 345 | TestType: Positive | 346 \----------------------------------------------------------------------------------/ 347 348 349 ---> TESTPOINT PASSED (psImageStats functions{Deallocate the psHistogram/psImage structure.} | tst_psImageStats00.c) 350 351 ******************************* 352 * IMAGE SIZE is (64 by 32) 353 ******************************* 354 /----------------------------- TESTPOINT ------------------------------------------\ 355 | TestFile: tst_psImageStats00.c | 356 | TestPoint: psImageStats functions{Calculate Histogram, no mask} | 357 | TestType: Positive | 358 \----------------------------------------------------------------------------------/ 359 360 Bin number 0 bounds: (0.000000 - 4.800000) data (15) 361 Bin number 1 bounds: (4.800000 - 9.600000) data (40) 362 Bin number 2 bounds: (9.600000 - 14.400001) data (65) 363 Bin number 3 bounds: (14.400001 - 19.200001) data (90) 364 Bin number 4 bounds: (19.200001 - 24.000000) data (115) 365 Bin number 5 bounds: (24.000000 - 28.800001) data (110) 366 Bin number 6 bounds: (28.800001 - 33.600002) data (157) 367 Bin number 7 bounds: (33.600002 - 38.400002) data (160) 368 Bin number 8 bounds: (38.400002 - 43.200001) data (160) 369 Bin number 9 bounds: (43.200001 - 48.000000) data (160) 370 Bin number 10 bounds: (48.000000 - 52.800003) data (128) 371 Bin number 11 bounds: (52.800003 - 57.600002) data (160) 372 Bin number 12 bounds: (57.600002 - 62.400002) data (160) 373 Bin number 13 bounds: (62.400002 - 67.200005) data (150) 374 Bin number 14 bounds: (67.200005 - 72.000000) data (125) 375 Bin number 15 bounds: (72.000000 - 76.800003) data (82) 376 Bin number 16 bounds: (76.800003 - 81.600006) data (80) 377 Bin number 17 bounds: (81.600006 - 86.400002) data (55) 378 Bin number 18 bounds: (86.400002 - 91.200005) data (30) 379 Bin number 19 bounds: (91.200005 - 96.000000) data (6) 380 381 ---> TESTPOINT PASSED (psImageStats functions{Calculate Histogram, no mask} | tst_psImageStats00.c) 382 383 /----------------------------- TESTPOINT ------------------------------------------\ 384 | TestFile: tst_psImageStats00.c | 385 | TestPoint: psImageStats functions{Calculate Histogram with mask} | 386 | TestType: Positive | 387 \----------------------------------------------------------------------------------/ 388 389 Bin number 0 bounds: (0.000000 - 4.800000) data (15) 390 Bin number 1 bounds: (4.800000 - 9.600000) data (40) 391 Bin number 2 bounds: (9.600000 - 14.400001) data (65) 392 Bin number 3 bounds: (14.400001 - 19.200001) data (90) 393 Bin number 4 bounds: (19.200001 - 24.000000) data (115) 394 Bin number 5 bounds: (24.000000 - 28.800001) data (110) 395 Bin number 6 bounds: (28.800001 - 33.600002) data (157) 396 Bin number 7 bounds: (33.600002 - 38.400002) data (160) 397 Bin number 8 bounds: (38.400002 - 43.200001) data (160) 398 Bin number 9 bounds: (43.200001 - 48.000000) data (160) 399 Bin number 10 bounds: (48.000000 - 52.800003) data (122) 400 Bin number 11 bounds: (52.800003 - 57.600002) data (130) 401 Bin number 12 bounds: (57.600002 - 62.400002) data (105) 402 Bin number 13 bounds: (62.400002 - 67.200005) data (76) 403 Bin number 14 bounds: (67.200005 - 72.000000) data (50) 404 Bin number 15 bounds: (72.000000 - 76.800003) data (22) 405 Bin number 16 bounds: (76.800003 - 81.600006) data (6) 406 Bin number 17 bounds: (81.600006 - 86.400002) data (0) 407 Bin number 18 bounds: (86.400002 - 91.200005) data (0) 408 Bin number 19 bounds: (91.200005 - 96.000000) data (0) 409 410 ---> TESTPOINT PASSED (psImageStats functions{Calculate Histogram with mask} | tst_psImageStats00.c) 411 412 /----------------------------- TESTPOINT ------------------------------------------\ 413 | TestFile: tst_psImageStats00.c | 414 | TestPoint: psImageStats functions{Deallocate the psHistogram/psImage structure.} | 415 | TestType: Positive | 416 \----------------------------------------------------------------------------------/ 417 418 419 ---> TESTPOINT PASSED (psImageStats functions{Deallocate the psHistogram/psImage structure.} | tst_psImageStats00.c) 420 421 /----------------------------- TESTPOINT ------------------------------------------\ 422 | TestFile: tst_psImageStats00.c | 423 | TestPoint: psImageStats functions{Calling psImageHistogram() with NULL parameters} | 424 | TestType: Positive | 425 \----------------------------------------------------------------------------------/ 426 427 428 ---> TESTPOINT PASSED (psImageStats functions{Calling psImageHistogram() with NULL parameters} | tst_psImageStats00.c) 429
Note:
See TracChangeset
for help on using the changeset viewer.
