Software Archive
Read-only legacy content
17061 Discussions

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

Adam_K_1
Beginner
562 Views

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

 

0 Kudos
2 Replies
Adam_K_1
Beginner
562 Views

Intel Hello?

0 Kudos
jb455
Valued Contributor II
562 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