So, I just started working with Bonsai for a couple of projects and I'm still in the weeds regarding all the different languages involved (having had Null previous experience with any of them).
I'm tracking 2 different animals at the same time. They can be in or out of the frame, their choice. So I use their different sizes to choose which one is which and I have the centroids for both animals. The result of this centroids is either a point in the image or a (n. def., n. def.). Now I want to plot online the trajectories of both animals on top of the same image. So I ziped both centroids and the Image and I adapted a python transform written by gonzalo in a different Forum thread. I am able to plot both trajectories BUT I get an artifact with the (n. def., n. def.). In this cases the python script reads the n. def., n.def. as 0,0. I want to script a condition to IF these points out. But I haven't been able to access the actual centroid Point2f values (Point2f is not callable). I tried looking around but haven't found the right answer.
I need something of the sort of
If centroid is (n. def., n. def) or If centroid is a float
nothing
else
track
Probably one of you knows how to solve this silly question.
Best
Nacho