:: AForge.NET Framework :: Articles :: Forums ::

Detecting Camera Snapshot Button

Forum to discuss AForge.NET Framework, its features, API, how-tos, etc.

Detecting Camera Snapshot Button

Postby Steve603 » Fri Apr 12, 2019 7:09 pm

Hey Guys,
I had question regarding the cameras hardware trigger functionality. I am using the Snapshot Maker sample application and it is working great with the camera I am using but there seems to be no way to actually detect when the snapshot button on the camera is pressed. The event handler seems to fire only when the new frame is ready and not when the button is actually pressed. Is there a way to detect this snapshot button is pressed before it starts to render the new frame from the snapshot pin?
I would like to display a message to the user when the snapshot button trigger is recognized so that they know something is happening in the background (grabbing a new frame) when the video stream stops. Depending on the resolution of the snapshot frame it can take several seconds for the new frame to come in and it might appear the the application is frozen. If it's possible to trigger another event when the trigger button is actually pressed (and we are waiting for the snapshot frame) the user could be notified with a message or something.
Thank you for any help!
Posts: 1
Joined: Fri Apr 12, 2019 6:15 pm

Re: Detecting Camera Snapshot Button

Postby andrew.kirillov » Wed Apr 24, 2019 9:09 am

Hello Steve,

I am now aware of the method to detect the actual click of the button. You may check DirechShow API, but not sure you may find anything in it. It might be possible to detect using native camera's API, but many conventional USB cameras don't provide their own SDK. Instead they expose functionality through DirectShow API, which is obviously generic and so limited. So what happens is that user presses the button, the driver/camera makes a snapshot (which takes time) and then it is provided through the standard interface.
With best regards,

Interested in supporting AForge.NET Framework?
User avatar
Site Admin, AForge.NET Developer
Posts: 3453
Joined: Fri Jan 23, 2009 9:12 am
Location: UK

Return to AForge.NET Framework