how to save a zone of figure as picture

2 Ansichten (letzte 30 Tage)
Roger
Roger am 8 Mai 2015
Beantwortet: Thomas Koelen am 8 Mai 2015
if i use gcf , it get the whole figure saved . i just want to save a special zone of this figure. a rectangle zone , is there any way to make it ?

Antworten (2)

Azzi Abdelmalek
Azzi Abdelmalek am 8 Mai 2015
Use imrect to select a rectangle in your image, and get its position, then create a new image and save it

Thomas Koelen
Thomas Koelen am 8 Mai 2015
im=imread('pout.tif');
imshow(im);
h=imrect(gca);
pos=wait(h);
im2=imcrop(im,pos);
imwrite(im2,'figurepart.bmp')
Automatically saves the crop you made. ofcourse you'll have im to the desired image.

Kategorien

Mehr zu Printing and Saving finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by