Powered by Blogger.

Thursday, November 20, 2008

Basic OCR in OpenCV




Demo Source from GitHub

In this tutorial we go to create a basic number OCR. It consist to classify a handwrite number into his class.

To do it, we go to use all we learn in before tutorials, we go to use a simple basic painter and the basic pattern recognition and classification with openCV tutorial.

In a typical pattern recognition classifier consist in three modules:

Published: By: David Millán Escrivá - 10:59 PM

Friday, November 14, 2008

The basic patter recognition and classification with openCV

In this tutorial we go to introduce to the pattern recognitions basics in openCV.

In pattern recognitions before we can classificate an element we need train our system. We go to train with 3 class with 100 samples each one.

Then we create 2 matrix trainData and traninClasses with 300 samples:
int train_sample_count = 300;
CvRNG rng_state = cvRNG(-1);
CvMat* trainData = cvCreateMat( train_sample_count, 2, CV_32FC1 );
CvMat* trainClasses = cvCreateMat( train_sample_count, 1, CV_32FC1 );

Published: By: David Millán Escrivá - 2:06 PM

Tuesday, November 11, 2008

HSQLDB and java entity class most common error

Last day, i'm developing an application with hsqldb and java swing with jpa entites classes, and whe i set a primary key or class attribute as int, integer, long or similar number type, when it parsed to sql statment with toplink it's created as Number instead as integer.

Before i looking many hours in Google i find the solution thanks to this web

The solution is include  in persistence.xml this line:
<property name="toplink.target-database" value="HSQL"/>

We need specify to Toplink JPA the target database to HSQL.

But we can specify more types or database as Attunity, Cloudspace, Database, MySQL4, Oracle... You can find the documentation and databases suport in Toplink Essential JPA Extension Reference
Published: By: David Millán Escrivá - 12:42 PM

Friday, November 7, 2008

Basic Painter in OpenCV

In this basic tutorial we go to learn some basic instructions to work in OpenCV, mouse event, trackbar controler, create image, save image and draw basic circle.


First step is create two windows, one is our canvas image, and other to color selector as we see in last tutorials.
Published: By: David Millán Escrivá - 11:31 PM

Monday, November 3, 2008

OpenCV More with cameras.


In last tutorial we learn how to get frames of our camera, now we go to learn some basic OpenCV functions to work with our captured frames or video. There is nothing special, but it's the first steps to introduce to work with OpenCV

Published: By: David Millán Escrivá - 11:41 PM