MATLAB Answers

Problem in Neural Network

5 views (last 30 days)
Mohammad
Mohammad on 25 Aug 2013
Edited: Walter Roberson on 22 Nov 2016
When I try to run the code
*img = edu_imgpreprocess(I);
for cnt = 1:50
bw2 = edu_imgcrop(img{cnt});
charvec = edu_imgresize(bw2);
out(:,cnt) = charvec;
end
P = out(:,1:40);
T = [eye(10) eye(10) eye(10) eye(10) ];
Ptest = out(:,41:50);*
for 26 alphabets making a change in the code as follows:
*img = edu_imgpreprocess(I);
for cnt = 1:26
bw2 = edu_imgcrop(img{cnt});
charvec = edu_imgresize(bw2);
out(:,cnt) = charvec;
end
P = out(:,1:20);
T = [eye(10) eye(10) eye(10) eye(10) ];
Ptest = out(:,21:26); *
It gives me an error of
{Error using rgb2gray>parse_inputs (line 81)
MAP must be a m x 3 array.
Error in rgb2gray (line 35)
X = parse_inputs(varargin{:});
Error in edu_imgpreprocess (line 3)
Igray = rgb2gray(I);
Error in char3 (line 8)
img = edu_imgpreprocess(I);}
Kindly help Please. Thanks
  1 Comment
Greg Heath
Greg Heath on 29 Sep 2013
I don't see any neural network functions. So why use neural network in the title?

Sign in to comment.

Answers (2)

Image Analyst
Image Analyst on 29 Sep 2013
If this is still a problem for you, what did you pass in for (the badly-named) I? Do a "whos I" before that line and say what is in the command window. Changes are it's not a regular, normal RGB image.

Dabira
Dabira on 26 Jun 2014
Please tell me where did yu find out.m I cant find it
  2 Comments
Walter Roberson
Walter Roberson on 22 Nov 2016
In the code in the Question here, out is an array not a function.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!