This project contains components to calibrate these types of sensor data:
-
camera
-
line profile (planned)
... and these types of actors:
- delta robot (planned)
The calib-project was developed in Visual Studio Code. It is integrated in the KERNEL.ai-project. To open the calib project open Visual Studio Code using calib as base folder. This project uses an own environment based on Python 3.8 (64-bit). Therefore, an environment can be set up using the following command:
~\AppData\Local\Programs\Python\Python38\python.exe -m venv .venvActivate your virtual Environment:
.\.venv\Scripts\Activate.ps1All the needed python packages are listed in the requirements.txt-file. The packages can be install using this command:
pip install -r .\requirements.txtThe testcases are written using unittest. The test-run is preconfigured in visual studio code by using the preinstalled testing extension. Just get sure, it is correctly enabled in the file .vscode/settings.json.
The linting has been enabled by installing the python module pycodestyle and is set in the file .vscode/settings.json. It is run each time a python file is stored.
The code coverage is enabled by
-
installing the python module coverage
-
installing the extension ryanluker.vscode-coverage-gutters in VS Code
To watch the code coverage run the following code in the terminal:
coverage run -m unittest discover -s .\test\ -p 'unittests_*.py'
coverage xml -o coverage.xml -iExecuting the first command executes all the written test-cases in the test-folder and creates the .coverage-file. To use this analysis within Coverage Gutters it needs to be parsed into an xml-file by the second command.
The calibration module was built according to the tutorial provided via openCV:
The targets used for camera calibration can be created according to this tutorial:
OpenCV: Create calibration pattern
This tutorial explains the homography matrix: OpenCV: Basic concepts of the homography explained with code