Tagging/annotating every frame in the video with the activity performed using OpenCV python

asked 2018-10-29 01:28:59 -0500

prb gravatar image

updated 2018-10-29 03:12:23 -0500

I have human pose coordinates in a CSV file, for a particular activity. I have written a function which detects the activity(sitting, standing, bending) according to these coordinates. I have the activity in the form of a list. I would like to use this activity list as an input to draw() and show that on the frame. I would appreciate any help.

edit retag flag offensive close merge delete


how do you want to "draw" an activity ?

berak gravatar imageberak ( 2018-10-29 02:56:32 -0500 )edit

I think the title was wrong. I have edited it. I want to write labels on the frames. I have a CSV file of pose estimation (coordinates) and I have a predict function which takes these coordinates in the list format and gives the output in the form a list. Following are the steps I am working on*:

  • import CSV files of joint coordinates & corresponding movie: OpenCV (done)

  • convert imported joint coordinates to list type(done)

  • call action detection algorithm (predict function)

  • *output result of detection on movie ( labeling the movie according to the activity in the movie)*

prb gravatar imageprb ( 2018-10-29 03:20:07 -0500 )edit

are you looking for putText ?

berak gravatar imageberak ( 2018-10-29 03:27:46 -0500 )edit

I have tried this : df = pd.read_csv(path) f_no = 0

while (cap.isOpened()) :
    ret,frame = cap.read()
    if ret == True:
        if f_no == df.frameCount.values:
            label = detectors.check(normalized_data)  ## we need the normalix\zed data one list at a time
        if cv2.waitKey(1) & 0xFF == ord("q")
prb gravatar imageprb ( 2018-10-29 03:37:31 -0500 )edit

and, does it solve the problem ?

berak gravatar imageberak ( 2018-10-29 03:41:12 -0500 )edit