Photo Searching with Face Recognition, a Research project
Face recognition has been a problem very worked around the
world for many reasons. Face recognition problem in a computer allocation composes
a various algorithms that use mathematical and matricial techniques.
I loved the concept of how the
face recognition is done and how this will be helpful in developing other
application that uses the face recognition concept. The app that i am going to discuss is about
searching the number of photos of a persons in the hard drive from a single set
of photos that would contains the image of that person.
When it comes to developing an app
in C#, Visual Studio is an excellent IDE which does almost half of the work
helping developers to focus in his logic and user interface design rather than
managing the boring writing part.
The Photo Searching app that is
being developed consists of three DLLs. FaceFxn, FileFxn, Dir. The FaceFxn DLLs
contains all the necessary elements that will be useful for detecting and
recognizing the face element. FileFxn DLLs contains the elements to load the previously trained Images and finally Dir contains elements for extracting all the images from the folder and subfolder from a given path. The FaceFxn uses the HaarCascade Classifier to detect the faces based on the template matched. The Three DLLs won't be discussed because this will make the blog quite lengthy. I am just going to explain the implementation of these three DLLs in the form.
First part is to Instantiate the three Dlls.
![]() |
Declaration of the three DLLs. |
The second part is to load the trained Images this is done in the constructor part because it is the first part that is loaded when the class is called. The function 'CreateFileList' from the FileFxn class is called to load the previously Trained Images. The HaarCascade contains all the necessary elements for detecting the frontal face.
![]() |
Initialize the Components |
To Check every thing have loaded properly or not. We will use the below given function to load a temporary image from a harddrive. First Fill out all parameter of the FaceFxn Dlls. Face, Labels, TrainingImages, ConTrain. Face parameter is for the haarcascade classifier, Labels is for the name of TrainedImages, TrainingImages refers to the list of previously TrainedImages and ConTrain is the number of loaded Images, from these parameters every calculation is done. We open a file using OpenfileDialog which is a control in visual studio IDE to open any file from a drive. Then that image is passed to the FaceFxn Dlls through the currentframe parameter. The detected face in the current Images with the drawn rectangle is returned from the function and send to the picturebox for displaying
To save the thumbnail of the detected Image, call the below function 'savetoFile', It saves the thumbnail to the drive and write the name to the textfile from a textbox
To get the list of Images from a directory including the subdirectories call the function 'Get_Dir'.This will return a list containing all the path.
These combination can be used to search photos from any directory.Thus Photo searching can be done without any difficulty
![]() |
Getting face from a Image |
![]() |
Save Function |
To get the list of Images from a directory including the subdirectories call the function 'Get_Dir'.This will return a list containing all the path.
![]() |
Getting List |
These combination can be used to search photos from any directory.Thus Photo searching can be done without any difficulty
This comment has been removed by the author.
ReplyDeletenice...Good Luck..
ReplyDeleteGood One. Long way to go dude. Keep it up.
ReplyDelete