Extend-Robotics / camera_aravis

A ROS1 driver for GenICam based GigE and USB3 cameras.
Other
1 stars 1 forks source link

MotionCam3D - expose white balance in launchfile #29

Closed bmegli closed 1 year ago

bmegli commented 1 year ago

The device currently boots with custom white balance which has a red tint

Some way to control from ROS driver is needed

image

bmegli commented 1 year ago

Looking at GenICam features

        Boolean      : [RW] 'ColorSettings_WhiteBalanceEnabled'
        String       : [RW] 'ColorSettings_WhiteBalancePreset'
        Float        : [RW] 'ColorSettings_WhiteBalanceR'
        Float        : [RW] 'ColorSettings_WhiteBalanceG'
        Float        : [RW] 'ColorSettings_WhiteBalanceB'
        Boolean      : [RW] 'ColorSettings_ComputeCustomWhiteBalance'
        Register     : [RO] 'ColorSettings_SupportedISOs'
        Register     : [RO] 'ColorSettings_SupportedExposures'
        Register     : [RO] 'ColorSettings_SupportedCapturingModes'
        Register     : [RO] 'ColorSettings_SupportedColorWhiteBalancePresets'
bmegli commented 1 year ago
arv-tool-0.8 control ColorSettings_WhiteBalanceEnabled ColorSettings_WhiteBalancePreset ColorSettings_WhiteBalanceR ColorSettings_WhiteBalanceG ColorSettings_WhiteBalanceB ColorSettings_ComputeCustomWhiteBalance
Photoneo-MotionCam-3D Color-TRD-058 (192.168.0.194)
ColorSettings_WhiteBalanceEnabled = true
ColorSettings_WhiteBalancePreset = Custom
ColorSettings_WhiteBalanceR = 1 min:0 max:1
ColorSettings_WhiteBalanceG = 0.5 min:0 max:1
ColorSettings_WhiteBalanceB = 1 min:0 max:1
ColorSettings_ComputeCustomWhiteBalance = false
bmegli commented 1 year ago

We can't easily read presets with arv-tool but we can check them in PhoXI Control

bmegli commented 1 year ago

PhoXI Control

We have:

image

bmegli commented 1 year ago

Testing Setting

arv-tool-0.8 control ColorSettings_WhiteBalancePreset=Daylight

This did not change the preset correctly (!)

bmegli commented 1 year ago

It looks like the color tempreture is also part of preset name

bmegli commented 1 year ago
arv-tool-0.8 control ColorSettings_WhiteBalancePreset='Internal LED (5000 - 5500K)'
Photoneo-MotionCam-3D Color-TRD-058 (192.168.0.194)
ColorSettings_WhiteBalancePreset = Internal LED (5000 - 5500K)
bmegli commented 1 year ago

Now we can compare say Custom vs Daylight

And we can get rid of the red tint the device boots with

arv-tool-0.8 control ColorSettings_WhiteBalancePreset='Custom' arv-tool-0.8 control ColorSettings_WhiteBalancePreset='Daylight (5000 - 6500K)'
image image
bmegli commented 1 year ago

We will only expose the preset setting to set, and if not set leave it as is

If somebody needs to set custom values he can still do it through GenICam (also through ROS)

bmegli commented 1 year ago

We have presets:

The setting should be string so that any preset can be set.

Those will be just documented ones

bmegli commented 1 year ago

Testing New Setting

roslaunch camera_aravis photoneo_motioncam.launch enable_color_camera:=true enable_intensity:=false white_balance_preset:='Custom' roslaunch camera_aravis photoneo_motioncam.launch enable_color_camera:=true enable_intensity:=false white_balance_preset:='Daylight (5000 - 6500K)'
image image
bmegli commented 1 year ago

Since I find what the device boots up with as incorrect in color representation we will set default to Daylight