필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

please provide with the color identification base paper for the following code

조회 수: 2 (최근 30일)
BUGATHA VARALAKSHMI
BUGATHA VARALAKSHMI 2017년 3월 23일
마감: MATLAB Answer Bot 2021년 8월 20일
a=0;
b=0;
c=0;
p=0;
p1=0;
I=imread('E:\projectimages\imgs\clg.jpg')
imshow(I)
fnam=imread('E:\projectimages\imgs\clg.jpg');
figure,imshow(fnam)
for mm = 1:size(fnam,1)
for nn = 1:size(fnam,2)
if (fnam(mm,nn,2)) > fnam(mm,nn,1) && (fnam(mm,nn,2)) > fnam(mm,nn,3)
fnam(mm,nn,1) = fnam(mm,nn,1);
fnam(mm,nn,2) = fnam(mm,nn,2);
fnam(mm,nn,3) = fnam(mm,nn,3);
a=a+1;
%
else
fnam(mm,nn,1) = 0;
fnam(mm,nn,2) = 0;
fnam(mm,nn,3) = 0;
b=b+1;
end
end
end
p = a / (a + b);
p1 = p * 100;
imshow(fnam);
a = sprintf('Vegetation Pixel Count= %3d',a);
b = sprintf('Non Vegetation Pixel count= %3d',b);
c = sprintf('Percentage of area of veg is %3f %',p1);
msgbox(a);
msgbox(b);
msgbox(c);

답변 (1개)

Walter Roberson
Walter Roberson 2017년 3월 23일
There is no "paper" for that. The code just extracts the pixels for which the green component is greater than the red or blue, and calls those pixels "vegetation". That is not a robust way to calculate vegetation. For one thing, it leaves out all brown, but a lot of wood is brown.

이 질문은 마감되었습니다.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by