please tell me the meaning of following code
이전 댓글 표시
darks = find(v <.2)';
lights = find(s < .05 & v > .85)';
h([darks lights])= -1;
disp(length(darks))
black = length(darks)/pixels;[x,y, z]=size(I);
white = length(lights)/pixels;
red = length(find((h >.9167 | h <=.083) & h~=-1))/pixels;
yellow=length(find(h >.083 & h<=.25))/pixels;
green=length(find(h > .25 & h<= .4167))/pixels;
cyan= length(find(h > .4167 & h<= .5833))/pixels;
blue=length(find(h > .5833 & h <= .75))/pixels;
magenta=length(find(h > .75 & h <= .9167))/pixels;
채택된 답변
추가 답변 (1개)
Image Analyst
2014년 6월 20일
0 개 추천
It's counting the number of pixels with those particular colors.
댓글 수: 2
Anamika baruah
2014년 6월 21일
Image Analyst
2014년 6월 21일
편집: Image Analyst
2014년 6월 21일
Yes, but it's normalized (by dividing by the number of pixels), so it's really an area fraction than a pure count.
카테고리
도움말 센터 및 File Exchange에서 Image Arithmetic에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!