Proposal for enhanced Webcam exposure control

Post Reply
User avatar
Site Admin
Posts: 6676
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK

Proposal for enhanced Webcam exposure control

Post by admin »

Webcam based cameras do a great job for high speed imaging - lunar, solar and planetary, and even short exposure EAA. They have one big drawback though... In spite of being able to control most of the camera settings in detail, the exposure time can only be altered in factors of 2 - 1s, 1/2s, 1/4s, 1/8s, 1/16s, etc. This limitation is unfortunately designed into the IAMCameraControl interface used to control DirectShow webcams.

While the definition of the interface specifies that the integer values between about -10 and +5 are used to specify exposure times from 1/1024s to 32s, there are all those other lovely integer values between +20 and +2147483647 that are going unused. Suppose that SharpCap and the developers of webcam drivers for astro cameras agreed to use those values in some way to allow exposure to be controlled in a much more granular manner?

For example, normally a webcam driver would reject any exposure value above about +10 as invalid (after all, +10 is 1024 seconds). Values from 20 up to 1,000,000,000 could be used to express an exposure length in microseconds with fine control, providing that SharpCap and the driver can in some way communicate the following :

1) That this extended functionality is available (driver->sharpcap) (this could be via the pCapsFlags out parameter of IAmCameraControl.GetRange - add a new flag).
2) That it should be enabled (sharpcap->driver) (SharpCap sends a magic value via IAmCameraControl.Set?)
3) What the exposure range for extended exposure control is (this could be via IAmCameraControl.GetRange returning different results after the enabling message sent in step 2).
4) Normal set/get exposure over the wider range would go via IAmCameraControl.Get/.Set

This approach would seem to be workable for drivers where the DirectShow interfaces are being implemented in driver code. For cameras that work via USB Video Class (UVC), it may not work - I would be interested in feedback from anyone with UVC experience as to workability/alternatives in that case.

I'm open to suggestions and feedback from webcam driver developers and camera manufacturers on this, particularly for cameras that are not already directly supported in SharpCap.


Post Reply