This repository provides a driver to publish images from a FLIR gray/color polarization camera with ROS. The codes can be easily modified and integrate in other projects.
The package has been tested with the following dependencies:
-
Ubuntu 18.04/20.04
-
OpenCV 3/4
The package has been tested with the following two models of camera:
- BFS-U3-51S5PC-C: 5.0MP, 75FPS, Sony IMX250MYR, Polari-RGB
- BFS-U3-51S5P-C: 5.0MP, 75FPS, Sony IMX250MZR, Polari-Mono
mkdir -p ros_ws/src
cd ros_ws/src
git clone https://github.com/GCChen97/flir_pol_cam.git
cd ..
catkin_make --pkg flir_pol_cam
Note that the version of OpenCV used for building should be consistent with the one that ROS uses. Otherwise segmentation fault may occur. You can select OpenCV version by manually modified the CMakeLists.txt
.
Check the configuration file in configs
folders. Currently, I only add the following parameters.
[PixelFormat]:
Mono8
[AcquisitionMode]:
Continuous
[Gamma]:
0.5
[ExposureMode]:
Timed
[ExposureTime]:
20000
[AcquisitionFrameRate]:
20
- Plug your FLIR polarization camera;
- Call the launch file.
For grayscale polarization camera, use the following commands:
roslaunch flir_pol_cam ros_pub.launch
For color polarization cameras, use the following commands:
roslaunch flir_pol_cam ros_pub_color.launch
- Check if it works fine in
rqt_image_view
rqt_image_view
Then, have fun with polarization imaging :)
- "/polcamera/raw": raw image from spinnaker SDK.
The image above shows the arrangement of pixels in a raw polarization color image. Note that the bayer color filters only exist in the color model.
-
/<path-of-spinnaker-SDK-installed>/src/Polarization/Polarization.cpp
in the example codes of spinnaker SDK -
spinnaker_sdk_camera_driver
https://github.com/neufieldrobotics/spinnaker_sdk_camera_driver
-
Polarized sensor
This project is licensed under the MIT License.