Capture Image using push button and OpenCV

Hi I want to capture image with Jetson nano GPIO pin. For example, there will be the push button that connects to my jetson nano gpio. And the logic is that once I run the code, the webcam connected to jetson nano opens and image will be captured and store it to the folder once I press the push button. Image capturing will be stopped once I let go off the button. I want to do it with opencv and python. Could it be done? I want to get some suggestion on how to do that?

Hi @kmyat3116

I think it’s possible and you can start with this file:

In this file, you can use your image capturing and saving commands instead of output pin. You can implement your opencv commands easily into that.

Regards