How to find the dark pixels in an image?
이전 댓글 표시
Hello. I have a lot of images like this one:

From the whole shrimp, I would like to determine the area of dark pixels as a percentage of the visible surface. Does anybody have an idea how to do that? My idea is to first define/find the desired color and then filter the image for that defined color.
Thanks Falamanki
채택된 답변
추가 답변 (1개)
Walter Roberson
2017년 11월 28일
0 개 추천
You could try rgb2gray, then imbinarize using some brightness level you consider to be "dark", and count the number of 0 in the result.
카테고리
도움말 센터 및 File Exchange에서 Display 2-D Images에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!