"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Libtmp/Image2D/t/image2d.t" between
PDL-2.081.tar.gz and PDL-2.082.tar.gz

About: PDL (Perl Data Language) aims to turn perl into an efficient numerical language for scientific computing (similar to IDL and MatLab).

image2d.t  (PDL-2.081):image2d.t  (PDL-2.082)
skipping to change at line 323 skipping to change at line 323
use PDL::NiceSlice; use PDL::NiceSlice;
# we try 1st-, 2nd-, and 3rd-order fits, with and without restrictions to shif t-and-scale-only # we try 1st-, 2nd-, and 3rd-order fits, with and without restrictions to shif t-and-scale-only
foreach my $deg(2,3,4){ foreach my $deg(2,3,4){
my $fit = zeroes(byte,$deg,$deg,2); my $fit = zeroes(byte,$deg,$deg,2);
$fit(:,(0),(0)).=1; $fit(:,(0),(0)).=1;
$fit((0),:,(1)).=1; $fit((0),:,(1)).=1;
foreach my $restrict_fit(1,0){ foreach my $restrict_fit(1,0){
my ($pxn,$pyn) = fitwarp2d($x,$y,$u,$v,$deg,$restrict_fit?{FIT=>$fit}:{ }); my ($pxn,$pyn) = fitwarp2d($x,$y,$u,$v,$deg,$restrict_fit?{FIT=>$fit}:{ });
my $out = warp2d($shift,$pxn,$pyn); my $out = warp2d($shift,$pxn,$pyn);
ok(all(approx($out,$img,1e-3)),'warp2d ' . ($restrict_fit?'':'un') . "r estricted deg $deg values approx"); ok(all(approx($out,$img,1e-3)),'warp2d ' . ($restrict_fit?'':'un') . "r estricted deg $deg values approx") or diag "got=$out\nexpected=$img";
ok(all($out->rint==$img),'warp2d ' . ($restrict_fit?'':'un') . "restric ted deg $deg rint exact"); ok(all($out->rint==$img),'warp2d ' . ($restrict_fit?'':'un') . "restric ted deg $deg rint exact");
} }
} }
} }
done_testing; done_testing;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)