diff options
author | Théo de la Hogue | 2023-03-28 14:35:29 +0200 |
---|---|---|
committer | Théo de la Hogue | 2023-03-28 14:35:29 +0200 |
commit | 6bb8f307f67275543ec50b51fc98a19483b0c066 (patch) | |
tree | 7c8bbbf40a5fd56a0775577f31cdeaa2ff3a51c8 /src/argaze.test/ArUcoMarkers/ArUcoDetector.py | |
parent | a3cbf7421d2062f09d0f27e247b065754b62922a (diff) | |
download | argaze-6bb8f307f67275543ec50b51fc98a19483b0c066.zip argaze-6bb8f307f67275543ec50b51fc98a19483b0c066.tar.gz argaze-6bb8f307f67275543ec50b51fc98a19483b0c066.tar.bz2 argaze-6bb8f307f67275543ec50b51fc98a19483b0c066.tar.xz |
Making ArUcoDetector as dataclass.
Diffstat (limited to 'src/argaze.test/ArUcoMarkers/ArUcoDetector.py')
-rw-r--r-- | src/argaze.test/ArUcoMarkers/ArUcoDetector.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/argaze.test/ArUcoMarkers/ArUcoDetector.py b/src/argaze.test/ArUcoMarkers/ArUcoDetector.py index 3272f1c..5a45fad 100644 --- a/src/argaze.test/ArUcoMarkers/ArUcoDetector.py +++ b/src/argaze.test/ArUcoMarkers/ArUcoDetector.py @@ -42,6 +42,17 @@ class TestArUcoDetectorClass(unittest.TestCase): # Check ArUcoDetector creation self.assertEqual(aruco_detector.dictionary.name, 'DICT_ARUCO_ORIGINAL') + self.assertEqual(aruco_detector.marker_size, 3) + self.assertIsNone(numpy.testing.assert_array_equal(aruco_detector.camera.dimensions, [0, 0])) + self.assertEqual(aruco_detector.detected_markers_number, 0) + self.assertEqual(aruco_detector.detected_markers, {}) + + aruco_dictionary = ArUcoMarkersDictionary.ArUcoMarkersDictionary('DICT_APRILTAG_16h5') + aruco_detector = ArUcoDetector.ArUcoDetector(aruco_dictionary, 5.2) + + # Check ArUcoDetector creation + self.assertEqual(aruco_detector.dictionary.name, 'DICT_APRILTAG_16h5') + self.assertEqual(aruco_detector.marker_size, 5.2) self.assertIsNone(numpy.testing.assert_array_equal(aruco_detector.camera.dimensions, [0, 0])) self.assertEqual(aruco_detector.detected_markers_number, 0) self.assertEqual(aruco_detector.detected_markers, {}) @@ -58,6 +69,7 @@ class TestArUcoDetectorClass(unittest.TestCase): # Check ArUcoDetector creation self.assertEqual(aruco_detector.dictionary.name, 'DICT_ARUCO_ORIGINAL') + self.assertEqual(aruco_detector.marker_size, 3) self.assertIsNone(numpy.testing.assert_array_equal(aruco_detector.camera.dimensions, [1920, 1080])) self.assertEqual(aruco_detector.parameters.cornerRefinementMethod, 3) self.assertEqual(aruco_detector.parameters.aprilTagQuadSigma, 2) |