필터 지우기
필터 지우기

how to identify clear leaf in this image.

조회 수: 2 (최근 30일)
tashu Dabariya
tashu Dabariya 2019년 7월 18일
편집: KALYAN ACHARJYA 2021년 3월 8일
I am trying to identify greenness with the help of Tuned Tri-threshold Fuzzy Intensification Operators. I tried a lot to remove white pixels which around the edges of the final image.please help me to identify clear leaf of greenness.
Function
function out = TTFIO(image, tao, zeta)
[row col]=size(image);
%% Calculating the Membership Function
img = (image - min(image(:)))./(max(image(:)) - min(image(:)));
%% Applying Intensification Operators
for j = 1:row
for k = 1:col
if img(j,k) <= tao
enhanced(j,k) = 2*img(j,k)^2;
else
enhanced(j,k) = 1-2*(1-img(j,k))^2;
end
end
end
%% Tuning the Output
out=((enhanced).^(tao+zeta));
Read Image
zeta=.5;
x=im2double(imread('corn seedling wheat straw on sunny day.jpg'));
x=imresize(x,[256 256]);
figure; imshow(x);
img1=rgb2hsv(x);
H=img1(:,:,1).*255;
S=img1(:,:,2).*255;
V=img1(:,:,3).*255;
H( (H<5) | (H>150)) = 0;
H(H>65&H<80&S>2&10&V>150) = 0;
figure,imshow(uint8(S));
% x_R=x(:,:,1); x_G=x(:,:,2); x_B=x(:,:,3);
tao_R=.9; tao_G=.8; tao_B=.5;
R=(TTFIO(H,tao_R,zeta));
G=(TTFIO(S,tao_G,zeta));
B=(TTFIO(V,tao_B,zeta));
out=cat(3,R,G,B);
t=graythresh(out);
BW=im2bw(out,t);
figure,imshow(out)
BW=bwareaopen(BW,175);
BW = imclearborder(BW);
figure;
imshow(BW)
wheatstr.PNG
this is the original image
untitled.jpg
final result.

채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 7월 18일
편집: KALYAN ACHARJYA 2019년 7월 18일
You can look at color thresholding aproach like here, and for smothness of the edges use morphological operations. To get the best fit morpho operations in this case, may be it will take 15-30 min, but it can be done.
  댓글 수: 11
gunturu gunturu
gunturu gunturu 2021년 3월 8일
what is enhanced(j,k) mean?
can you please clarify my dought
if posssble can you please give breaf explenation of TTFIO function
KALYAN ACHARJYA
KALYAN ACHARJYA 2021년 3월 8일
편집: KALYAN ACHARJYA 2021년 3월 8일
where? @gunturu gunturu pls post the question as a new question (Open new thread)

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by