Using EDSDK, I want to programmatically set the white balance (RGGB) values of the LiveView stream, and also for the white balance in both JPG (and RAW) images coming from the cam directly. The process of manual white balancing liveview and off-camera images is not completely clear to me and is not really clear in the EDSDK manual.

Through trial and error, I worked my way through calibrating LiveView by issuing the kEdsCameraCommand_DoClickWBEvf command with coordinates on a grey card. This seems to affect liveview all right:

  • Liveview switches to "ClickWB" (-1) white balance setting
  • Camera settings remain unchanged: it doesn't change the as-shot values of the camera.
  • Note that the "manual WB" icon on the camera disappears when setting to "ClickWB", something appears to be wrong.

Apparently, Canon's EOS utility does things slightly different. Using some tracing and polling of PTP events I see that:

  • Clicking Whitebalance sends a similar ClickWB command to camera.
  • When clicking "Apply to shot images" sends a command to camera
  • The camera White Balance stays on value 6 ("Manual","White Point" or "White Paper" depending on the context).
  • Liveview is also affected as it switches to 6.
  • Trace shows evidence of "CPtpCamera::TranslateMWb" command, as if there is a command to set the user balance.
  • The 'raw' White Balance coefficients can apparently be retrieved as EOS displays a warning about the coefficients not being ok.

For RAW images, I worked around white balancing by storing white balance coefficients from a RAW of grey card, and re-applying these coefficients when converting a new image (without grey card) to TIFF. This does not affect the on-camera JPGs, as-shot White Balance and cannot be recovered after reset.

I am stuck when disconnecting/reconnecting camera and (programmatically) apply the previously calibrated or stored WB values. Is this possible, and if so, how do I copy the original white balance values. Anyone here who has experience in manual WBing with EDSDK, care to share the type/order of sharing?


  • Canon provides no official technical support whatsoever for the EDSDK
  • older SDKs were reported to include commands (e.g. in 2.5 kEdsPropID_UserWhiteBalanceData). There must be a replacement for this?

--- update Dec 17 2014 ---

I am currently (indirectly) in "official" contact with Canon's EDSDK developers and currently there is no official way of setting in-camera custom white balance through the EDSDK.

Nessuna soluzione corretta

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top