Ask Your Question
0

Save the detected face with ID

asked 2015-10-10 20:55:35 -0600

Aj-9011 gravatar image

I want to develop a database of face image detected by camera. When camera detect a face, system will ask user to key in the person identity and save it in the database. Which means, my database consists of an image and ID. Or maybe it can contain a directory to where an image is save. It is an online enrolment. The data later on will be proceed for other purpose. So, I need a flexible database where I can update the data and call it back. But the thing is I don't know which medium is proper for me to use. I'd read about SQLite and CSV. But maybe there is other medium that can suits better.

Any idea on how to achieve this?

edit retag flag offensive close merge delete

Comments

are you trying to collect train data for a face-recognition later ?

berak gravatar imageberak ( 2015-10-11 02:18:05 -0600 )edit

Ya, true sir.

Aj-9011 gravatar imageAj-9011 ( 2015-10-12 06:29:58 -0600 )edit
2

store the images on disk, filenames and id's in a csv file. it's easy to convert/load this into any rdbm like sqlite.

storing train images in a db is imho a bad idea, since you always need all of them to train.

if you're doing face-recognition, it is the serialized classifier from the training, that you want to save for later prediction. this might be totally different data, you might not even need the original images in the prediction phase (only say, a thumbnail per person)

berak gravatar imageberak ( 2015-10-12 07:40:13 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2015-10-12 05:17:33 -0600

pklab gravatar image

Doesn't look and OpenCV question... agree ? Anyway:

  • DBMS is a way. SQLite works very good also for large record count and it can easily enclosed in your C++ application. Binary blob is supported too but it's up to you to store the images into the DB or use img files.
  • You could use cv::FileStorage but you can't have DB like query funcs.

Some hard coded way (not really flexible)

  • You could save some meta data directly into the image file, EXIF for example, but this is not supported directly by OpenCV. Queries will be hard to do
  • At the end you could save the meta data casting your record as uchar and writing bytes at the bottom of your image (may be adding some rows) but this will be break if you save the image with lossy file format like .jpg
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-10-10 20:53:55 -0600

Seen: 788 times

Last updated: Oct 12 '15