Answer the question
In order to leave comments, you need to log in
Tracking multiple objects. How to run the same function for every object?
Good afternoon! I am writing a program for tracking objects on video. If the object is suitable, I save it to my class for further work. The bottom line is that the objects move across the field and it is necessary to record the trajectory of each object that was selected with the mouse. Stuck on the fact that you need to write a tracking function and call it for each object in parallel.
What to do?
use a construct like thread t1( traking,robot1); not really, probably ... I don’t know the number of objects, and I tried to run it through switch for 5 objects, I swear that I’m trying to run the same function at the same time. But not to write the same thing N times? Previously, I had nothing to do with multi-threaded programming, so I ask for a detailed answer, I will be very grateful!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question