aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéo de la Hogue2023-09-27 09:57:42 +0200
committerThéo de la Hogue2023-09-27 09:57:42 +0200
commit3b523bb755d706ce945e3b9d93416909021f8e58 (patch)
tree5b25290b48b7a63a03caf330752a796ef6373a58 /src
parent06548cb7cb807f42fa42e4777288f67f259ae64a (diff)
downloadargaze-3b523bb755d706ce945e3b9d93416909021f8e58.zip
argaze-3b523bb755d706ce945e3b9d93416909021f8e58.tar.gz
argaze-3b523bb755d706ce945e3b9d93416909021f8e58.tar.bz2
argaze-3b523bb755d706ce945e3b9d93416909021f8e58.tar.xz
Changing DetectorParameter printing.
Diffstat (limited to 'src')
-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'