Today we will make the practice of OCR, involves placing a text with many characters and passing through a given area must recognize a password.
For this we use Labview Vision Builder tool.
We open and create a New inspection.
Then we have to create a character type that recognizes our camera and therefore we must train her, we must also bear in mind that affects us the light, we can not do it where we want so it is advisable to use a controlled site I recommend that but you know make one visit my input and make a box of artificial vision. In the face recognition pst I explain how light influences and other factors to artificial vision.
To train our camera we need to create a file of text with certain typeface and size that contains all the characters you will be using so containing uppercase, lowercase, accents, numbers and all kinds of symbols you want it recognizes, this is like a small child who can read you want, but of course must be taught before.
To speed the process started that I'm going to find as it is a repetitive task.
This template will attached to the end in a compressed file to download, you Imprimis and within the workplace who receive controlled capture for use in the Vision Builder program.
We're going to Simulate tab Adquisition and as we have done in facial recognition.
Once inside we chose the image path we have taken with the camera in our controlled environment.
And we accept we should be the screen in this way.
The next thing we do is choose our camera for real-time can modify documents for our camera we discover the password.
So we go to Acquire image.
We chose the camera that we have to practice in this case that I have is a mobius and accept, in calibration can modify the parameters of our camera according to the environment or the characteristics we want, this time we will not do because it is not subject to this practice while in another post I will comment as I have done the calibration.
This type of capture is doing at the time of choosing it, we worry that this is normal. As we will do a reading password, do not need color in this case therefore we will determine that images are captured in black and white. We go to the tab Assitant Vision and within it.
We name and we say that we want the whole image. Press Edit and we go to the next screen.
We choose the level you want and accept.
And to pass close to the previous screen and give it to ok.
We should look like.
Now we have to recognize all the text, for this we go to the next tool.
We label.
We chose a ROI in what will be our password is a place to read, we can move the paper and passes a particular site and we read it. I have chosen this is the green box, password will be 6 characters.
We're going to Threshold and modify as interested. We can change the size and other settings to teach our camera.
In this tab you if is the first time New character will I get my Edit because I've already done. You choose the path where you want to save and edit.
We see this screen.
We conducted a table showing inside has letters as in this case, yours is find some way to have the size of our password, but I say we have to train so it larger or smaller, that if not cut letters. Read Text appears in ????, as I have trained since I get letters, as ye have not done in the Correct String box will have to put the letters corresponding and pulsáis Train. So this way.
Now it say what we want to compare our password that is therefore assessed if so, we'll put our Limits and password.
When we finish because we accept and continue with the next step. We have to put some text and a table to point where we want to analyze the password, the next step for the procedure, we go to Custom overlay.
We named it as always.
Add text, colors, arrows etc ...
Now we have to compare with something to give us passage. Let Logic Calculator.
First we name the second we chose the name of the comparison operation of the Read / Verify Text, add it true when you pass (to my I get false because it has assessed where the box is not the password) and accept.
We go up to enter a new state that will be you to confirm that the password is okay.
We created a new state pressed on the main screen right, Create New State, on Inspec creais a new transition and have you been to the new state and new state at the end.
The new state we add a Custom overlay correct password as we have done before.
And it is already the practice is finished, you can download if pulsáis on the following link.
No hay comentarios:
Publicar un comentario