diff options
author | Theo De La Hogue | 2023-09-23 07:22:23 +0200 |
---|---|---|
committer | Theo De La Hogue | 2023-09-23 07:22:23 +0200 |
commit | 23fa1a7835b3c7cfd976b1d160878289b1f0657c (patch) | |
tree | acc107a975536f5d57ae269063efe7b613e6bc84 /docs/user_guide/aruco_markers/markers_detection.md | |
parent | b947573f7dbccb5b2b13b64677192145f2dbb864 (diff) | |
download | argaze-23fa1a7835b3c7cfd976b1d160878289b1f0657c.zip argaze-23fa1a7835b3c7cfd976b1d160878289b1f0657c.tar.gz argaze-23fa1a7835b3c7cfd976b1d160878289b1f0657c.tar.bz2 argaze-23fa1a7835b3c7cfd976b1d160878289b1f0657c.tar.xz |
Fixing code annotation. Removing useless documentation section. Fixing documentation cross reference.
Diffstat (limited to 'docs/user_guide/aruco_markers/markers_detection.md')
-rw-r--r-- | docs/user_guide/aruco_markers/markers_detection.md | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/docs/user_guide/aruco_markers/markers_detection.md b/docs/user_guide/aruco_markers/markers_detection.md deleted file mode 100644 index af2fb4f..0000000 --- a/docs/user_guide/aruco_markers/markers_detection.md +++ /dev/null @@ -1,47 +0,0 @@ -Markers detection -================= - -![Detected markers](../../img/detected_markers.png) - -Firstly, the [ArUcoDetector](../../argaze.md/#argaze.ArUcoMarkers.ArUcoDetector.ArUcoDetector) needs to know the expected dictionary and size (in centimeter) of the [ArUcoMarkers](../../argaze.md/#argaze.ArUcoMarkers.ArUcoMarker) it have to detect. - -Notice that extra parameters are passed to detector: see [OpenCV ArUco markers detection parameters documentation](https://docs.opencv.org/4.x/d1/dcd/structcv_1_1aruco_1_1DetectorParameters.html) to know more. - -``` python -from argaze.ArUcoMarkers import ArUcoDetector, ArUcoOpticCalibrator - -# Assuming camera calibration data are loaded - -# Loading extra detector parameters -extra_parameters = ArUcoDetector.DetectorParameters.from_json('./detector_parameters.json') - -# Create ArUco detector to track DICT_APRILTAG_16h5 5cm length markers -aruco_detector = ArUcoDetector.ArUcoDetector(optic_parameters=optic_parameters, dictionary='DICT_APRILTAG_16h5', marker_size=5, parameters=extra_parameters) -``` - -Here is [DetectorParameters](../../argaze.md/#argaze.ArUcoMarkers.ArUcoDetector.DetectorParameters) JSON file example: - -``` -{ - "cornerRefinementMethod": 1, - "aprilTagQuadSigma": 2, - "aprilTagDeglitch": 1 -} -``` - -The [ArUcoDetector](../../argaze.md/#argaze.ArUcoMarkers.ArUcoDetector.ArUcoDetector) processes image to detect markers and allows to draw detection results onto it: - -``` python -# Detect markers into image and draw them -aruco_detector.detect_markers(image) -aruco_detector.draw_detected_markers(image) - -# Get corners position into image related to each detected markers -for marker_id, marker in aruco_detector.detected_markers.items(): - - print(f'marker {marker_id} corners: ', marker.corners) - - # Do something with detected marker i corners - ... - -``` |