필터 지우기
필터 지우기

what is the meaning of "red and green narrow bands filtered by monochromatic filter"

조회 수: 2 (최근 30일)
Hii, I want to know what is the meaning of applying "monochromatic filters to R and G channels of RGB images" and how to impliment these filters in MATLAB.

채택된 답변

Walter Roberson
Walter Roberson 2023년 5월 20일
Example:
img = imread('flamingos.jpg');
imshow(img); title('original');
R = img(:,:,1);
G = img(:,:,2);
B = img(:,:,3);
Rmask = R > 200 & R < 240;
Gmask = G > 50;
imshow(Rmask); title('red mask');
imshow(Gmask); title('green mask');
overallmask = cast(Rmask & Gmask, 'like', img);
filtered_R = R .* overallmask;
filtered_G = G .* overallmask;
filtered_B = B .* overallmask;
filtered = cat(3, filtered_R, filtered_G, filtered_B);
imshow(filtered); title('filtered')
  댓글 수: 2
Walter Roberson
Walter Roberson 2023년 5월 20일
A monocromatic filter is a filter that is applied to only one of the color channels (at at time, anyhow.)
For example, the flamingos image has orange flamingos and pink flamingos, but orange and pink are not pure Red or Green or Blue, and can only be detected as combinations of those colors. If you were to examine only the Red channel, then you would not be able to isolate the orange flamingos. But sometimes there are useful things that can be done if you work channel by channel.
Manu Gowda
Manu Gowda 2023년 5월 20일
I got the concept, Thank you for shraing the knowledge.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by