how we can select 1/4th part of picture in matlab
Mostrar comentarios más antiguos

2 comentarios
per isakson
el 23 de Sept. de 2012
Why tagged as "class"?
Image Analyst
el 23 de Sept. de 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.
Respuestas (2)
Wayne King
el 23 de Sept. de 2012
0 votos
Use imcrop() if you have the Image Processing Toolbox.
Azzi Abdelmalek
el 23 de Sept. de 2012
Editada: Azzi Abdelmalek
el 23 de Sept. de 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)
Categorías
Más información sobre Data Import and Analysis en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!