AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

How to input an image to neural network?

The forum is to discuss topics from different artificial intelligence areas, like neural networks, genetic algorithms, machine learning, etc.

How to input an image to neural network?

Postby amini.c » Thu Dec 30, 2010 11:17 pm

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.
User avatar
amini.c
 
Posts: 19
Joined: Tue Sep 21, 2010 8:25 am

Re: How to input an image to neural network?

Postby andrew.kirillov » Fri Dec 31, 2010 11:02 am

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.
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3434
Joined: Fri Jan 23, 2009 9:12 am
Location: UK

Re: How to input an image to neural network?

Postby amini.c » Fri Dec 31, 2010 2:51 pm

thank you,

i have a binary image, but i don't know that how to create an vector from the image.
User avatar
amini.c
 
Posts: 19
Joined: Tue Sep 21, 2010 8:25 am

Re: How to input an image to neural network?

Postby andrew.kirillov » Fri Dec 31, 2010 5:13 pm

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.
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3434
Joined: Fri Jan 23, 2009 9:12 am
Location: UK




Return to Artificial Intelligence