basler / pylon-ros-camera

The official pylon ROS driver for Basler GigE Vision and USB3 Vision cameras:
http://www.baslerweb.com
Other
147 stars 145 forks source link

Demosaicing a BayerRGGB8 image without color fringing at the receiving end #241

Closed PolleyRupert-FZI closed 1 week ago

PolleyRupert-FZI commented 2 months ago

Describe what you want to implement and what the issue & the steps to reproduce it are:

Hello,

we are using a2A1920-51gcPRO cameras in a ROS Noetic system. Right now, we request BayerRGGB8 images from the camera with the pylon-ros-driver and then use the ROS image_proc debayer node to demosaic the image. As image_proc uses OpenCV to demosaic the image, the resulting image has a rather poor quality and contains heavy color fringing. ColorFringing

If I request the image directly in bgr8 from the camera, this fringing is heavily reduced, which I assume is because the camera has advanced demosaic algorithms. less_fringing

But when setting the camera to bgr8, the framerate drops to expected but unacceptable levels because of the increased required bandwidth. Therefore requesting already demosaiced images is not an option for us, we have to demosaic on the receiver side.

Looking at the documentation of demosaicing, it seems like the camera is directly responsible for the demosaicing, and there is no functionality in the Basler or ROS driver to demosaic an image on the receiver side (with Basler PGI, for example). Is this assumption correct or is there functionality in the Basler Driver or in the ROS driver we missed with which we can demosaic the image on the receiver side to get better results than using the standard OpenCV algorithms?

Greetings Rupert

Hardware setup description

Camera: a2A1920-51gcPRO,1920x1200, connected with Ethernet cable.

PC: Ubuntu 20.04, x86, 750GB RAM

Runtime information

Pylon camera software suite is installed. ROS Noetic

Is your camera operational with the Basler pylon Viewer on your platform?

Yes

FrancoisPicardDTI commented 1 month ago

Hello @PolleyRupert-FZI Thank you for your reporting. I can just answer for the ROS pylon driver, there's no such a functionality and the implementation of this functionality is not planned for now. I don't know for the Pylon API, you should contact Basler's support. Regards, Francois