aboutsummaryrefslogtreecommitdiff
path: root/src/argaze.test/ArUcoMarkers/ArUcoOpticCalibrator.py
diff options
context:
space:
mode:
authorThéo de la Hogue2024-04-17 13:32:51 +0200
committerThéo de la Hogue2024-04-17 13:32:51 +0200
commit4d0de7c804914a55977635ec6bc46beb0cf7808a (patch)
treeb3e40c76052b067723bfc41547b81a38a0da00b2 /src/argaze.test/ArUcoMarkers/ArUcoOpticCalibrator.py
parent9e0e2db258a2a475637813649e81b7e400b17022 (diff)
downloadargaze-4d0de7c804914a55977635ec6bc46beb0cf7808a.zip
argaze-4d0de7c804914a55977635ec6bc46beb0cf7808a.tar.gz
argaze-4d0de7c804914a55977635ec6bc46beb0cf7808a.tar.bz2
argaze-4d0de7c804914a55977635ec6bc46beb0cf7808a.tar.xz
Renaming ArUcoMarkers into ArUcoMarker
Diffstat (limited to 'src/argaze.test/ArUcoMarkers/ArUcoOpticCalibrator.py')
-rw-r--r--src/argaze.test/ArUcoMarkers/ArUcoOpticCalibrator.py61
1 files changed, 0 insertions, 61 deletions
diff --git a/src/argaze.test/ArUcoMarkers/ArUcoOpticCalibrator.py b/src/argaze.test/ArUcoMarkers/ArUcoOpticCalibrator.py
deleted file mode 100644
index 79d2ead..0000000
--- a/src/argaze.test/ArUcoMarkers/ArUcoOpticCalibrator.py
+++ /dev/null
@@ -1,61 +0,0 @@
-"""
-
-This program is free software: you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free Software
-Foundation, either version 3 of the License, or (at your option) any later
-version.
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-You should have received a copy of the GNU General Public License along with
-this program. If not, see <https://www.gnu.org/licenses/>.
-"""
-
-__author__ = "Théo de la Hogue"
-__credits__ = []
-__copyright__ = "Copyright 2023, Ecole Nationale de l'Aviation Civile (ENAC)"
-__license__ = "GPLv3"
-
-import unittest
-import os
-
-from argaze.ArUcoMarkers import ArUcoOpticCalibrator
-
-import numpy
-
-class TestOpticParametersClass(unittest.TestCase):
- """Test OpticParameters class."""
-
- def test_new(self):
- """Test OpticParameters creation."""
-
- # Check defaut optic parameters creation
- optic_parameters = ArUcoOpticCalibrator.OpticParameters()
-
- # Check ArUco optic parameters
- self.assertEqual(optic_parameters.rms, 0.0)
-
- #self.assertEqual(type(optic_parameters.K), numpy.array)
-
- self.assertIsNone(numpy.testing.assert_array_equal(optic_parameters.dimensions, [0, 0]))
- self.assertIsNone(numpy.testing.assert_array_equal(optic_parameters.K, ArUcoOpticCalibrator.K0))
- self.assertIsNone(numpy.testing.assert_array_equal(optic_parameters.D, ArUcoOpticCalibrator.D0))
-
- def test_from_json(self):
-
- # Edit optic parameters file path
- current_directory = os.path.dirname(os.path.abspath(__file__))
- json_filepath = os.path.join(current_directory, 'utils/optic_parameters.json')
-
- # Load optic parameters
- optic_parameters = ArUcoOpticCalibrator.OpticParameters.from_json(json_filepath)
-
- # Check ArUco camera
- self.assertEqual(optic_parameters.rms, 1.0)
- self.assertIsNone(numpy.testing.assert_array_equal(optic_parameters.dimensions, [1920, 1080]))
- self.assertIsNone(numpy.testing.assert_array_equal(optic_parameters.K, [[1.0, 0.0, 1.0], [0.0, 1.0, 1.0], [0.0, 0.0, 1.0]]))
- self.assertIsNone(numpy.testing.assert_array_equal(optic_parameters.D, [-1.0, -0.5, 0.0, 0.5, 1.0]))
-
-if __name__ == '__main__':
-
- unittest.main() \ No newline at end of file