Hello ; this is my simple code for leaf disease , I find the disease on leaf. I just want to show the disease and remove other noises, could you help me guys? thanks!

1 回表示 (過去 30 日間)
close all;
clear all;
pic = imread('LEAF_0334.jpg');
I = imadjust(pic,stretchlim(pic));
g_im = rgb2gray(I);
eg = edge(g_im,'canny',0.3);
eg_1 = bwareaopen(eg,300);
bw = im2bw(eg);
se = strel('disk',3);
bw = imdilate(bw,se);
bw2 = imfill(bw,'holes');
r = bwlabel(bw2);
subplot(3,3,1),imshow(pic),title('original');
subplot(3,3,2),imshow(I),title('adjust');
subplot(3,3,3),imshow(g_im),title('grayscale');
subplot(3,3,4),imshow(eg_1),title('canny');
subplot(3,3,5),imshow(bw),title('dilate');
subplot(3,3,6),imshow(bw2),title('fill');
subplot(3,3,7),imshow(r),title('label');
  2 件のコメント
Image Analyst
Image Analyst 2021 年 6 月 27 日
編集済み: Image Analyst 2021 年 6 月 27 日
You forgot to attach 'LEAF_0334.jpg', or even a screenshot of your final figure, so what can we say?
Here's another chance to read the posting tips:
And edit your post to format the code as code. Highlight it and click the code icon.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeAgriculture についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by