필터 지우기
필터 지우기

Can I extract brown lines from one image?

조회 수: 1 (최근 30일)
Kwanghun Choi
Kwanghun Choi 2017년 10월 18일
답변: Image Analyst 2017년 10월 19일
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
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?
Kwanghun Choi
Kwanghun Choi 2017년 10월 19일
I want a binary mask indicating the position.

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
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개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!