how i can remove the white colour in binary image ? please help me
1 次查看(过去 30 天)
显示 更早的评论
my objective is to remove the stalk from palm oil fruit , i already convert the image into binary image , but then the stalk become in white colour, so i need to remove those white colour and convert back to RGB. ho i can remove those white colour ? please help me
0 个评论
采纳的回答
Image Analyst
2017-6-17
Mask the RGB image
% Mask the image using bsxfun() function
maskedRgbImage = bsxfun(@times, rgbImage, cast(~mask, 'like', rgbImage));
Note that I used ~ to invert the mask so we will keep anything that is black, and remove (blacken) anything that is white in your mask from the RGB image.
更多回答(0 个)
另请参阅
类别
在 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!