Decode boundingBoxGrid

Answered

Comments

5 comments

  • Avatar
    Sergey Bystrov

    It's base64-encoded 44x32 bitmap of motion grid cells intersected by the object. Decode base64 and interpret the resulting bytes as a sequence of 44 big-endian 32-bit unsigned integers. Each integer corresponds to a column of motion-grid cells, from the left to right. Bits in each integer, from least to most-significant correspond to cells within the column, from bottom to top.

    0
    Comment actions Permalink
  • Avatar
    Sergey Bystrov

    value represent the motion that occurred over the entirety of the object track

    0
    Comment actions Permalink
  • Avatar
    Konstantin

    Thank you for prompt response, I successfully decoded the string. But effectively it represents the overall 'spot' of object movement in the track and not the sequence of detected positions. It seems that this sequence should be accessible from objectPositionSequence array but it's empty. Does it depend on plugin metadata implementation and can I obtain this sequence somewhere in API if it's still there?

    0
    Comment actions Permalink
  • Avatar
    rvasilenko

    Hello!

    objectPositionSequence field is 'heavy', because this details are not written to the database but placed inside media files only as a separate track. So VMS fill it if and only if a single track is requested and addition parameter 'needFullTrack' is set. Another option is to open RTSP connection to the camera, and add url  parameter 'enable_analytics_objects'. VMS will send metadata stream that contains all attributes and bounding boxes.

    As I understand both methods are not effetient (slow) to calculate heatmap. Probably we can introduce some effecient extension: field boundingBoxGrid is a bit field array, we could extend it to a bytes array: each cell could contains value in range 0.255 or 0..65535 for a track (it could contains a value how many times rect covered this cell for a track). Will it help?

     

    0
    Comment actions Permalink
  • Avatar
    Konstantin

    Thank you for your comment. As I move through my project I see there is no need to keep detailed movement data in VMS (i.e. object standing in front of camera will produce enormous amount of data without any meaningful information). What I would really appreciate is an API to read and modify analytics data. Hope it's on the roadmap 

    0
    Comment actions Permalink

Please sign in to leave a comment.