I have a sample application which is used to recognize person. The application overview is like below.
There is a window which has a scan button. On clicking the scan button, live detection will be shown. It will check whether the user is registered in SQL database. If not store button click will store the name and face data in to the database.
Here the problems are
1) While inserting the face data bytes in to a buffer, i do not have any other unique data other than face data. Hence if say i use this application (windows) from different different machines connected to a same database, how will I be able to have a uniqueness which will recognize my face from different machines.
2) While querying (for recognition), I have to get all the face data from db and load it to SDK database using recognitionConfig.SetDatabaseBuffer(buffer);. This will cause memory issue as the entire face data needs to be retrieved from db to buffer. I am talking about say 10000 persons here. Is there anyway I can query face rather than passing the entire database face data?
I have attached my sample application here. Please help me.
both of your problems seem to be solvable by modifying the software on your server:
1 ) Make it a work queue with a listener thread and dispatcher thread. the listener accepts incoming requests and forwards it to the dispatcher. the dispatcher checks if the requested task is available (kind of a mutex and permission check should be done here) and creates a worker thread which will calculate the "matching" function or recognition function and just return the result. multiple requests from different machines are treated independently then but with same results.
2 ) i would not try to calculate the recognition / matching function locally. try to let the server do this and just return the result. however, if you want to do it locally : to return the complete data from a single person, you would have to make a proper select statement to the database and return the result from this. both could be done by the dispatcher / worker combination from above.
these are just structural suggestions, i do not know if it is possible with your hardware.
on http://vichargrave.com/multithreaded-work-queue-based-server-2/ you can find an example of the idea i am talking about. i does not fit perfectly to your described problem but may be useful