This Python application uses OpenCV to detect ArUco markers and estimate their 3D pose relative to the camera.
- Detects ArUco markers in real-time video feed.
- Estimates the 3D pose (orientation and position) of the markers.
- Calculates and displays the pitch, yaw, and roll of the detected markers.
- Estimates the distance from the camera to the marker.
To run this project, you need to have Python and OpenCV installed. You can install OpenCV via pip:
$ conda env create -f environment.yml
$ conda activate xvision
Clone this repository to your local machine.
Modify the camera_matrix
and dist_coeffs
variables with the camera calibration parameters specific to your camera.
Run main.py
:
python main.py
To generate compatible ArUco markers, you can use the provided marker_generator.py script. To run the script:
python marker_generator.py
By default, this will generate an ArUco marker using the 6x6_250 dictionary. You can modify the aruco_type variable in the script to generate different types of ArUco markers.
The program will open a window displaying the real-time video feed with the detected ArUco markers(cv2.aruco.DICT_6X6_250). To stop the program, press 'q'.