Skip to content

Commit

Permalink
Fix bug with same marker coords (fix #1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dostoyewski committed May 4, 2022
1 parent 8abfffe commit ba2a6be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def run(self):
parameters=parameters)
if markerIds is not None:
out_d = {}
for idd in markerIds:
coords = list(np.mean(markerCorners[0], axis=1)[0].astype('int'))
for i, idd in enumerate(markerIds):
coords = list(np.mean(markerCorners[i], axis=1)[0].astype('int'))
image = cv.circle(image, coords, 20, (255, 0, 0), -1)
out_d[str(idd[0]) + 'x'], out_d[str(idd[0]) + 'y'] = coords[0], coords[1]
out_d['timestamp'] = n / self.fps
Expand All @@ -41,5 +41,5 @@ def run(self):


if __name__ == '__main__':
det = ARUCODetector('./test.mp4')
det = ARUCODetector('./IMG_3272.MOV')
det.run()

0 comments on commit ba2a6be

Please sign in to comment.