ros-drivers / pointgrey_camera_driver

ROS driver for Pt. Grey cameras, based on the official FlyCapture2 SDK.
128 stars 180 forks source link

Gain units #126

Open NikolausDemmel opened 7 years ago

NikolausDemmel commented 7 years ago

I am looking for precedent for messages with gain values and came across e.g. https://github.com/ros-drivers/pointgrey_camera_driver/blob/master/image_exposure_msgs/msg/ExposureSequence.msg or https://github.com/ros-drivers/pointgrey_camera_driver/blob/master/wfov_camera_msgs/msg/WFOVImage.msg, which contain an element gain with units db.

Can someone confirm how to interpret the db units. I.e. how do I convert from a multiplicative factor on the intensities recorded by the imager to the db value?

On the web I find the distinction between power-gain and current / voltage gain, and I am not 100% sure which one is the one to apply here.

I assume it is "voltage gain" such that the relationship is:

gain_db = 20 * log_10(gain_multiplier)

where gain_multiplier is a multiplicative factor on the pixel intensities (before gamma encoding) such that for example gain_multiplier = 2.0 has a similar effect on the pixel intensities to gain_multiplier == 1.0 with twice as long exposure time (except for image noise and motion blur ofc).

Can anyone confirm or correct this?

P.S.: I found a reference in a AVT document: Search for "GainValue" in https://www.alliedvision.com/fileadmin/content/documents/products/cameras/various/features/GigE_Camera_and_Driver_Attributes.pdf