myFloat = float(3.3)

is there a way to get something like this to work?
i read so many pages, and my 2 right sided brain just don’t understand it.

myFloat = 3.3
windowname = f"{myFloat}" # a "format" string

is that the intention? not sure why you’d wanna use a number as a window’s name.

1 Like

works great, just not working the way i thought it would.

what did you think it’d do? what do you want to do?

I waned to use it for testing and learning, i have a number printing in a while loop, showing in the console window, it would be easier if i could see it on a cv2 window.
wanted it as a live gui kind of thiny, lol

nope, imshow windows have a fixed title.

you can use putText to draw in a picture and imshow that however.

or use an actual GUI toolkit. python comes with tkinter. docs are awful but there are lots of examples. “real” GUI will require different structure to your source code because GUI always requires an event loop. even OpenCV needs that (piece by piece in the waitKey procedure).

working my way up to other stuff like that, right now im trying to learn the ins and outs of the different ways I can track objects

I’d recommend to run samples/python/, and then some DNN trackers (especially samples/dnn/*siam*.py). also give general object detection DNNs a look.

I’ve given the trackers module a few glances but don’t like any of them. the Tracker class is too restrictive for my use cases (can’t feed corrections back in, AFAICS). I took the example and hacked it for my purposes, combining it with an object detector to remove drift.