Bounding Boxes On Video Frames With AWS Rekognition Video

0

Hey everyone,
I am trying to draw bounding boxes on the frames given by the timestamp from get_label_detection. Basically after analyzing a video and calling get_label_detection I am returned a dictionary in which a key is 'Timestamp'. What I want to do is get the frame of the video at this timestamp and draw the associated bounding boxes to this frame before stitching the video back together. I am using cv2.CAP_PROP_POS_MSEC to retrieve the milliseconds for each frame but these values do not align with the output of get_label_detection 'Timestamp'. If anyone could point me in the right direction I would greatly appreciate it.

Thanks in advance.

Edited by: brussell152 on Oct 25, 2019 8:53 PM

asked 4 years ago397 views
1 Answer
0

Hi brussell152,

Both Rekognition Timestamp as well as OpenCV's CAP_PROP_POS_MSEC is intended to return the current number in milliseconds from the start of the video.

How are you checking that cv.CAP_PROP_POS_MSEC has some conflict with the Rekognition Timestamp? Are you grabbing the frame at cv.CAP_PROP_POS_MSEC = Timestamp, and seeing that the frame doesn't make sense with the GetLabelDetection results?

If so, then as a starting point, can you try to use a video player to go to the Timestamp value returned by the Rekognition results, and check if the results for that timestamp seem to make sense?

-YuxuanAWS

answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions