Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

how to save the image files (face) into the database hadoop?

Adam_K_1
Beginner
589 Views

how to save the image files (face) into the database hadoop?

 

0 Kudos
2 Replies
Adam_K_1
Beginner
589 Views

Intel Hello?

0 Kudos
jb455
Valued Contributor II
589 Views

In my application I am saving images obtained from the camera (though not from the face recognition module) into a sqlite database from C#. I'm not sure how similar to your case this is (as you haven't given much information), but it may help.

You can do something like:

PXCMImage.ImageData data;
PXCMCapture.Sample photo = pSenseManager.QuerySample();
PXCMImage image = photo.color;
image.AcquireAccess(PXCMImage.Access.ACCESS_READ, PXCMImage.PixelFormat.PIXEL_FORMAT_RGB24, out data);
Bitmap bitmap = data.ToBitmap(0, image.info.width, image.info.height));

//then when you want to save:
ImageConverter converter = new ImageConverter();
byte[] imgData = Compress((byte[])converter.ConvertTo(bitmap, typeof(byte[])));

Then you can just insert the imgData variable into your database. I'm sure your favourite search engine will help you out if you don't know how to do that already.

0 Kudos
Reply