how we can select 1/4th part of picture in matlab

2 Comments

Why tagged as "class"?
What picture? The surf.gif picture you posted? Do you want 1/4 of that rendered picture, or do you want to plot just 1/4 of the data that was plotted in that picture. What does "select" mean exactly. Come on, you need to be more precise and descriptive in what you want if you want meaningful help.

Sign in to comment.

Answers (2)

Use imcrop() if you have the Image Processing Toolbox.
h=imread('pout.tif');
imshow(h)
[n,m]=size(h)
h4=h(1:round(n/2),1:round(m/2))
figure;imshow(h4) %top left corner
or bottom left corner
h4=h(round(n/2):end,1:round(m/2))
imshow(h4)
or bottom righ corner
h4=h(round(n/2):end,round(m/2):end)
imshow(h4)
or top right corner
h4=h(1:round(n/2),round(m/2):end)
imshow(h4)

Categories

Find more on Data Import and Analysis in Help Center and File Exchange

Tags

Asked:

on 23 Sep 2012

Community Treasure Hunt

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

Start Hunting!