Fit UIAxes to image dimensions automatically
19 views (last 30 days)
I use the code (App designer file attach) to mark a ROI. On of the things that I can not solve is that the UIAxes dimension are bigger than the image (white background) as well that the customizable rectangular ROI can be set outside the image dimension.
Therefore, How can I set the UIAxes to fit any image dimensions automatically?
Dave B on 2 Feb 2022
How about adding the line:
in the LoadimageButtonPushed method after the imshow line?
Also note, if you really want to ensure the roi never leaves the image, you're best off using images.roi.Rectangle as discussed in this answer.