how can i get the three component keeping R, G, B value, when the binary “1”, with others setting to 0.
조회 수: 1 (최근 30일)
이전 댓글 표시
Muhammad Hammad Malik
2018년 2월 10일
댓글: Muhammad Hammad Malik
2018년 2월 11일
i need matlab code, i am doing image processing for red fruit detection. kindly help me in getting R , G , B value when the binary “1”, with others setting to 0. guide me as soon as possible.thanks. @Image Analyst and others pls
댓글 수: 0
채택된 답변
Walter Roberson
2018년 2월 11일
Use .* to multiply the mask and the color image.
For example,
RGB = imread('peppers.png');
bw = im2binarize(RGB); %find brighter parts
mask = bw(:,:,[1 1 1]); %make the mask 3d
maskedRGB = RGB .* mask;
댓글 수: 3
Walter Roberson
2018년 2월 11일
That sounds like a different question. There have been several previous questions about fruit detection that might help. Search for tag:fruit
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!