I am getting raw buffer using the following code. I need to get the RGB image and IR image. How can I convert the raw buffer manually? Thanks in advance.
with cvb.DeviceFactory.open(
mock_info.access_token, cvb.AcquisitionStack.GenTL) as device:
stream_RGB = device.stream(cvb.ImageStream, 0)
stream_IR = device.stream(cvb.ImageStream, 1)
stream_RGB.start()
stream_IR.start()
d = 0
for i in itertools.count(start=1):
image1, status_stream0, node_map_stream0 = stream_RGB.wait()
image2, status_stream1, node_map_stream1 = stream_IR.wait()
Hi @redhat,
A returned raw buffer could indicate that the Buffer may not meet the requirements for being converted. What camera are you using and which formats would you expect?
Regards
Thank you for your reply. I am using JAI camera and I would like to get RGB and IR images. I am getting IR images but I cant get RGB images using the code.
You need to open your camera and access the node map for example with the GenICam Browser. There is an entry that states the color format used. Cross reference the format you want to stream with the GenICam pfnc format table linked above and adopt the values accordingly in the code from the linked post. That would be it. Otherwise you can either completely write the buffer manipulation from scratch or google for popular conversion methods for your specific raw buffer pfnc format. There are a lot of formats available in the list, but widely used are only 10 or so, so don’t worry