Neural Network Code for Image Classifica​tion/Segme​ntation

조회 수: 1 (최근 30일)
Anis Mahmon
Anis Mahmon 2015년 8월 28일
댓글: Greg Heath 2015년 8월 28일
I have written a code in Matlab for neural network classification/segementation the image after train the image. But, it is not working as expected. I get the error in this line "yhat = net(double([r;g;b]));". Is there any mistake in the code? Can you take a look at the code and help me out !!
a = imread('C:\Users\user\Desktop\MATLAB PROCESSING\Matlab Processing\Band432\open land\klang.tif');
b = rgb2gray(a);
figure, imshow(a);
figure, imshow(b);
thr = 0.5;
for i = 1:1:size(a,1)
for j = 1:1:size(a,2)
pix = a(i,j,:);
r = pix(1,1,1);
g = pix(1,1,2);
b = pix(1,1,3);
yhat = net(double([r;g;b]));
if yhat >= thr
result = 1;
b(i,j) = 255;
else
result = 0;
b(i,j) = 0;
end
end
end
figure3, imshow(b)
or any suggestion code for classify the image in 5-class
I really hope can get any feedback because I really not familiar with neural network toolbox
  댓글 수: 1
Greg Heath
Greg Heath 2015년 8월 28일
I don't know. However, searching on
NEURAL IMAGE SEMENTATION
resulted in 32 hits in ANSWERS and 33 hits in the NEWSGROUP.
Hope this helps.
Greg

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by