Is there a way to compute the percentage of pixels in this image of a certain colour, whilst ignoring the (dark blue) background in the calculation?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
I'm trying to get the percentages of different coloured pixels in this image, but haven't found a way to either ignore the background or to ignore it in the percentage calculations. Any help would be appreciated!
![otsuMinusBackground.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/270971/otsuMinusBackground.jpeg)
댓글 수: 0
채택된 답변
KSSV
2020년 2월 11일
If I is your image.....And your pixel value is n. Use:
idx = I==n ;
YOur idx will be a matrix with 1's and 0's...
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Filtering and Enhancement에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!