Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
How would I go about running trough an RGB image and turning all pixels with R >200 to white?
조회 수: 1 (최근 30일)
이전 댓글 표시
Fairly new to working with images and I have been scrounging the net but can't seem to find anything simple to understand. All I want to do is remove the background of an image which is all a singular color from and image and just either make it black or white.
I really just don't understand how to move through step by step of a 3d array when the third element is 3 values on its own...
댓글 수: 0
답변 (1개)
Arun Mathamkode
2018년 2월 23일
You can use logical indexing. First, find a logical map to find the pixels locations (R>200) and use this logical map for logical indexing. if I is 3D matrix representing the image,
map=I(:,:,1)>200;
I(map(:,:,[1,1,1]))=0;
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!