how to expang an image

i am working on "Center Point Determination & Cropping",wen i divide the image into blocks of 8*8,the image appears too small on screen,how to enlarge it,can anyone help me please

댓글 수: 4

Jan
Jan 2011년 9월 12일
Please explain any details. Dividing the image into block do not display *anything* on the screen, and in cosnequence it cannot be dispalyed too small. Please post the code, hwich you use for displaying.
Pat
Pat 2011년 9월 13일
MY CODES
% imshow(IMGcells)
% I=imread('1.tif');
% [r c]=size(I);
% bs=8; % Block Size (8x8)
%
% nob=(r/bs)*(c/bs); % Total number of 8x8 Blocks
%
% % Dividing the image into 8x8 Blocks
% kk=0;
% for i=1:(r/bs)
% for j=1:(c/bs)
% Block(:,:,kk+j)=I((bs*(i-1)+1:bs*(i-1)+bs),(bs*(j-1)+1:bs*(j-1)+bs));
% end
% kk=kk+(r/bs);
% end
%
% % Accessing individual Blocks
% figure;imshow(Block(:,:,1)) % This shows u the fist 8x8 Block in a figure window
% figure;imshow(Block(:,:,2)) % This shows u the second 8x8 Block (i.e as per my %coding rows from 1:8 and col from 9:16) in a figure window and so on.....
THE TWO FIGURES ARE DISPALYED ARE VERY SMALL,CAN U HELP PLEASE
Walter Roberson
Walter Roberson 2011년 9월 13일
See Sean's answer, or switch to using image() instead of imshow and then read my answer.
Walter Roberson
Walter Roberson 2011년 9월 13일
By the way, your line
Block(:,:,kk+j)=I((bs*(i-1)+1:bs*(i-1)+bs),(bs*(j-1)+1:bs*(j-1)+bs));
can be written more efficiently as
Block(:,:,kk+j)=I((bs*(i-1)+1:bs*i),(bs*(j-1)+1:bs*j));
There are additional efficiencies that can be used as well.

댓글을 달려면 로그인하십시오.

답변 (2개)

Walter Roberson
Walter Roberson 2011년 9월 12일

0 개 추천

Changing the axes limits via xlim() and ylim() will make the image appear larger or smaller.
Sean de Wolski
Sean de Wolski 2011년 9월 12일

0 개 추천

Look at the 'InitialMagnification' option in both imshow and imtool

질문:

Pat
2011년 9월 12일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by