I want to get a Bayer format image from Basler Camera using C++. I set pixel-format to BayerBG8
(for example) and the camera can save image data. The image data is in ptrGrabResult
of type CGrabResultPtr
but how can I access to pixels value?
Using a convertor, the data convert to a pylon RGB image and is available, but how to get Bayer image without converting to RGB in pylon?
Use the GetArray()
method for that, so something like ptrGrabResult->GetArray();
should work for you.