필터 지우기
필터 지우기

Separating vegetation from bare soil

조회 수: 1 (최근 30일)
PARIVASH PARIDAD
PARIVASH PARIDAD 2019년 7월 26일
댓글: KALYAN ACHARJYA 2019년 7월 26일
I need to separate the vegetation pixels from bare soil on a thermal image. I got a NDVI map which can be used to distinguish the areas where vegatation is present and I have to find a threshold value on the NDVI map that separates bare soil from vegetation and and by using this threshold value, I need to perfom a mask on the thermal image finally. I do not have much Matlab knowledge and I am sorry for my question but does anyone know how to perfom this in Matlab? I can attach my NDVI map.
  댓글 수: 2
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 7월 26일
편집: KALYAN ACHARJYA 2019년 7월 26일
Please do attach, alos it would be help to answer, if you mentioned, what you have? and what you want?
PARIVASH PARIDAD
PARIVASH PARIDAD 2019년 7월 26일
편집: PARIVASH PARIDAD 2019년 7월 26일
Thanks for your fast response. I am sorry that my question did not provide enough information.
I have a vegetation index map which shows the areas that the vegetation is present. My goal is to get rid of all the pixels of the soil from this map since I need the soil pixels.
To achieve this, I have chosen a threshold value that separates soil from vegetation. Vegetation usually ranges from 0.2-0.8 so my first question is that I need a queue in Matlab which can identify the valid threshold for separating vegetation pixels from bare soil.
Secondly, by using the threshold value, I need a code to mask the soil.
I thank you in advance.

댓글을 달려면 로그인하십시오.

채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 7월 26일
편집: KALYAN ACHARJYA 2019년 7월 26일
Which are green pixels, read about RGB color model, based on that you may distinct the color of the pixel till some extent.
image1=imread('NGRDI.png');
th=8; %Chnage as per your requirements
[rows colm]=size(image1);
for i=1:size(image1,1)
for j=1:size(image1,2)
if (image1(i,j,2)-th)>image1(i,j,1) && (image1(i,j,2)-th)>image1(i,j,3)
image1(i,j,1)=0;
image1(i,j,2)=250; % Choose any value 0-255, just represents color of planes
image1(i,j,3)=250; % Choose any value 0-255, just represents color of planes
end
end
end
imshow(image1);
I dont think there is any fixed threshold value (greenary veg and soil mixed up), which distinguish soil or veg, try with different th values, which fit best as per your desired results, you may consider.
There are number od ways you can do color thresholding, this is not efficients (because of loops), you get the idea, how it works easily, then you can implement in other ways.
Good Wishes!
  댓글 수: 2
PARIVASH PARIDAD
PARIVASH PARIDAD 2019년 7월 26일
Thanks for your answer. Now that I know the vegetation pixels, is there a way to extract them out of the image you provided, so I just see the soil pixels?
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 7월 26일
Already vegetaion pixels are removed from the image (filled by cyan clolor).

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Agriculture에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by