Basic OCR in OpenCV

Update!. Demo is now with CMake, the cross-platform, open-source build system.
Download Now!

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 [...]

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* [...]

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 [...]

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.

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

OpenCV Seting and working with a camera

Working in opencv with cameras is very easy, we only need a camera and our opencv libraries.

The structure that we store the camera link is CvCapture, here we store this link, then to get this link we need call to cvCaptureFromCAM function, this function need only one param, the index of the camera to be [...]

Create a percent bar with CSS

To create a easy and valid percent bar or tipicall star bar we can use a schemma as you can see below.

With this html code:
<span class=”percent”><span style=”width:25%”>25%</span></span>
And this stylesheet:
.percent{
display: block;
float: left;
background:url(images/percent.png) top left no-repeat;
height: 17px;
width:75px;
}
.percent span{
background:url(images/percent.png) bottom right no-repeat;
display:block;
float:left;
height:17px;
}

This is the result of our percent image:
36%45%89%66%

GNUPLOT – 3d plot surface

For 3d plot gnuplot use command splot.
splot sin(sqrt((x*x+y*y)))/sqrt(x*x+y*y) t “weaves”
We can add the style pm3d to add a gradient surface texture
splot sin(sqrt((x*x+y*y)))/sqrt(x*x+y*y) with pm3d t “weaves”
But you can see we need more resolution, then we must set more isosamples:
set isosamples 75,75

For more info go to gnuplot page

AWK. Calculate mean, min and max

AWK is a general purpose programing language that is designed for processing text-based data. This unix command is very powerful and with it we can calculate the mean, min and max of a data stored in file.
data.txt:
10
20
50
100
200
500
awk command:
awk ‘{if(min==””){min=max=$1}; if($1>max) {max=$1}; if($1< min) {min=$1}; total+=$1; count+=1} END {print total/count, min, max}’ data.txt
Result:
146.667 10 500

New Blog

Hi, this is my new Blog, in wordpress, why? Because to maintain my old site and do it atractive need a lot of time, and I don’t have time, then i installed a wordpress blog in my little server to do the task of maintain the site more easy.
I want publish more post now…