Software Archive
Read-only legacy content

Saving a frame as picture

Maroun_S_
Beginner
486 Views

Hello,

I recorded in segment mode.

I saved a frame from the video as picture (.tiff) and i'm trying to check what it contain.

I loaded the picture into matlab, in contain 4 dims, 3 for the RGB and the last I don't know.

I checked the 4'th dim and all pixels there are 255, is that the gray dim thing  ?

Thank you 

0 Kudos
2 Replies
Marcio_P_
Beginner
486 Views

Hello Maroun,

Could you please tell me how you were able to save a frame from the video as a picture (.tiff)? Maybe post here how your code looks like. I have been trying to do this for a while now but I haven't succeeded and I need to finish implementing this until tomorrow. Your help would be greatly appreciated.

0 Kudos
jb455
Valued Contributor II
486 Views

If you want to save a frame from the camera:

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

This will save it as a bitmap; if you want to convert it to a tiff first, there are ways (eg, http://stackoverflow.com/questions/398388/convert-bitmaps-to-one-multipage-tiff-image-in-net-2-0)

0 Kudos
Reply