I'm currently running the sample code FaceRecognition.java by reed the code found here.
The sample for the train text file for images is in this format:
1 myName /sdcard/FaceDB/s1/myName1.jpg
1 myName /sdcard/FaceDB/s1/myName2.jpg
1 myName /sdcard/FaceDB/s1/myName3.jpg
1 myName /sdcard/FaceDB/s1/myName4.jpg
2 otherName /sdcard/FaceDB/s2/otherName1.jpg
2 otherName /sdcard/FaceDB/s2/otherName2.jpg
2 otherName /sdcard/FaceDB/s2/otherName3.jpg
2 otherName /sdcard/FaceDB/s2/otherName4.jpg
I am wondering how this is done, and what is the explanation behind this?
I would like to point you to this article http://www.shervinemami.info/faceRecognition.html which does explain everything you want to know. The code is in C/C++, but I hope it is not too difficult to follow.
The file just follows this format:
<person no.> <person name> <location of the the person's face image>
You can actually create your own format. It is about your design on how your program can find and read those input images.