Can I extract brown lines from one image?
1 次查看(过去 30 天)
显示 更早的评论
Hello! :)
I have to extract brown lines from one image(=topographic map). Line are curved and RGB information is like
Red : 187 Green : 172 Blue : 158 .
How can I input that color value into matlab? And how can I extract the line?
3 个评论
Cam Salzberger
2017-10-18
What format do you want the line to be "extracted" in? Do you want a binary mask indicating the position of the line? Do you want the indices of the line pixels? Do you want the start and endpoints of the line?
采纳的回答
Image Analyst
2017-10-19
Try this:
% Extract the individual red, green, and blue color channels.
redChannel = rgbImage(:, :, 1);
greenChannel = rgbImage(:, :, 2);
blueChannel = rgbImage(:, :, 3);
% Find brown pixels.
mask = redChannel == 187 & greenChannel == 172 & blueChannel == 158;
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 영상 필터링 및 향상 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!