i am making a leaf recognition system using img processing.i need to take 100 images from my database for 10 types of leaves,i.e,10 images for each type.how do i proceed with my code? the following code is for one leaf image.

조회 수: 3 (최근 30일)
clc; clear all; close all; I=imread('C:\Users\Ankit\Desktop\leaf database\ashoka-polyalthia longifolia\1.jpg'); imshow(I); H = fspecial('average', [10 10]);%fspecial creates 2D filters. I = imfilter(I, H);%filter for noise imshow(I); J=rgb2gray(I);%converting rgb to grayscale
level = graythresh(I);%threshold level is set BW = im2bw(I,level);%otsu's method %L = bwlabel(BW, n);
E = edge(BW,'Sobel','nothinning');%edge detection using sobel's method %BW2 = imfill(E); %imshow(E); K = imcomplement(E);%invert the image to obtain contour of leaf
figure;imageal(J);title('Gray-Level Image'); figure;imageal(BW);title('Binary image'); figure;imageal(E);title('Sobel edge'); figure;imageal(K);title('inverted image');
I2 = imcrop([142 1480],[2282 359],K);%cropping the leaf of image to obtain the leaf
%extracting various features stats = regionprops(K,'BoundingBox','MajorAxisLength','MinorAxisLength','Area','Perimeter','Eccentricity','FilledImage','PixelList'); %stats = regionprops(E,'BoundingBox');
%computing the aspect ratio %AR=MA/MI; B=bwboundaries(BW,'noholes'); m=size(I2,1); n=size(I2,2); Aspectratio=n/m; eccentricity = sqrt(1-(m^2/n^2));
  댓글 수: 1
Image Analyst
Image Analyst 2016년 1월 24일
I don't know what "proceed with my code" means. Have you tried typing F5 or clicking on the green "Run" triangle? Have you tried running it with all the different images in your database and making changes to have it improve the identification? Usually people know what the next steps in their projects are. Maybe you proceed by arranging a demo with the sponsor of your project to show them how well your program solves their problem for them. Maybe you proceed by writing it up and submitting it to a journal. Who knows? Certainly not me.

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

답변 (1개)

Vijayan G
Vijayan G 2018년 8월 15일
편집: Image Analyst 2018년 8월 16일

Hi.

Watch my video. You will get an idea.

https://www.youtube.com/watch?v=j0b02CzHRok

카테고리

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