Lets say there is an image of multiple same marker (same ID)
When you run
corners, ids, _ = cv2.aruco.detectMarkers(frame, dictionary)
Is there way to know which marker is sorted first?
probably not. I’d say it’s implementation-defined. probably correlates lightly with the markers’ x or y coordinates, in whatever way the quads are initially identified.
if you want a particular order, you should sort them explicitly.
if you wanted to track them, while their identity bits aren’t actual identity, then you’d have to slap some “tracking by association” on top of the set of markers. that usually involves matching current detection to existing “tracks”, by closest distance or something like that.