![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/174103/image.jpeg)
Remove a region in Image
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I'm looking to remove a region from images. For example, I'd like to use freehand as shown in the image and delete that portion of the image, i.e., turn it in to white because some unpredictable regions like that are troublesome. I'd like to use it for as many time as necessary. I looked into roi, but it turns entire image black and the selected region white. Also, how can you make sure freehand is enclosed. Would you require both ends of the freehand going inside, so you're always sure it is enclosed. Will freehand be always enclosed? Looks like there is a small gap between two ends.
Thanks for the help!
0 个评论
采纳的回答
Image Analyst
2013-12-16
编辑:Image Analyst
2013-12-16
That is exactly what my freehand masking demo does. It's attached below in blue.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/174103/image.jpeg)
13 个评论
Image Analyst
2013-12-17
Don't use clear or clearvars or clearall in a GUI, and don't use evalin() - there's never a need to do that. That is what is causing problems. If your axes have more than one image, then call cla('reset') before you call imshow().
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!