How to Save OpenCv Trained Facial pictures to SQL database

186 views
Skip to first unread message

Joseph Mwema

unread,
May 28, 2015, 8:11:57 AM5/28/15
to jav...@googlegroups.com

Hi,

I am kindly soliciting for suggestions albeit SSCE code snippets of how to save OpenCv trained face images to RDBMs like SQLite, MySQL, Oracle, MsSQL or PostgreSQL would be welcome.

Lets say I have like 10 images of person X, I train the model with them, so how would I consolidate them into a single value e.g. binary or string that I can save in RDBMs database for future use such that I will just recognize the presented image from previous trained images in RDBMs database? I am using OpenCv in Java but I wouldn't mind any SSCE examples in C, C++, C#.NET, Python and Java.

Anyone please? I will gladly appreciate your generous ideas on how to.

Regards,

Joseph

Samuel Audet

unread,
May 30, 2015, 2:30:19 AM5/30/15
to jav...@googlegroups.com
I guess I would simply use imencode() and imdecode(). To save an image,
call something like imencode("png", image, aBytePointer), and save the
bytes returned via BytePointer to your database somehow. To get the
image back, put the raw bytes in a BytePointer, and call image =
imdecode(aBytePointer, 1).

Samuel
Reply all
Reply to author
Forward
0 new messages