I think I just need some clarification. I have code to find contours in the live camera preview and I want to track each contour with an ID. I'm using this code for each contour to create the tracker.
Rect rect = Imgproc.boundingRect(contour);
Rect2d rect2d = new Rect2d(rect.x, rect.y, rect.width, rect.height);
multiTracker.add(TrackerMOSSE.create(), ingray, rect2d);
Since this is happening every frame obviously it is creating a new tracker every single frame and just keeps adding even if the contour is actually the same object between frames. Is there a way to check if the contour is already tracked?