Yes, you’re right. Even after changing it using obj_meta.object_id it still shows the original.
If it is really needed to change that value, then you can create a copy of that object meta and attach it to the object meta list. But I don’t think it would be very efficient to do that.
You can use this function nvds-acquire-obj-meta-from-pool to create a new NvDsObjectMeta, then assign the properties as you like and attach the meta back to the pool using nvds_add_obj_meta_to_frame
Instead if you just need to view it on screen, you can modify the text parameters to show your tracking ID.
Given below is a minimum usable code for your probe function.
Ok, thank you very much. If you have time, I have two last questions. The first one is where can I find these functions. Can you give me the document address? Because I may also need to hide part of the text later. The second is that the tracker can be set to choose to track a certain category of objects?
For your second question, there is no direct way to track only certain objects, but instead you can set checkClassMatch to true in your tracking config and filter out the objects that you don’t need. This might be helpful Gst-nvtracker — DeepStream 6.1.1 Release documentation