简体   繁体   English

Matlab中使用神经网络进行模式识别

[英]pattern recognition using neural network in matlab

I am doing a project in character recognition of a local language. 我正在做一个本地语言字符识别项目。 I created the dataset. 我创建了数据集。 But I am not sure how to feed it using neural network? 但是我不确定如何使用神经网络来喂食它?

训练步骤

In this stage, I can only select one image as input rather than whole set of same character. 在此阶段,我只能选择一个图像作为输入,而不是整个相同字符集。 How to proceed? 如何进行?

Pls help 请帮助

As far as I know these neurons don't understand 2d input, so you need to make a 1d array from image: 据我所知,这些神经元不了解2D输入,因此您需要根据图像制作1D数组:

image1flat = image1(:);
image2flat = image2(:);

Then put them into a 2d trainning set array (note that "Samples are:" option on your picture) 然后将它们放入2d训练集数组中(请注意,图片上的“样本为:”选项)

%samples are columns now
trainningSet = [image1flat image2flat];

Automated code: 自动化代码:

%change this to folder where the files are
cd('/path/to/files');
%change this to your file format
files = dir('*.png');
result = [];
for i = 1:length(files)
    A{i} = imread(files(i).name);
    Aflat{i} = A{i}(:);
    result = [result Aflat{i}];
end
%put the result into nprtool

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM