필터 지우기
필터 지우기

RGB image masking ....

조회 수: 1 (최근 30일)
Piyum Rangana
Piyum Rangana 2017년 3월 25일
답변: Jan 2017년 3월 25일
How do I create a mask of an whole image using a defined threshold value ? The output should have a three channels(R, G, B). Could you please support me ?
  댓글 수: 1
Jan
Jan 2017년 3월 25일
A threshold for what? The R-channel, the intensity, the contrast?

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

채택된 답변

Jan
Jan 2017년 3월 25일
If you want e.g. a mask for a certain level of the red channel:
Img = rand(64, 48, 3); % Test data
Mask = Imd(:, :, 1) > 0.8; % Test mask
Mask3 = cat(3, Mask, Mask, Mask);
Img(Mask3) = 0; % Apply 3D mask: set red channels > 0.8 to 0.0

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by