I need to call the rs2_project_color_pixel_to_depth_pixel from Python with synthetic data. The data are generated in Python and do not come directly from the RealSense.
The first argument is the depth map of type BufData. How do I construct a BufData object in Python from a bytestream or an array? BufData does not seem to have a Python constructor, and I have not seen a way to get it from another type. BufData does support the buffer protocol, though it still might need a constructor. Another way would be to construct a frame, which has a method to provide BufData.
The binding to rs2_project_color_pixel_to_depth_pixel is defined here: https://github.com/IntelRealSense/librealsense/blob/d8f5d4212df85522a14b4a7b83bf4d54219b06fa/wrappers/python/pyrsutil.cpp#L69
BufData is defined here: https://github.com/IntelRealSense/librealsense/blob/bc0910f8ba3c33307ff247a29dd2b9e9ef1b269d/wrappers/python/python.hpp#L197 And the binding apparently here: https://github.com/IntelRealSense/librealsense/blob/4f37f2ef0874c1716bce223b20e46d00532ffb04/wrappers/python/pyrs_frame.cpp#L8
Irxy, Thank you for posting in the Intel® Communities Support.
In order to gather the information that you are looking for and for us to be able to provide the most accurate assistance on this matter, please submit your inquiry at the link below, they will help you in there as soon as possible and provide further assistance on this topic :
Intel Customer Support Technician