Hi @Jianxin xiao Thank you for posting the question on this forum.
I don't think there is any out of the box approaches provided by the Body tracking SDK to achieve what you are looking for. The closest out of the box approach I see is to use the body tracking index map which includes the instance segmentation map for each body in the depth camera capture. Each pixel maps to the corresponding pixel in the depth or IR image. The value for each pixel represents which body the pixel belongs to. It can be either background (value K4ABT_BODY_INDEX_MAP_BACKGROUND
) or the index of a detected k4abt_body_t
.
You may use the function k4abt_frame_get_body_index_map() to access the body index map. Below is a sample snippet on how to use it in the code.
k4a_image_t body_index_map = k4abt_frame_get_body_index_map(body_frame);
... // Do your work with the body index map
k4a_image_release(body_index_map);
You can get more information on this functionality from the following resources.