Changeset 42822 for trunk/psLib/test/imageops
- Timestamp:
- May 8, 2025, 4:42:12 PM (12 months ago)
- Location:
- trunk/psLib/test
- Files:
-
- 9 edited
-
. (modified) (1 prop)
-
imageops (modified) (1 prop)
-
imageops/Makefile.am (modified) (2 diffs)
-
imageops/convolutionBench.c (modified) (1 diff)
-
imageops/tap_psImageGeomManip.c (modified) (8 diffs)
-
imageops/tap_psImageInterpolate3.c (modified) (4 diffs)
-
imageops/tap_psImageMapFit.c (modified) (11 diffs)
-
imageops/tap_psImageMapFit2.c (modified) (3 diffs)
-
imageops/tap_psImageMaskOps.c (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test
- Property svn:ignore
-
old new 6 6 *.da 7 7 gmon.out 8 test.00.jpg 9 test.01.jpg 10 test.02.jpg 11 test.03.jpg 12 test.04.jpg 13 test.05.jpg 14 test.06.jpg 15 test.07.jpg 16 test.08.jpg 17 test.09.jpg 18 test.10.jpg 19 test.11.jpg 20 test.12.jpg 21 test.im.fits 22 test.mk.fits 23 test.sm1.fits 24 test.sm2.fits 25 test.sm3.fits 26 test.sm4.fits 27 tmpImages 28 tst_psTrace02_OUT
-
- Property svn:ignore
-
trunk/psLib/test/imageops
- Property svn:ignore
-
old new 38 38 tap_psImageMapFit 39 39 tap_psImageMapFit2 40 tap_psImageCovariance 41 tap_psImageSmoothMask_Threaded 42 test-suite.log
-
- Property svn:ignore
-
trunk/psLib/test/imageops/Makefile.am
r36375 r42822 18 18 tap_psImageSmooth \ 19 19 tap_psImageSmoothMask_Threaded \ 20 tap_psImageSmooth_PreAlloc \21 20 tap_psImageStructManip \ 22 21 tap_psImageConvolve \ … … 32 31 tap_psImageCovariance 33 32 33 # tap_psImageSmooth_PreAlloc 34 34 # tap_psImageShiftKernel 35 35 # tap_psImageInterpolate -
trunk/psLib/test/imageops/convolutionBench.c
r23259 r42822 56 56 } 57 57 58 char size[ 16];58 char size[32]; 59 59 sprintf(size, "%dx%d", imageCols, imageRows); 60 60 printf("%15s", size); -
trunk/psLib/test/imageops/tap_psImageGeomManip.c
r21169 r42822 528 528 529 529 psImage *in; 530 psImage *out;531 psImage *out2;532 530 psS32 rows = 64; 533 531 psS32 cols = 64; … … 544 542 // Verify the returned psImage structure pointer is NULL and program 545 543 // execution doesn't stop, if input parameter input is NULL. 546 out2 = psImageRoll(NULL,NULL,0,0);544 psImage *out2 = psImageRoll(NULL,NULL,0,0); 547 545 if (out2 != NULL) { 548 546 psError(PS_ERR_UNKNOWN, true,"psImageRoll did not return NULL though input image was NULL!?"); … … 551 549 552 550 psFree(in); 553 psFree(out );554 555 #define testRollType(DATATYPE)\551 psFree(out2); 552 553 #define testRollType(DATATYPE) { \ 556 554 in = psImageAlloc(rows1,cols1,PS_TYPE_##DATATYPE); \ 557 555 \ … … 564 562 \ 565 563 errorFlag = false; \ 566 out = psImageRoll(NULL,in,rows1/4,cols1/4);\564 psImage *out = psImageRoll(NULL,in,rows1/4,cols1/4); \ 567 565 for (psS32 row=0;row<rows1;row++) { \ 568 566 ps##DATATYPE *inRow = in->data.DATATYPE[(row+rows1/4)%rows1]; \ … … 579 577 psFree(in); \ 580 578 psFree(out); \ 581 ok(!errorFlag, "psImageRoll() produced the correct data values"); 579 ok(!errorFlag, "psImageRoll() produced the correct data values"); } 582 580 583 581 testRollType(U8); … … 636 634 system("mkdir temp"); 637 635 psS32 index = 0; 638 psBool fail = false;639 636 psF32 radianRot; 640 637 … … 711 708 diag("verified psF32 image failed to be read (%d deg. rotation)", rot); 712 709 errorFlag = true; 713 fail = true;714 710 } else { 715 711 if(fTruth->numRows != fOut->numRows || fTruth->numCols != fOut->numCols) { … … 788 784 "(%d deg. rotation) BILINEAR",rot); 789 785 errorFlag = true; 790 fail = true;791 786 } else { 792 787 if (sBiTruth->numRows != sBiOut->numRows || -
trunk/psLib/test/imageops/tap_psImageInterpolate3.c
r29929 r42822 74 74 // point (1) : center of center pixel 75 75 interpOK = psImageInterpolate(&imageVal, NULL, NULL, xCenter + 0.5, yCenter + 0.5, interp); 76 ok (interpOK == PS_INTERPOLATE_STATUS_GOOD, "ok pixel"); 76 77 pt1->data.F32[i] = imageVal; 77 78 78 79 // point (2) : edge of center pixel 79 80 interpOK = psImageInterpolate(&imageVal, NULL, NULL, xCenter + 0.5, yCenter, interp); 81 ok (interpOK == PS_INTERPOLATE_STATUS_GOOD, "ok pixel"); 80 82 pt2->data.F32[i] = imageVal; 81 83 82 84 // point (3) : corner of center pixel 83 85 interpOK = psImageInterpolate(&imageVal, NULL, NULL, xCenter, yCenter, interp); 86 ok (interpOK == PS_INTERPOLATE_STATUS_GOOD, "ok pixel"); 84 87 pt3->data.F32[i] = imageVal; 85 88 … … 102 105 103 106 interpOK = psImageInterpolate(&imageVal, &varianceVal, NULL, xCenter + 0.5, yCenter + 0.5, interp); 107 ok (interpOK == PS_INTERPOLATE_STATUS_GOOD, "ok pixel"); 104 108 psStatsInit(stats); 105 109 psVectorStats(stats, pt1, NULL, NULL, 0); … … 107 111 108 112 interpOK = psImageInterpolate(&imageVal, &varianceVal, NULL, xCenter + 0.5, yCenter, interp); 113 ok (interpOK == PS_INTERPOLATE_STATUS_GOOD, "ok pixel"); 109 114 psStatsInit(stats); 110 115 psVectorStats(stats, pt2, NULL, NULL, 0); … … 112 117 113 118 interpOK = psImageInterpolate(&imageVal, &varianceVal, NULL, xCenter, yCenter, interp); 119 ok (interpOK == PS_INTERPOLATE_STATUS_GOOD, "ok pixel"); 114 120 psStatsInit(stats); 115 121 psVectorStats(stats, pt3, NULL, NULL, 0); -
trunk/psLib/test/imageops/tap_psImageMapFit.c
r20767 r42822 79 79 80 80 // fit the data to the map 81 psImageMapFit (map, NULL, 0, x, y, f, NULL); 81 bool status; 82 psImageMapFit (&status, map, NULL, 0, x, y, f, NULL); 83 ok (status, "ok fit"); 82 84 83 85 psImage *model = psImageAlloc(field->numCols, field->numRows, PS_TYPE_F32); … … 153 155 154 156 // fit the data to the map 155 psImageMapFit (map, NULL, 0, x, y, f, NULL); 157 bool status; 158 psImageMapFit (&status, map, NULL, 0, x, y, f, NULL); 159 ok (status, "ok fit"); 156 160 157 161 psImage *model = psImageAlloc(field->numCols, field->numRows, PS_TYPE_F32); … … 235 239 236 240 // fit the data to the map 237 psImageMapFit (map, NULL, 0, x, y, f, NULL); 241 bool status; 242 psImageMapFit (&status, map, NULL, 0, x, y, f, NULL); 243 ok (status, "ok fit"); 238 244 239 245 psImage *model = psImageAlloc(field->numCols, field->numRows, PS_TYPE_F32); … … 318 324 319 325 // fit the data to the map 320 psImageMapFit (map, NULL, 0, x, y, f, NULL); 326 bool status; 327 psImageMapFit (&status, map, NULL, 0, x, y, f, NULL); 328 ok (status, "ok fit"); 321 329 322 330 psImage *model = psImageAlloc(field->numCols, field->numRows, PS_TYPE_F32); … … 384 392 385 393 // fit the data to the map 386 psImageMapFit (map, NULL, 0, x, y, f, NULL); 394 bool status; 395 psImageMapFit (&status, map, NULL, 0, x, y, f, NULL); 396 ok (status, "ok fit"); 387 397 388 398 psImage *model = psImageAlloc(field->numCols, field->numRows, PS_TYPE_F32); … … 445 455 446 456 // fit the data to the map 447 psImageMapFit (map, NULL, 0, x, y, f, NULL); 457 bool status; 458 psImageMapFit (&status, map, NULL, 0, x, y, f, NULL); 459 ok (status, "ok fit"); 448 460 449 461 psImage *model = psImageAlloc(field->numCols, field->numRows, PS_TYPE_F32); … … 526 538 527 539 // fit the data to the map 528 psImageMapFit (map, NULL, 0, x, y, f, NULL); 540 bool status; 541 psImageMapFit (&status, map, NULL, 0, x, y, f, NULL); 542 ok (status, "ok fit"); 529 543 530 544 psImage *model = psImageAlloc(field->numCols, field->numRows, PS_TYPE_F32); … … 595 609 596 610 // fit the data to the map 597 psImageMapFit (map, NULL, 0, x, y, f, NULL); 611 bool status; 612 psImageMapFit (&status, map, NULL, 0, x, y, f, NULL); 613 ok (status, "ok fit"); 598 614 599 615 psImage *model = psImageAlloc(field->numCols, field->numRows, PS_TYPE_F32); … … 686 702 687 703 // fit the data to the map 688 psImageMapFit (map, NULL, 0, x, y, f, NULL); 704 bool status; 705 psImageMapFit (&status, map, NULL, 0, x, y, f, NULL); 706 ok (status, "ok fit"); 689 707 690 708 psImage *model = psImageAlloc(field->numCols, field->numRows, PS_TYPE_F32); … … 753 771 754 772 // fit the data to the map 755 psImageMapFit (map, NULL, 0, x, y, f, NULL); 773 bool status; 774 psImageMapFit (&status, map, NULL, 0, x, y, f, NULL); 775 ok (status, "ok fit"); 756 776 757 777 psImage *model = psImageAlloc(field->numCols, field->numRows, PS_TYPE_F32); … … 814 834 815 835 // fit the data to the map 816 psImageMapFit (map, NULL, 0, x, y, f, NULL); 836 bool status; 837 psImageMapFit (&status, map, NULL, 0, x, y, f, NULL); 838 ok (status, "ok fit"); 817 839 818 840 psImage *model = psImageAlloc(field->numCols, field->numRows, PS_TYPE_F32); -
trunk/psLib/test/imageops/tap_psImageMapFit2.c
r20767 r42822 61 61 62 62 // fit the data to the map 63 psImageMapFit (map, x, y, f, NULL); 63 bool status; 64 psImageMapFit (&status, map, NULL, 0, x, y, f, NULL); 65 ok (status, "ok fit"); 66 // psImageMapFit (map, x, y, f, NULL); 64 67 65 68 psImage *field = psImageAlloc(1000, 1000, PS_TYPE_F32); … … 124 127 for (int ix = 0; ix < 1000; ix += 20) { 125 128 for (int iy = 0; iy < 1000; iy += 20) { 126 x->data.F32[x->n] = ix + 0 ,5;129 x->data.F32[x->n] = ix + 0.5; 127 130 y->data.F32[y->n] = iy + 0.5; 128 131 f->data.F32[f->n] = PS_SQR(x->data.F32[x->n]) + PS_SQR(y->data.F32[x->n]); … … 141 144 // XXX this function needs to correct for the mean superpixel position 142 145 // which is sampled... 143 psImageMapFit (map, NULL, 0, x, y, f, NULL); 146 bool status; 147 psImageMapFit (&status, map, NULL, 0, x, y, f, NULL); 148 ok (status, "ok fit"); 149 // psImageMapFit (map, NULL, 0, x, y, f, NULL); 144 150 psFree (binning); 145 151 -
trunk/psLib/test/imageops/tap_psImageMaskOps.c
r13123 r42822 121 121 } 122 122 psImageMaskRegion(img, reg, "=", maskVal); 123 psBoolerrorFlag = false;123 errorFlag = false; 124 124 for (int i = 0 ; i < numRows ; i++) { 125 125 for (int j = 0 ; j < numCols ; j++) { … … 149 149 maskVal = 0xf; 150 150 psImageMaskRegion(img, reg, "&", maskVal); 151 psBoolerrorFlag = false;151 errorFlag = false; 152 152 for (int i = 0 ; i < numRows ; i++) { 153 153 for (int j = 0 ; j < numCols ; j++) { … … 177 177 maskVal = 0xf; 178 178 psImageMaskRegion(img, reg, "^", maskVal); 179 psBoolerrorFlag = false;179 errorFlag = false; 180 180 for (int i = 0 ; i < numRows ; i++) { 181 181 for (int j = 0 ; j < numCols ; j++) { … … 250 250 } 251 251 psImageKeepRegion(img, reg, "=", maskVal); 252 psBoolerrorFlag = false;252 errorFlag = false; 253 253 for (int i = 0 ; i < numRows ; i++) { 254 254 for (int j = 0 ; j < numCols ; j++) { … … 278 278 maskVal = 0xf; 279 279 psImageKeepRegion(img, reg, "&", maskVal); 280 psBoolerrorFlag = false;280 errorFlag = false; 281 281 for (int i = 0 ; i < numRows ; i++) { 282 282 for (int j = 0 ; j < numCols ; j++) { … … 306 306 maskVal = 0xf; 307 307 psImageKeepRegion(img, reg, "^", maskVal); 308 psBoolerrorFlag = false;308 errorFlag = false; 309 309 for (int i = 0 ; i < numRows ; i++) { 310 310 for (int j = 0 ; j < numCols ; j++) { … … 381 381 } 382 382 psImageMaskCircle(img, (psF64) x, (psF64) y, (psF64) radius, "=", maskVal); 383 psBoolerrorFlag = false;383 errorFlag = false; 384 384 for (int i = 0 ; i < numRows ; i++) { 385 385 for (int j = 0 ; j < numCols ; j++) { … … 409 409 maskVal = 0xf; 410 410 psImageMaskCircle(img, (psF64) x, (psF64) y, (psF64) radius, "&", maskVal); 411 psBoolerrorFlag = false;411 errorFlag = false; 412 412 for (int i = 0 ; i < numRows ; i++) { 413 413 for (int j = 0 ; j < numCols ; j++) { … … 437 437 maskVal = 0xf; 438 438 psImageMaskCircle(img, (psF64) x, (psF64) y, (psF64) radius, "^", maskVal); 439 psBoolerrorFlag = false;439 errorFlag = false; 440 440 for (int i = 0 ; i < numRows ; i++) { 441 441 for (int j = 0 ; j < numCols ; j++) { … … 504 504 } 505 505 psImageKeepCircle(img, (psF64) x, (psF64) y, (psF64) radius, "=", maskVal); 506 psBoolerrorFlag = false;506 errorFlag = false; 507 507 for (int i = 0 ; i < numRows ; i++) { 508 508 for (int j = 0 ; j < numCols ; j++) { … … 532 532 maskVal = 0xf; 533 533 psImageKeepCircle(img, (psF64) x, (psF64) y, (psF64) radius, "&", maskVal); 534 psBoolerrorFlag = false;534 errorFlag = false; 535 535 for (int i = 0 ; i < numRows ; i++) { 536 536 for (int j = 0 ; j < numCols ; j++) { … … 560 560 maskVal = 0xf; 561 561 psImageKeepCircle(img, (psF64) x, (psF64) y, (psF64) radius, "^", maskVal); 562 psBoolerrorFlag = false;562 errorFlag = false; 563 563 for (int i = 0 ; i < numRows ; i++) { 564 564 for (int j = 0 ; j < numCols ; j++) {
Note:
See TracChangeset
for help on using the changeset viewer.
