Page 1 of 1

Accessing precision data efficiently

Posted: Sun Nov 01, 2015 2:56 pm
by DeVi
Hi,

We are using multiple Flex 13 cameras in precision mode, and I would like to get the grayscale pixel values at the segments of the detected objects. I tried to rasterize the whole image but this was too slow to work in real-time with mulitple cameras.
Is there a function which could be used to rasterize only a part of the image, or is there some other method to query this data efficiently?

Re: Accessing precision data efficiently

Posted: Mon Nov 02, 2015 11:32 am
by beckdo
Yes, Rasterize() is expensive for this. Fortunately, we have something for you. You can access the data without rasterizing it into your own buffer. If you call frame->GetGrayscaleData(), it will return a memory pointer that gives you the pixel data. It's formatted one pixel per byte and the total size is camera pixel width * camera pixel height. You can verify this with frame->GetGrayscaleDataSize(). This memory is already there, so there is no overhead to get the pointer to this data and look into it for getting individual pixel values.

Thx,
Doug

Re: Accessing precision data efficiently

Posted: Sat Nov 07, 2015 2:05 am
by DeVi
Thank you! I quickly tried it and it works like a charm. Somehow I missed these methods... :)