How to set exposure for Still Image capture when using DirectShow API on Windows?

Alok Chander 30 Reputation points

I am trying to use the Windows Directshow API to capture still images using a UVC camera. I am using this article from Microsof( to implement this. I want to be able to capture still images at different exposures so I can later use OpenCV to create an HDR image with them. I am aware that Directshow is a legacy feature. I ended up using it as it was the only API that had an example of how to implement still image capture for uvc cameras.

I tried setting the camera exposure before the still image trigger(pAMVidControl->SetMode(pPin, VideoControlFlag_Trigger) using the IAMCameraControl interface( I can see the exposure change in the preview feed but the still image captured has a different exposure to what I set it to. Is there a different interface for setting the camera exposure for still image capture?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,511 questions
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,626 questions
{count} votes