stereolabs / zed-sdk

⚡️The spatial perception framework for rapidly building smart robots and spaces
https://stereolabs.com
MIT License
794 stars 462 forks source link

Is there the way to calculate distance/position to/of an object instead of pixel? #527

Open levmarki opened 1 year ago

levmarki commented 1 year ago

Preliminary Checks

Proposal

The "common" way to detect the distance to small objects is to run the object detection on RGB, apply the detection to the depth and then filter it in some way (averaging/median/whatever). Is there the way to calculate distance to the middle/top/bottom of the object only? Without using the Depth Map?

Use-Case

First of all, it will give us better results on small objects, it's much simpler to find registration between two objects (the same object from different cameras) instead of pixel calculation. In addition, maybe it can be more calculage-efficient to calculate the distances to the objects of interest instead of whole frame?

Anything else?

No response

P-yver commented 11 months ago

Hi, if you don't want to use the depth data you can compute the 3D position of the object if you have its 2D position within the left and right image, then use the stereo model to compute its 3D position.

levmarki commented 11 months ago

Thank you for your reply. The main question is if is there some way to match objects between the cameras?

On Thu, Oct 26, 2023, 10:20 Pierre Yver @.***> wrote:

Hi, if you don't want to use the depth data you can compute the 3D position of the object if you have its 2D position within the left and right image, then use the stereo model to compute its 3D position.

— Reply to this email directly, view it on GitHub https://github.com/stereolabs/zed-sdk/issues/527#issuecomment-1780551010, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG6YWZ62AJAKQYK4B3W2J3DYBIFLXAVCNFSM6AAAAAATGVTKICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBQGU2TCMBRGA . You are receiving this because you authored the thread.Message ID: @.***>