Changeset 42493
- Timestamp:
- Aug 15, 2023, 4:59:00 AM (3 years ago)
- Location:
- branches/eam_branches/ipp-20230313/psLib/test
- Files:
-
- 1 added
- 15 edited
-
astro/tap_psCoord.c (modified) (8 diffs)
-
astro/tap_psCoord02.c (modified) (12 diffs)
-
fits/tap_psFits.c (modified) (1 diff)
-
imageops/Makefile.am (modified) (2 diffs)
-
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)
-
jpeg/tap_psImageJpeg.c (modified) (1 diff)
-
math/Makefile.am (modified) (1 diff)
-
math/tap_psMinimizeLMM.c (modified) (4 diffs)
-
math/tap_psMinimizePowell.c (modified) (2 diffs)
-
math/tap_psPolyFit_IRLS.c (added)
-
math/tap_psSparse.c (modified) (4 diffs)
-
sys/tap_psMemory.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20230313/psLib/test/astro/tap_psCoord.c
r13623 r42493 48 48 { 49 49 psMemId id = psMemGetId(); 50 psPlaneTransform *myPT = psPlaneTransformAlloc(ORDER_X, ORDER_Y );50 psPlaneTransform *myPT = psPlaneTransformAlloc(ORDER_X, ORDER_Y, PS_POLYNOMIAL_ORD); 51 51 ok(myPT != NULL, "psPlaneTransformAlloc() returned non-NULL"); 52 52 skip_start(myPT == NULL, 4, "Skipping tests because psPlaneTransformAlloc() returned NULL"); … … 59 59 // Attempt to specify negative x order and verify NULL returned and 60 60 // errror message generated 61 myPT = psPlaneTransformAlloc(-1, 1 );61 myPT = psPlaneTransformAlloc(-1, 1, PS_POLYNOMIAL_ORD); 62 62 ok(myPT == NULL, "psPlaneTransformAlloc(-1, 1) returned NULL"); 63 63 psFree(myPT); 64 64 65 myPT = psPlaneTransformAlloc(1, -1 );65 myPT = psPlaneTransformAlloc(1, -1, PS_POLYNOMIAL_ORD); 66 66 ok(myPT == NULL, "psPlaneTransformAlloc(1, -1) returned NULL"); 67 67 psFree(myPT); … … 110 110 ok(in != NULL, "psPlaneAlloc() returned non-NULL"); 111 111 skip_start(in == NULL, 2, "Skipping tests because psPlaneAlloc() returned NULL"); 112 psPlaneTransform* pt = psPlaneTransformAlloc(2, 2);112 psPlaneTransform* pt = psPlaneTransformAlloc(2, 2, PS_POLYNOMIAL_ORD); 113 113 ok(pt != NULL, "psPlaneTransformAlloc() returned non-NULL"); 114 114 skip_start(pt == NULL, 1, "Skipping tests because psPlaneTransformAlloc() returned NULL"); … … 169 169 psMemId id = psMemGetId(); 170 170 psPlane *in = psPlaneAlloc(); 171 psPlaneTransform *pt = psPlaneTransformAlloc(2, 2);171 psPlaneTransform *pt = psPlaneTransformAlloc(2, 2, PS_POLYNOMIAL_ORD); 172 172 psFree(pt->x); 173 173 pt->x = NULL; … … 184 184 psMemId id = psMemGetId(); 185 185 psPlane* in = psPlaneAlloc(); 186 psPlaneTransform* pt = psPlaneTransformAlloc(2,2 );186 psPlaneTransform* pt = psPlaneTransformAlloc(2,2, PS_POLYNOMIAL_ORD); 187 187 psFree(pt->y); 188 188 pt->y = NULL; … … 198 198 { 199 199 psMemId id = psMemGetId(); 200 psPlaneTransform* pt = psPlaneTransformAlloc(2,2 );200 psPlaneTransform* pt = psPlaneTransformAlloc(2,2, PS_POLYNOMIAL_ORD); 201 201 psPlane *tmpPL = psPlaneTransformApply(NULL, pt, NULL); 202 202 ok(tmpPL == NULL, "psPlaneTransformApply(NULL, pt, NULL) did not return NULL"); … … 314 314 { 315 315 psMemId id = psMemGetId(); 316 psPlaneTransform *trans = psPlaneTransformAlloc(1, 3 );316 psPlaneTransform *trans = psPlaneTransformAlloc(1, 3, PS_POLYNOMIAL_ORD); 317 317 psPixels *output = psPixelsTransform(NULL, NULL, trans); 318 318 ok(output == NULL, "psPixelsTransform(NULL, NULL, trans) returned NULL"); … … 342 342 input->data[1].x = 1.0; 343 343 input->data[1].y = 6.0; 344 psPlaneTransform *trans = psPlaneTransformAlloc(1, 3 );344 psPlaneTransform *trans = psPlaneTransformAlloc(1, 3, PS_POLYNOMIAL_ORD); 345 345 trans->x->coeff[0][0] = 0; 346 346 trans->x->coeff[1][0] = 1.0; -
branches/eam_branches/ipp-20230313/psLib/test/astro/tap_psCoord02.c
r13623 r42493 189 189 for (psS32 t2yy = 0 ; t2yy < TST04_T2_Y_Y ; t2yy++) { 190 190 //printf("(%d %d %d %d %d %d %d %d)\n", t1xx, t1xy, t1yx, t1yy, t2xx, t2xy, t2yx, t2yy); 191 psPlaneTransform *trans1 = psPlaneTransformAlloc(PS_MAX(t1xx, t1yx), PS_MAX(t1xy, t1yy) );192 psPlaneTransform *trans2 = psPlaneTransformAlloc(PS_MAX(t2xx, t2yx), PS_MAX(t2xy, t2yy) );191 psPlaneTransform *trans1 = psPlaneTransformAlloc(PS_MAX(t1xx, t1yx), PS_MAX(t1xy, t1yy), PS_POLYNOMIAL_ORD); 192 psPlaneTransform *trans2 = psPlaneTransformAlloc(PS_MAX(t2xx, t2yx), PS_MAX(t2xy, t2yy), PS_POLYNOMIAL_ORD); 193 193 psPlaneTransform *trans3 = NULL; 194 194 setCoeffs(trans1, trans2); … … 228 228 { 229 229 psMemId id = psMemGetId(); 230 psPlaneTransform *trans2 = psPlaneTransformAlloc(2, 2 );230 psPlaneTransform *trans2 = psPlaneTransformAlloc(2, 2, PS_POLYNOMIAL_ORD); 231 231 psPlaneTransform *trans3 = psPlaneTransformCombine(NULL, NULL, trans2, psRegionSet(0,0,0,0), 10); 232 232 ok(trans3 == NULL, "psPlaneTransformCombine() returned NULL with NULL trans1 input"); … … 241 241 { 242 242 psMemId id = psMemGetId(); 243 psPlaneTransform *trans1 = psPlaneTransformAlloc(2, 2 );243 psPlaneTransform *trans1 = psPlaneTransformAlloc(2, 2, PS_POLYNOMIAL_ORD); 244 244 psPlaneTransform *trans3 = psPlaneTransformCombine(NULL, trans1, NULL, psRegionSet(0,0,0,0), 10); 245 245 ok(trans3 == NULL, "psPlaneTransformCombine() returned NULL with NULL trans2 input"); … … 281 281 { 282 282 psMemId id = psMemGetId(); 283 psPlaneTransform *trans = psPlaneTransformAlloc(TST05_X_POLY_ORDER, TST05_Y_POLY_ORDER );283 psPlaneTransform *trans = psPlaneTransformAlloc(TST05_X_POLY_ORDER, TST05_Y_POLY_ORDER, PS_POLYNOMIAL_ORD); 284 284 psArray *dst = psArrayAlloc((int) TST05_NUM_DATA); 285 285 ok(!psPlaneTransformFit(trans, NULL, dst, 100, 100.0), "psPlaneTransformFit() returned FALSE with NULL src psArray"); … … 295 295 { 296 296 psMemId id = psMemGetId(); 297 psPlaneTransform *trans = psPlaneTransformAlloc(TST05_X_POLY_ORDER, TST05_Y_POLY_ORDER );297 psPlaneTransform *trans = psPlaneTransformAlloc(TST05_X_POLY_ORDER, TST05_Y_POLY_ORDER, PS_POLYNOMIAL_ORD); 298 298 psArray *src = psArrayAlloc((int) TST05_NUM_DATA); 299 299 ok(!psPlaneTransformFit(trans, src, NULL, 100, 100.0), "psPlaneTransformFit() returned FALSE with NULL dst psArray"); … … 309 309 { 310 310 psMemId id = psMemGetId(); 311 psPlaneTransform *trans = psPlaneTransformAlloc(TST05_X_POLY_ORDER, TST05_Y_POLY_ORDER );312 psPlaneTransform *transInit = psPlaneTransformAlloc(TST05_X_POLY_ORDER, TST05_Y_POLY_ORDER );311 psPlaneTransform *trans = psPlaneTransformAlloc(TST05_X_POLY_ORDER, TST05_Y_POLY_ORDER, PS_POLYNOMIAL_ORD); 312 psPlaneTransform *transInit = psPlaneTransformAlloc(TST05_X_POLY_ORDER, TST05_Y_POLY_ORDER, PS_POLYNOMIAL_ORD); 313 313 psArray *src = psArrayAlloc((int) TST05_NUM_DATA); 314 314 psArray *dst = psArrayAlloc((int) TST05_NUM_DATA); … … 403 403 psMemId id = psMemGetId(); 404 404 psRegion myRegion = psRegionSet(1.0, 5.0, 1.0, 5.0); 405 psPlaneTransform *transInverse = psPlaneTransformInvert(NULL, NULL, myRegion, 10 );405 psPlaneTransform *transInverse = psPlaneTransformInvert(NULL, NULL, myRegion, 10, 2); 406 406 ok(transInverse == NULL, "psPlaneTransformInvert() returned NULL with NULL trans"); 407 407 psFree(transInverse); … … 416 416 { 417 417 psMemId id = psMemGetId(); 418 psPlaneTransform *trans = psPlaneTransformAlloc(1, 1 );418 psPlaneTransform *trans = psPlaneTransformAlloc(1, 1, PS_POLYNOMIAL_ORD); 419 419 psRegion myRegion = psRegionSet(1.0, 5.0, 1.0, 5.0); 420 psPlaneTransform *transInverse = psPlaneTransformInvert(NULL, trans, myRegion, 0 );420 psPlaneTransform *transInverse = psPlaneTransformInvert(NULL, trans, myRegion, 0, 2); 421 421 ok(transInverse == NULL, "psPlaneTransformInvert() returned NULL with zero nSamples"); 422 422 psFree(trans); … … 434 434 psMemId id = psMemGetId(); 435 435 bool errorFlag = false; 436 psPlaneTransform *trans = psPlaneTransformAlloc(1, 1 );436 psPlaneTransform *trans = psPlaneTransformAlloc(1, 1, PS_POLYNOMIAL_ORD); 437 437 psPlaneTransform *transInverse = NULL; 438 438 psRegion myRegion = psRegionSet(1.0, 5.0, 1.0, 5.0); … … 473 473 } 474 474 475 transInverse = psPlaneTransformInvert(NULL, trans, myRegion, 10 );475 transInverse = psPlaneTransformInvert(NULL, trans, myRegion, 10, 2); 476 476 if (transInverse == NULL) { 477 477 diag("TEST ERROR: psPlaneTransformInvert() returned a NULL psPlaneTransform.\n"); … … 514 514 { 515 515 psMemId id = psMemGetId(); 516 psPlaneTransform *trans = psPlaneTransformAlloc(1, 3 );516 psPlaneTransform *trans = psPlaneTransformAlloc(1, 3, PS_POLYNOMIAL_ORD); 517 517 psPlane *deriv = psPlaneTransformDeriv(NULL, trans, NULL); 518 518 ok(deriv == NULL, "psPlaneTransformDeriv(NULL, trans, NULL) returned NULL"); … … 532 532 coord->x = 3.0; 533 533 coord->y = 1.0; 534 trans = psPlaneTransformAlloc(1, 3 );534 trans = psPlaneTransformAlloc(1, 3, PS_POLYNOMIAL_ORD); 535 535 //Set Polynomials. f(x) = x, f(y) = 0.5*y^2 --> f'(x) = 1, f'(y) = y 536 536 //So for 1,1 -> f'(1) = 1, f'(1) = 1 -
branches/eam_branches/ipp-20230313/psLib/test/fits/tap_psFits.c
r15709 r42493 717 717 ok(vecItem != NULL, "Retrieved psVector metadata item from file (row=%d)", row); 718 718 719 ok(vecItem->type.type == PS_ DATA_S32 &&719 ok(vecItem->type.type == PS_TYPE_S32 && 720 720 vecItem->data.S32[0] == row && 721 721 vecItem->data.S32[3] == row+30, -
branches/eam_branches/ipp-20230313/psLib/test/imageops/Makefile.am
r36375 r42493 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 -
branches/eam_branches/ipp-20230313/psLib/test/imageops/tap_psImageGeomManip.c
r21169 r42493 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 || -
branches/eam_branches/ipp-20230313/psLib/test/imageops/tap_psImageInterpolate3.c
r29929 r42493 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); -
branches/eam_branches/ipp-20230313/psLib/test/imageops/tap_psImageMapFit.c
r20767 r42493 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); -
branches/eam_branches/ipp-20230313/psLib/test/imageops/tap_psImageMapFit2.c
r20767 r42493 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 -
branches/eam_branches/ipp-20230313/psLib/test/imageops/tap_psImageMaskOps.c
r13123 r42493 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++) { -
branches/eam_branches/ipp-20230313/psLib/test/jpeg/tap_psImageJpeg.c
r29542 r42493 82 82 83 83 // add elements to bDraw buffer 84 bDrawSetBuffer(bdbuf);84 // XXX deprecated: bDrawSetBuffer(bdbuf); 85 85 bDrawColor red = KapaColorByName("red"); 86 bDrawSetStyle ( red, 1,0);87 bDrawCircle( 40.0, 20.0, 3.0);86 bDrawSetStyle (bdbuf, red, 1, 0, 1.0); 87 bDrawCircle(bdbuf, 40.0, 20.0, 3.0); 88 88 89 89 options->min = ZMIN; -
branches/eam_branches/ipp-20230313/psLib/test/math/Makefile.am
r35767 r42493 23 23 tap_psMatrix07 \ 24 24 tap_psMatrix08 \ 25 tap_psPolyFit_IRLS \ 25 26 tap_psPolyFit1D \ 26 27 tap_psPolyFit2D \ -
branches/eam_branches/ipp-20230313/psLib/test/math/tap_psMinimizeLMM.c
r23259 r42493 53 53 54 54 #define NUM_ITER 10 55 #define TOL 20.0 55 #define MIN_TOL 20.0 56 #define MAX_TOL 40.0 56 57 psS32 main(psS32 argc, char* argv[]) 57 58 { … … 64 65 { 65 66 psMemId id = psMemGetId(); 66 psMinimization *tmp = psMinimizationAlloc(NUM_ITER, TOL);67 psMinimization *tmp = psMinimizationAlloc(NUM_ITER, MIN_TOL, MAX_TOL); 67 68 ok(tmp != NULL, "psMinimizationAlloc() returned non-NULL"); 68 69 skip_start(tmp == NULL, 5, "Skipping tests because psMinimizationAlloc() failed"); 69 70 ok(tmp->maxIter == NUM_ITER, "psMinimizationAlloc() properly set ->maxIter"); 70 ok(tmp->tol == TOL, "psMinimizationAlloc() properly set ->tol"); 71 ok(tmp->minTol == MIN_TOL, "psMinimizationAlloc() properly set ->tol"); 72 ok(tmp->maxTol == MAX_TOL, "psMinimizationAlloc() properly set ->tol"); 71 73 ok(tmp->value == 0.0, "psMinimizationAlloc() properly set ->value"); 72 74 ok(tmp->iter == 0, "psMinimizationAlloc() properly set ->iter (%d)", tmp->iter); … … 96 98 psMemId id = psMemGetId(); 97 99 psRandom *rng = psRandomAllocSpecific(PS_RANDOM_TAUS, 1); // Random number generator; using known seed 98 psMinimization *min = psMinimizationAlloc(NUM_ITERATIONS, ERR_TOL );100 psMinimization *min = psMinimizationAlloc(NUM_ITERATIONS, ERR_TOL, 100); 99 101 psArray *ordinates = psArrayAlloc(NUM_DATA_POINTS); 100 102 psVector *coordinates = psVectorAlloc(NUM_DATA_POINTS, PS_TYPE_F32); … … 204 206 psMemId id = psMemGetId(); 205 207 psRandom *rng = psRandomAllocSpecific(PS_RANDOM_TAUS, 1); // Random number generator; using known seed 206 psMinimization *min = psMinimizationAlloc(NUM_ITERATIONS, ERR_TOL );208 psMinimization *min = psMinimizationAlloc(NUM_ITERATIONS, ERR_TOL, 100); 207 209 psArray *ordinates = psArrayAlloc(NUM_DATA_POINTS); 208 210 psVector *coordinates = psVectorAlloc(NUM_DATA_POINTS, PS_TYPE_F32); -
branches/eam_branches/ipp-20230313/psLib/test/math/tap_psMinimizePowell.c
r13124 r42493 81 81 psVector *myParams = psVectorAlloc(NUM_PARAMS, PS_TYPE_F32); 82 82 psVector *myParamMask = psVectorAlloc(NUM_PARAMS, PS_TYPE_U8); 83 psMinimization *min = psMinimizationAlloc(100, 0.01 );83 psMinimization *min = psMinimizationAlloc(100, 0.01, 0.1); 84 84 psArray *myCoords = psArrayAlloc(N); 85 85 … … 136 136 psMemId id = psMemGetId(); 137 137 psVector *myParams = psVectorAlloc(NUM_PARAMS, PS_TYPE_F32); 138 psMinimization *min = psMinimizationAlloc(100, 0.01 );138 psMinimization *min = psMinimizationAlloc(100, 0.01, 0.1); 139 139 psArray *myCoords = psArrayAlloc(N); 140 140 psVector *myParamMask = psVectorAlloc(NUM_PARAMS, PS_TYPE_U8); -
branches/eam_branches/ipp-20230313/psLib/test/math/tap_psSparse.c
r13124 r42493 1 #include <stdio.h>1 #include <stdio.h> 2 2 #include <string.h> 3 3 #include <pslib.h> … … 227 227 // test the support functions: LowerProduct 228 228 fVec = psSparseBorderLowerProduct(NULL, border, xRef); 229 is_ float(fVec->n, 1.0, "f dimen: %d", fVec->n);229 is_int(fVec->n, 1.0, "f dimen: %d", fVec->n); 230 230 is_float(fVec->data.F32[0], 0.3, "f(0): %f", fVec->data.F32[0]); 231 231 psFree(fVec); … … 233 233 // test the support functions: Upper Product 234 234 fVec = psSparseBorderUpperProduct(NULL, border, yRef); 235 is_ float(fVec->n, 2.0, "f dimen: %d", fVec->n);235 is_int(fVec->n, 2.0, "f dimen: %d", fVec->n); 236 236 is_float(fVec->data.F32[0], 0.05, "f(0): %f", fVec->data.F32[0]); 237 237 is_float(fVec->data.F32[1], 0.10, "f(0): %f", fVec->data.F32[1]); … … 240 240 // test the support functions: Square Product 241 241 fVec = psSparseBorderSquareProduct(NULL, border, yRef); 242 is_ float(fVec->n, 1.0, "f dimen: %d", fVec->n);242 is_int(fVec->n, 1.0, "f dimen: %d", fVec->n); 243 243 is_float(fVec->data.F32[0], 0.25, "f(0): %f", fVec->data.F32[0]); 244 244 psFree(fVec); -
branches/eam_branches/ipp-20230313/psLib/test/sys/tap_psMemory.c
r41171 r42493 428 428 429 429 psPlaneTransform *planeTransform; 430 planeTransform = psPlaneTransformAlloc(1, 1 );430 planeTransform = psPlaneTransformAlloc(1, 1, PS_POLYNOMIAL_ORD); 431 431 okay = psMemCheckType(PS_DATA_PLANETRANSFORM, planeTransform); 432 432 if (!okay ) psFree(planeTransform);
Note:
See TracChangeset
for help on using the changeset viewer.
