In our implementation, with C++, we are seeing many cases where the bounding box is empty. When this problem starts happening, every other grab of the image results in an empty bounding box, with a null Z value.
What is the best way to find out why the bounding box is null?
ZED Model : ZED 2i
ZED SDK Version : 4.2.5
Here is a snippet of the code:
for (auto obj : mObjects.object_list)
{
if (obj.position.z < minZ || obj.position.z > maxZ)
{
if (verboseLog)
{
spdlog::info(“Object Z value is {}”, obj.position.z);
}
continue;
}
if (obj.confidence < minConfidence)
{
if (verboseLog)
{
spdlog::info(“Object confidence is {}”, obj.confidence);
}
continue;
}
if (obj.id < 0)
{
if (verboseLog)
{
spdlog::info(“Object ID {}”, obj.id);
}
continue;
}
if (obj.bounding_box.empty())
{
spdlog::info("Object bounding_box is empty");
}
if (obj.bounding_box_2d.empty())
{
spdlog::info("Object bounding_box_2d is empty");
}
if (!obj.bounding_box.empty())
{
// Where the target is going to be in the next frame
float nextMinX = obj.bounding_box[0].x + static_cast<float>(msDelay) / 1000 * obj.velocity.x;
float nextMaxX = obj.bounding_box[3].x + static_cast<float>(msDelay) / 1000 * obj.velocity.x;
float width = obj.bounding_box_2d[2].x - obj.bounding_box_2d[0].x;
float height = obj.bounding_box_2d[2].y - obj.bounding_box_2d[0].y;
/////////////////////