counting of pixels having same same value
이전 댓글 표시
how to count pixels having same value
댓글 수: 4
Adam
2019년 4월 8일
sum( myImage == someValue );
in the absence of any substantive information on what you are counting them in!
monika SINGH
2019년 4월 8일
Manuel Schmidberger
2019년 4월 8일
Depending on that you wanna count (one or more values) you can use this:
VALS=[1,2...N] % Array of values 1xN
thermIm= % Matrix of thermal image values
noVals=sum(sum(ismember(thermIm,VALS)))
noVals is the amount of pixels in thermal image containing the values stored in array VALS
If you have just one value you can just use a combination of "length" and "find"
VAL= % Random number 1x1
noVals=length(find(thermIm==VAL))
Image Analyst
2019년 4월 8일
Please put Answers down in the Answer section.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Contrast Adjustment에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!