How to NaN selected threshold values of red,green and blue using matlab code
조회 수: 1 (최근 30일)
이전 댓글 표시
How to NaN selected threshold values of red,green and blue using matlab code
댓글 수: 1
Jan
2017년 6월 23일
Please mention any details. What are the inputs, how is the threshold applied? Does "NaN values" is a verb, which means setting the pixel values to NaN?
채택된 답변
Rik
2017년 6월 23일
Don't hide information in the tags. Next time, have a read here. Your question is not clear, so this is the answer to what I guess to be your answer. I didn't take the time to check for syntax errors.
IM=rand(100,100,3);IM=uint8(255*IM);%dummy data
[r,c]=find(IM(:,:,1)==60 & IM(:,:,2)==100 & IM(:,:,3)==120);
IM(r,c,:)=NaN;
댓글 수: 0
추가 답변 (1개)
Jan
2017년 6월 23일
A bolöd guess:
mask = Img(:, :, 1) == 60 & ...
Img(:, :, 2) == 100 & ...
Img(:, :, 3) == 120;
Img(cat(3, mask, mask, mask)) = NaN;
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Numeric Types에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!