How to convert specific part of the image into binary form.
4 次查看(过去 30 天)
显示 更早的评论
How do i want to convert only the green part to binary image so it will become like tis http://www.freeimagehosting.net/kbkac
0 个评论
回答(1 个)
Image Analyst
2012-8-4
How about
binaryImage = grayImage > 50; % Or some other value.
5 个评论
Image Analyst
2012-8-4
You're welcome. What way did you use? I never use im2bw() because it takes thresholds in the range of 0-1 and I find that very inconvenient. I'd rather pass in a gray level but it's not smart enough for that (yet - I'm going to bring it up with them). Internally im2bw ()does what I did. It just has to convert either the threshold to an actual gray level or convert the image to the range 0-1. But then it has to do the thresholding like I did it.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Segmentation and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!