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

2 commentaires

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.

Connectez-vous pour commenter.

Réponses (2)

Wayne King
Wayne King le 23 Sep 2012

0 votes

Use imcrop() if you have the Image Processing Toolbox.
Azzi Abdelmalek
Azzi Abdelmalek le 23 Sep 2012
Modifié(e) : Azzi Abdelmalek le 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)

Catégories

En savoir plus sur Data Import and Analysis dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by