Page 1 of 1

How to input an image to neural network?

PostPosted: Thu Dec 30, 2010 11:17 pm
by amini.c
hello,

I am using Neural network to develop my OCR by backpropagation learning.

i want to train a network to recognize 0-9 digit and 8 letter (20 sample for each) represented as images of 20*40 pixels.

plz help me for convert images to a vector and input to a matrix and then to a network.

thank you.

Re: How to input an image to neural network?

PostPosted: Fri Dec 31, 2010 11:02 am
by andrew.kirillov
Hello,

You may find some info here: Neural Network OCR

If you have a binary image, you just create an input vector, which contains 1 for each white pixel and -1 for each black pixel (if you use bipolar sigmoid function), for example.

Re: How to input an image to neural network?

PostPosted: Fri Dec 31, 2010 2:51 pm
by amini.c
thank you,

i have a binary image, but i don't know that how to create an vector from the image.

Re: How to input an image to neural network?

PostPosted: Fri Dec 31, 2010 5:13 pm
by andrew.kirillov
amini.c wrote:but i don't know that how to create an vector from the image.

Did you try this?
Code: Select all
double[] inputVector = new double[imageSize];

Then fill it as it was described in the previous post.