Jetson Inference - Python - DetectNet - Send mail


I used jetson-inference with, how to save a image (file captured) when a motion detected ?

Thanks for your reply



One of the way is to use opencv for the motion detection using the custom logic to check diff between the frames.
Also, jetcam has some in-build functions to attach callbacks to the camera value changes. Please check below link if you can use that in your solution.

For image capture you can use “cv2.imencode” to encode current frame values in jpg/png format and then write the encoded values to file in binary mode using “open(’*.png’, ‘wb’)”.

Please let us know in case of queries related to TRT.