Mercurial > hg > octave-image
changeset 353:df32d581e7a8
Fix demo to show all images
author | hauberg |
---|---|
date | Sat, 01 Nov 2008 15:58:47 +0000 |
parents | 4ca0cea0e940 |
children | 594055014a19 |
files | inst/imremap.m |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/inst/imremap.m +++ b/inst/imremap.m @@ -212,22 +212,22 @@ %! I = tril(ones(100)) + abs(rand(100)); I(I>1) = 1; %! I(20:30, 20:30) = !I(20:30, 20:30); %! I(70:80, 70:80) = !I(70:80, 70:80); -%! imshow(I); +%! figure, imshow(I); %! ## Resize the image to the double size and show it %! [XI, YI] = meshgrid(linspace(1, 100, 200)); %! warped = imremap(I, XI, YI); -%! imshow(warped); +%! figure, imshow(warped); %!demo %! ## Generate a synthetic image and show it %! I = tril(ones(100)) + abs(rand(100)); I(I>1) = 1; %! I(20:30, 20:30) = !I(20:30, 20:30); %! I(70:80, 70:80) = !I(70:80, 70:80); -%! imshow(I); +%! figure, imshow(I); %! ## Rotate the image around (0, 0) by -0.4 radians and show it %! [XI, YI] = meshgrid(1:100); %! R = [cos(-0.4) sin(-0.4); -sin(-0.4) cos(-0.4)]; %! RXY = [XI(:), YI(:)] * R; %! XI = reshape(RXY(:,1), [100, 100]); YI = reshape(RXY(:,2), [100, 100]); %! warped = imremap(I, XI, YI); -%! imshow(warped); +%! figure, imshow(warped);