Combined mask from body tracking module

Is there any method or way to get combined mask?
From the body tracking model, we can get the mask of individual humans in the frame.
How can I get a complete mask of all humans in the frame as a single mask?

Hi @Gopi-htic

I don’t think there is a method to generate this mask in the ZED SDK, but you could merge the generated masks for all BodyData objects together.
The masks for the BodyData are 2D arrays with values being either 0 (not mask) or 255 (mask). Their dimensions are the ones of the bounding_box_2d attribute. They are located in the frame following the bounding_box_2d origin.

I think you can create a 2D array the size of your frame and merge these masks together using this info.

I hope this is helpful :slight_smile:

1 Like