aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/argaze/ArUcoMarkers/ArUcoDetector.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/argaze/ArUcoMarkers/ArUcoDetector.py b/src/argaze/ArUcoMarkers/ArUcoDetector.py
index 82c9394..3260d00 100644
--- a/src/argaze/ArUcoMarkers/ArUcoDetector.py
+++ b/src/argaze/ArUcoMarkers/ArUcoDetector.py
@@ -98,8 +98,16 @@ class DetectorParameters():
return DetectorParameters(**json.load(configuration_file))
- def __str__(self, print_all=False) -> str:
- """Detector paremeters string representation."""
+ def __str__(self) -> str:
+ """Detector parameters string representation."""
+
+ return f'{self}'
+
+ def __format__(self, spec) -> str:
+ """Formated detector parameters string representation.
+
+ Parameters:
+ spec: 'modified' to get only modified parameters."""
output = ''
@@ -109,7 +117,7 @@ class DetectorParameters():
output += f'\t*{parameter}: {getattr(self.__parameters, parameter)}\n'
- elif print_all:
+ elif spec == "":
output += f'\t{parameter}: {getattr(self.__parameters, parameter)}\n'