How to plot a cropped image in another axis within the same figure?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Dominik Mattioli
am 23 Jan. 2018
Beantwortet: Walter Roberson
am 23 Jan. 2018
If my figure has two axes/subplots and one of them plots an image, how can I use imcrop on that image and plot the cropped image in the other axis/subplot?
Ideally, the plot of the cropped image in the second axis/subplot will update as I adjust the rectangular cropping tool used on the image in the first axis/subplot.
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 23 Jan. 2018
cropped_version = imcrop(handle_of_first_axes);
imshow(cropped_version, 'Parent', handle_of_second_axes);
This will not update as you adjust the crop tool.
For interactive cropping, imcrop calls the undocumented internal toolbox/images/imuitools/+iptui/imcropRect.m which you could copy and hack for your own purposes (but it might rely on other tools in +iptui )
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Visual Exploration finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!