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

2 Comments
per isakson
on 23 Sep 2012
Why tagged as "class"?
Image Analyst
on 23 Sep 2012
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.
Answers (2)
Wayne King
on 23 Sep 2012
0 votes
Use imcrop() if you have the Image Processing Toolbox.
Azzi Abdelmalek
on 23 Sep 2012
Edited: Azzi Abdelmalek
on 23 Sep 2012
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
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!