How to mark an object

Hello everyone,

I have one (later more) fixed camera (Zed 2i) inside a room and I need to calculate the distance an object has with people and other surrounding objects. Since all objects can move inside the scene, how do I mark my reference object?

Is there any way to mark an object as “reference”?

I would like to develop an application in python (if possible).

I hope i have been clear in my request.
Thank you

Hi @icemanXVI,

You can get the id of the detected objects through the ObjectData objects. Once you know which object is the one you want, you can access it through its id.
Alternatively, you could measure the distances between a fixed 3D point you get at the start and the detected objects.

Thanks for your reply.

I had already tried using the ID; however, the ID changes each time the reference object exits and re-enters the scene. I would like a unique ID for a given object. It must remain the same each time it appears in the scene.



This is not possible with the current SDK, it can only track objects in the scene. If it’s lost for a very short time, the ID can be recovered, but if the tracked object leaves the scene it will be affected with a new ID when it’s back.

You could implement some rules if you know where/when it appears to affect some variable’s value to the ID of the corresponding or closest detected object or use ArUco detection to identify it if you can.

thanks for the tip. I will try to use the method with ArUco :smiling_face: