zivid / zivid-ros

Official ROS driver for Zivid 3D cameras
BSD 3-Clause "New" or "Revised" License
55 stars 43 forks source link

How to change resolution? #93

Open scotgopal opened 7 months ago

scotgopal commented 7 months ago

How to change resolution of Zivid images?

apartridge commented 6 months ago

Hi  @scotgopal.

For 3D captures, if you use Zivid 2 or 2+ cameras, then it is possible to reduce the resolution of the 3D capture to 1/4 by using the sampling_pixel setting, set it to fex. blueSubsample2x2. From the upcoming SDK (2.11) if you use 2+ cameras, then you can increase the resolution further by using fex blueSubsample4x4.

You can also use the "downsample" feature that is in our SDK, it is not available in the ROS wrapper, but is quite easy to add by using this function from the C++ API: https://downloads.zivid.com/sdk/releases/2.10.1+50b274e8-7/doc/cpp/classZivid_1_1PointCloud.html#a484f934519275535ac36752e05f5490b

We do not have any additional functionality to reduce the size of the 3D captures in our API.

For 2D captures, we do not have any features in the Zivid SDK at the moment to change the resolution of the 2D image.

You could change the resolution of the point cloud or image using your own implementation, for example by using OpenCV.