• DepthAI-v2
  • Closest point in bounding box - Feature available?

Hello,

I was writing an algorithm for a new feature that I think could benefit more that just me.
I wanted to see if you guys are already working on something like that.

Feature:
Nearest point in the bounding box.

Descriptions:
If a MobileNet detects a human and draws a BB around them , it makes sense to locate that person as the average of the entire BB. But it could also be useful to have the API report the closest point to the camera in the BB (the furthest would be not as useful).

I am planning on using some way to conver the BB area into an array of numbers and finding the max in it.
If this is not in the pipeline, please do let me know. You guys are pushing it as much as you guys can. I appreciate it. Just wanted to see if this could help someone else as well.

Have a great weekend.

    Hi tarocal

    AFAIK the SpatialLocationCalculator currently calculates the bounding box spatial coordinates based on average depth inside it (with some padding applied).

    I think we could support different methods of depth calculation inside SpatialLocationCalculator, but I'm also looking forward to your implementation, I also think it may be helpful to others, thanks!

    Hello tarocal ,
    so I believe we have added this to the library already (3 weeks ago), here's an example. You can see getting min/max of the depth in the bounding box on lines 91/92. Closes point would be the depth min. I hope this is what you had in mind๐Ÿ™‚
    Thanks, Erik