diff options
-rw-r--r-- | src/argaze/ArUcoMarkers/ArUcoMarker.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/argaze/ArUcoMarkers/ArUcoMarker.py b/src/argaze/ArUcoMarkers/ArUcoMarker.py index f41810b..93d44e8 100644 --- a/src/argaze/ArUcoMarkers/ArUcoMarker.py +++ b/src/argaze/ArUcoMarkers/ArUcoMarker.py @@ -33,6 +33,9 @@ class ArUcoMarker(): points: numpy.array = field(init=False, repr=False) """Estimated 3D corners positions in camera world referential.""" + color: tuple = field(init=False, repr=False, default_factory=lambda : (0, 255, 0)) + """Color used to draw marker on frame.""" + @property def center(self) -> numpy.array: """Get 2D center position in camera image referential.""" @@ -57,7 +60,7 @@ class ArUcoMarker(): cv.drawFrameAxes(frame, numpy.array(K), numpy.array(D), self.rotation, self.translation, self.size) - aruco.drawDetectedMarkers(frame, [self.corners], numpy.array([self.identifier])) + aruco.drawDetectedMarkers(frame, [self.corners], numpy.array([self.identifier]), self.color) def save(self, destination_folder, dpi): """Save marker image as .png file into a destination folder.""" |