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 Comments

Jan
Jan on 12 Sep 2011
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 on 13 Sep 2011
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
See Sean's answer, or switch to using image() instead of imshow and then read my answer.
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.

Sign in to comment.

Answers (2)

Walter Roberson
Walter Roberson on 12 Sep 2011

0 votes

Changing the axes limits via xlim() and ylim() will make the image appear larger or smaller.
Sean de Wolski
Sean de Wolski on 12 Sep 2011

0 votes

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

Categories

Asked:

Pat
on 12 Sep 2011

Community Treasure Hunt

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

Start Hunting!