简体   繁体   English

Matlab神经网络的字符识别

[英]Characters Recognition for Matlab Neural Network

I am working on my final project. 我正在研究我的最终项目。 I chose to implement a NN for characters recognition. 我选择实现NN进行字符识别。

My plan is to take 26 images containg 26 English letters as training data, but I have no idea how to convert these images as inputs to my neural network. 我的计划是拍摄26张包含26个英文字母的图像作为训练数据,但我不知道如何将这些图像转换为神经网络的输入。

Let's say I have a backpropagation neural network with 2 layers - a hidden layer and an output layer. 假设我有一个具有2层的反向传播神经网络 - 隐藏层和输出层。 The output layer has 26 neurons that produces 26 letters. 输出层有26个神经元,可产生26个字母。 I self created 26 images (size is 100*100 pixels in 24bit bmp format) that each of them contains a English letter. 我自己创建了26个图像(大小为24 * bmp格式的100 * 100像素),每个图像都包含一个英文字母。 I don't need to do image segmentation, Because I am new to the image processing, so can you guys give me some suggestions on how to convert images into input vectors in Matlab (or do I need to do edge, morphology or other image pre-processing stuffs?). 我不需要进行图像分割,因为我是图像处理的新手,所以你们可以给我一些关于如何在Matlab中将图像转换为输入向量的建议(或者我是否需要做边缘,形态或其他图像预处理的东西?)。

Thanks a lot. 非常感谢。

You NN will work only if the letters are the same (position of pixels is fixed). 仅当字母相同(像素的位置固定)时,NN才会起作用。 You need to convert images to gray-scale and pixelize them. 您需要将图像转换为灰度并将其像素化。 In other words, use grid that split images on squares. 换句话说,使用在正方形上分割图像的网格。 Squares have to be small enough to get letter details but large enough so you don't use too much neurons. 正方形必须小到足以得到字母细节,但足够大,所以你不要使用太多的神经元。 Each pixel (in gray scale) is a input for the NN. 每个像素(灰度)是NN的输入。 What is left is to determine the way to connect neurons eg NN topology. 剩下的就是确定连接神经元的方式,例如NN拓扑。 Two layers NN should be enough. 两层NN就足够了。 Most probably you should connect each input "pixel" to each neuron at first layer and each neuron at first layer to each neuron at second layer 很可能你应该将每个输入“像素”连接到第一层的每个神经元,将第一层的每个神经元连接到第二层的每个神经元

This doesn't directly answer the questions you asked, but might be useful: 这并不直接回答您提出的问题,但可能有用:

1) You'll want more training data. 1)您需要更多的训练数据。 Much more, if I understand you correctly (only one sample for each letter??) 更重要的是,如果我理解正确(每个字母只有一个样本?)

2) This is a pretty common project, and if it's allowed, you might want to try to find already-processed data sets on the internet so you can focus on the NN component. 2)这是一个非常常见的项目,如果允许,您可能想尝试在互联网上查找已处理的数据集,以便您可以专注于NN组件。

Since you will be doing character recognition I suggest you use a SOM neural network which does not require any training data; 由于您将进行字符识别,我建议您使用不需要任何训练数据的SOM神经网络; You will have 26 input neurons one neuron for each letter. 每个字母你将有26个输入神经元,一个神经元。 For the image processing bit Ross has a usefull suggestion for isolating each letter. 对于图像处理位,Ross有一个有用的建议来隔离每个字母。

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

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