How can I prevent moving ROI out of the image edges?
Show older comments
I have a Region Of Interest (ROI) on an image. Please see the following code:
a=imread('rice.png'); I=imshow (a); e = imellipse(gca,[]);
The ROI can be moved on the image by mouse dragging. I want that the ROI cannot be able to move out of the image, and be stopped when its bounds reach to the image edges. I would be much appreciated it if you could help me for resolving this problem. Thank you very much
Accepted Answer
More Answers (1)
azim
on 17 Dec 2015
0 votes
Categories
Find more on ROI-Based Processing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!