I am currently working on a HIL Simulation. I am using CARLA platform, There exist a RGB camera sensor, by which I am able to get a RGB data values (3D array (Height, Width, 3(RGB))) for the Image frame. I want to send the data over network layer, .....
The Question is I would like to convert the RGB format to a Bayer format array. I am not well aware of the details with the Bayer raw filter. I notice that there is a Opencv flag for Bayer to RGB conversions but not the other way round. I need this format to reuse the libraries on the image unpacking or the server side.
Any suggestion regarding conversion from RGB to bayer format would help me a lot moving this project further.
Ref (Pictorial ref - I want to do it from right to left)- https://theailearner.com/2018/10/28/bayer-filter/