I am currently working to develop an automated diabetic retinopathy detection system. I've used GLCM for feature extraction obtaining Contrast, Correlation, Energy & Homogeneity values. How can I perform classification using these values ?

 採用された回答

The obvious answer is to use patternnet with
[ I N] = size(input) % I = 4
[ C N ] = size(target) % C = Number of classes
Columns of target are {0 1} C-dimensional unit vectors.
For patternnet documentation
help patternnet
doc patternnet
For examples of classification data
help nndatasets
doc nndatasets
Hope this helps.
Thank you for formally accepting my answer
Greg

3 件のコメント

GANESH SUBRAMANIAM
GANESH SUBRAMANIAM 2014 年 10 月 10 日
編集済み: GANESH SUBRAMANIAM 2014 年 10 月 16 日
Thank You for the reply. But I am not clear how to implement the lines you added. I am adding my code below. { function bloodVessels = ADNPDR(x, threshold)
%Clear Memory & Command Window clc; clear all; close all;
%Read Input Retina Image [f,p] = uigetfile ('*jpg'); x = imread ([p f]); y = rgb2gray(x);
figure (1) subplot (1,1,1) imshow (x,[]),title ('Input Image'); improfile; xlabel (' line segment ') ylabel (' Distance along the ') zlabel ('Intensity Values')
figure (3) subplot (1,1,1) imshow (y), title ('Grayscale Image');
figure (4) subplot (2,2,1:2), imhist (y) title (' a) Histogram'); xlabel('Grayscale Values') ylabel('n^t^h pixel in the grayscale')
HE = histeq(y); subplot (2,2,3:4), imhist (HE) title (' b) Equilized Histogram'); xlabel('Grayscale Values') ylabel('n^t^h pixel in the grayscale')
red_channel = x(:,:,1); green_channel = x(:,:,2); blue_channel = x(:,:,3);
figure (5) subplot (2,2,1) imshow(red_channel), title ('Red Channel'); subplot (2,2,2) imshow(green_channel), title ('Green Channel'); subplot (2,2,3:4) imshow(blue_channel), title ('Blue Channel'); I=green_channel;
%Image adjustment using Adaptive H.E img_adjusted = zeros (size(I), 'uint8'); for ch = 1 : 1 img_adjusted(:,:,ch) = adapthisteq (I(:,:,ch)); end figure (6) subplot (1,2,1) imshow (img_adjusted), title ('Adjusted Input'); subplot (1,2,2) imcontour (img_adjusted,3), title ('Contour Mapping');
%Kirsch's Templates h1=[5 -3 -3; 5 0 -3; 5 -3 -3]/15; h2=[-3 -3 5; -3 0 5; -3 -3 5]/15; h3=[-3 -3 -3; 5 0 -3; 5 5 -3]/15; h4=[-3 5 5; -3 0 5; -3 -3 -3]/15; h5=[-3 -3 -3; -3 0 -3; 5 5 5]/15; h6=[ 5 5 5; -3 0 -3; -3 -3 -3]/15; h7=[-3 -3 -3; -3 0 5; -3 5 5]/15; h8=[ 5 5 -3; 5 0 -3; -3 -3 -3]/15;
%Spatial Filtering by Kirsch's Templates t1=filter2(h1,img_adjusted); t2=filter2(h2,img_adjusted); t3=filter2(h3,img_adjusted); t4=filter2(h4,img_adjusted); t5=filter2(h5,img_adjusted); t6=filter2(h6,img_adjusted); t7=filter2(h7,img_adjusted); t8=filter2(h8,img_adjusted);
figure (7) subplot (2,2,1) imshow(t1), title ('Vessel Extract 1') subplot (2,2,2) imshow(t2), title ('Vessel Extract 2') subplot (2,2,3) imshow(t3), title ('Vessel Extract 3') subplot (2,2,4) imshow(t4), title ('Vessel Extract 4')
figure (8) subplot (2,2,1) imshow(t5), title ('Vessel Extract 5') subplot (2,2,2) imshow(t6), title ('Vessel Extract 6') subplot (2,2,3) imshow(t7), title ('Vessel Extract 7') subplot (2,2,4) imshow(t8), title ('Vessel Extract 8')
% Eccentricity Plot & Value Calculation s = regionprops (green_channel, 'Eccentricity'); Eccentricity = cat (1,s.Eccentricity); figure (9) subplot (1,1,1) plot (Eccentricity), title ('Eccentricity'); hold on plot (Eccentricity (:,1), 'b*'); xlabel('Pixel Value'); ylabel(' Foci of the Ellipse'); hold off disp(Eccentricity), title ('Eccentricity');
% Area Plot & Value Calculation s = regionprops (green_channel, 'Area'); %Finding the actual number of pixels in the region Area = cat (1,s.Area); figure (10) plot (Area), title ('Area'); hold on plot (Area (:,1), 'b*') xlabel('Pixel Value'); ylabel('Axis Length'); hold off disp(Area), title ('Area');
glcms = graycomatrix(green_channel,'Offset',[0 1]); stats = graycoprops(glcms)
% Train Inputs............................................
traininputs=(xlsread('TrainTest.xlsx'))'; traininputs=normc(traininputs); traintargets=(xlsread('tttargets3.xlsx'))';
% nprtool : % Neural Network Pattern Recognition Tool
net = create_pr_net(traininputs,traintargets); trainOutputs = sim(net,traininputs);
disp (trainOutputs); view (net); }
Greg Heath
Greg Heath 2014 年 10 月 17 日
>> net = create_pr_net(X,T);
Undefined function 'create_pr_net' for input arguments of type 'double'.
Where is it defined?
I ain't getting any error like that

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

その他の回答 (0 件)

カテゴリ

Community Treasure Hunt

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

Start Hunting!

Translated by