Deepstream_test_3.py write image to internal drive when person detect

Hi,

I am using deepstream_test_3.py and rtsp cam. I would like export the image after the person detect.

if obj_counter[PGIE_CLASS_ID_PERSON]>0:
#write image to drive