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
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 .
We chose the camera and give the play and should be on. and displayed on the main screen
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.
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.
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 .
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.
We label and give the whole picture . After we give to edit .
We will open another window and click on Extract Color plans.
We extract the color that best suits us and we accept and close the window .
Press ok and continue with the process. Now it look for patterns that are unique to our subject.
In Match pattern have the solution. Press this tool in Step name put a name .
We will Template.
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.
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.
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
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.
Geometry chose to measure distances.
We label and chose to distance measuring our patterns.
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.
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.
We chose Logic calculator .
In Step Name put the name we want, we source the first premise that we want in this case right eye , and give added.
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.
We label as we have been doing.
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 .
In the main we put the name . In custom overlay can we put a text first.
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 .
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.
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 .
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.
This is the case that we want if not the subject not pass and check failure.
And this to dial positive result.
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.
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.
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
The Best Delphi sample code I ever had for Face Detection.
ResponderEliminarGOD bless the good hearted Author.
http://delphimagic.blogspot.com.es/2011/08/reconocimiento-de-caras-con-delphi.html
Thank you very much did not know.
EliminarI do not understand with labview 2012 version, can you tell me with latest version?
ResponderEliminar