Using EDSDK, I want to programmatically set the white balance values ββ(RGGB) of the LiveView stream, as well as for the white balance in JPG (and RAW) images coming directly from the camera. The process of manually balancing real-time images and images outside the camera is not entirely clear to me and is not entirely clear in the EDSDK manual.
Through trial and error, I made my way through the calibration of LiveView by issuing the kEdsCameraCommand_DoClickWBEvf command with coordinates on a gray map. This seems to affect the liveview:
- Liveview switches to ClickWB white balance setting (-1)
- Camera settings remain unchanged: it does not change the camera value in the frame.
- Please note that the βmanual WBβ icon on the camera disappears when βClickWBβ is installed, something seems to be wrong.
The Canon EOS utility seems to do slightly different things. Using some trace and polling of PTP events, I see that:
- Clicking Whitebalance sends a similar ClickWB command to the camera.
- When you click "Apply to Snapshots" sends a command to the camera
- White balance is at a value of 6 (Manual, White Dot, or White Paper, depending on context).
- Liveview also depends on how it switches to 6.
- Tracking shows confirmation of the command "CPtpCamera :: TranslateMWb", as if there is a command to set user balance.
- βRawβ white balance coefficients can apparently be obtained because EOS displays a warning that the coefficients are out of order.
For RAW images, I worked around white balance, preserving the white balance coefficients from the RAW of the gray card and re-applying these coefficients when converting a new image (without a gray card) to TIFF. This does not affect the JPG on the camera, as well as the "White Balance" and cannot be restored after reset.
I get stuck when disconnecting / reconnecting the camera and (software) apply previously calibrated or saved WB values. Is this possible, and if so, how can I copy the original white balance values. Anyone who has experience with manual WBing with EDSDK, share the type / order of sharing?
Note:
- Canon does not provide official technical support for EDSDK. It was reported that older SDKs
- included commands (e.g. in 2.5 kEdsPropID_UserWhiteBalanceData). Should there be a replacement for this?
--- December 17, 2014 update ---
I am currently (indirectly) in "official" contact with the Canon EDSDK developers, and there is currently no official way to adjust the custom white balance in the camera via EDSDK.
source share