How to mask a binary image with a mask?
1 次查看(过去 30 天)
显示 更早的评论
Friends I have a small problem with a image and a mask , I need to make a mask in a binary image how can do this?
0 个评论
回答(1 个)
Image Analyst
2015-6-28
Pass your mask into your binary image. If you want to blacken outside the mask, one way to do it is:
binaryImage(~mask) = false;
Another way is
binaryImage = binaryImage & mask;
If you don't know how to create a mask, you can use thresholding, or draw by hand like in my attached demos.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Data Workflows 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!