lunes, 13 de abril de 2015

Face recognition

Today we'll explain how to do a facial recognition with the Vision Builder tool Labview , the practice is to detect a user in this case a particular person and to indicate a message passing access , otherwise indicate another message.

First we have installed Labview package called Vision Builder on your computer . Once installed we will open a new inspection



image
The next step is to choose which camera will acquire the image in this case the computer webcam is used , keep in mind that you have to be in a fixed position and always keep the same angle as good decision images of the subject depends not only the position , but to be in a controlled lighting environment to be sensitive to changes in color tone and pitch from white to black . How much greater the more accurately we must be careful with the environment.
We will Acquired image . on the right side of the screen .

image
We chose the camera and give the play and should be on. and displayed on the main screen

image
In attributes we set our camera adapted to the requirements we need, in calibration we will do is record the calibration determined that if we need to use our configuration to another application does not have to reconfigure it again.

We give ok and continue with the process. We are placed under the main screen , you usually put PASS and green, but I have disabled out of the way when I make the appropriate checks.



image
The next step is to take the test pattern that will actually serve to introduce the detectors for identification. We go to Simulate acquisition . before performing this process and we should have taken the test pattern with the webcam.

image
I 've taken and modified 've taken in black and white to avoid problems with changing colored light.

We go to the folder and choose the photo you want inside where we lodged .



image
It is now manipulate the photo but we have done with the calibration of the camera, for that we will choose a filter in the Vision assistant option.

image
We label and give the whole picture . After we give to edit .

image
We will open another window and click on Extract Color plans.

image
We extract the color that best suits us and we accept and close the window .

image
Press ok and continue with the process. Now it look for patterns that are unique to our subject.

image
In Match pattern have the solution. Press this tool in Step name put a name .

image
We will Template.

image
If you look have a red area you 've isolated all I do not need to do this we go to the Edit tab template and we see the following picture . If we see the cursor in the red center , we take the origin or center without ignoring our area , which will be the points which we'll use for distances between points.

image
With Loupe tool , you can zoom , the other tools can make several ways to clean the area do not want the software to work and therefore ignore to look for patterns. Once completed we give ok .

Then we go to the Settings tab.



image
We leave this setting that we do is refine our searches , we find a match, and have a matching value of at least 800 points, plus if we move our patterns are set at an angle of +/- 10 , if the head moves .

The limits we must define our search tab in case there patterns that match we will more results 



image
Press ok and perform the same operation with the other eye and nose.

After this step , we need to measure the distance between two item or we want depending on the match we have done.



image
Geometry chose to measure distances.

image
We label and chose to distance measuring our patterns.

image
And boundaries we choose our tolerance , we must be careful because if we left with much scope can match anyone, and if we adjust much can happen that the same person is not detected , because they influence the shadows , light, etc.

image
Press Ok and we will perform a logical operation which will determine if everything is true whether the match as the distance from us as correct result.

image
We chose Logic calculator .

image
In Step Name put the name we want, we source the first premise that we want in this case right eye , and give added.

image
After adding all the premises we give ok , we see that we have options like all Boolean operations if we want something more complex. We continue with our work and go to Seth inspection status.

image
We label as we have been doing.

image
And so we leave it to say that if all this is well marked as positive all and miss to run our program.

The next step we want to do an interactive interface must enter text for the subject is placed in the correct area . We go to the Custom tab over relay .



image
In the main we put the name . In custom overlay can we put a text first.

image
In which we put what we want and we can change the color, font etc. In addition 'll get an oval for the subject to enter his head .

image   image
It is thus the result.

Now we must do this more dynamic, and therefore will make two statements in which they match our subject will OK , and it will coincide NO.

To do this we go to the next tool in the upper left of this image.



image
We will get an image with a Start, a inspect and an end, the first thing we do is drag the arrow of default as shown below , second you click on the canvas and right give to new state and took two state , we put the name and configure , the first will get the same background used in the main inspect .

image
And we add a custom overlay that indicates that it is correct or not.

If you click with the right mouse button on the inspect tell us create new transition , as we choose and throw into the new states , and these throw another to the END.

If you click with the right button on the transition we will show this.



image
This is the case that we want if not the subject not pass and check failure.

image
And this to dial positive result.

image
This is so that once it is validated end , and the other is to indicate that if Fail end and then perform the inspection.
Because the light is not the same not having a controlled environment , I used dog pictures interspersed which is another option that has vision builder in the next tab.

image
Grab the images that are in that folder and will sandwiching simulating image capturing , I made another picture the dog with less light and looks like one that determines if ( is evident when the test pattern ) and another no.se attached as a video of the process is enabled and the result of practice is observed.

To download the files from all the practice you must click on the picture below.





5 comentarios:

  1. The Best Delphi sample code I ever had for Face Detection.
    GOD bless the good hearted Author.
    http://delphimagic.blogspot.com.es/2011/08/reconocimiento-de-caras-con-delphi.html

    ResponderEliminar
  2. Este comentario ha sido eliminado por un administrador del blog.

    ResponderEliminar
  3. I do not understand with labview 2012 version, can you tell me with latest version?

    ResponderEliminar