Skip to content

Latest commit

 

History

History
76 lines (65 loc) · 2.45 KB

README_EN.md

File metadata and controls

76 lines (65 loc) · 2.45 KB

[Japanese/English]

AprilTag-Detection-Python-Sample

AprilTag detection sample in Python.
I use pupil-labs/apriltags for detection.
※For environments other than Windows, you can use AprilRobotics/apriltag or duckietown/lib-dt-apriltags.

Demo.mp4

Requirement

  • opencv-python 4.5.3.56 or later
  • pupil-apriltags 1.0.4 or later

pupil-apriltags can be installed with pip.

pip install pupil-apriltags

Tags

Please obtain the tag image from the following.

The images used in the demo are stored in the pdf directory.

Demo

Here's how to run the demo.

python sample.py
  • --device
    Specifying the camera device number
    Default:0
  • --width
    Width at the time of camera capture
    Default:960
  • --height
    Height at the time of camera capture
    Default:540
  • --families
    Tag family
    If you specify more than one, separate them with spaces.
    Default:tag36h11
  • --nthreads
    Number of threads
    Default:1
  • --quad_decimate
    Quad detection to increase speed (decrease accuracy)
    Full resolution if 1.0 is specified
    Default:2.0
  • --quad_sigma
    Whether to apply Gaussian blur
    The setting value indicates the standard deviation in pixels
    Very noisy images may be improved by setting a non-zero value (0.8 etc.)
    Default:0.0
  • --refine_edges
    Whether the edges of each Quad are close to a strong gradient
    Default:1
  • --decode_sharpening
    How sharpen the decoded image is
    Default:0.25
  • --debug
    Whether to save the debug image
    Default:0

※See pupil-labs/apriltags#usage for details on each option

Reference

Author

Kazuhito Takahashi(https://twitter.com/KzhtTkhs)

License

AprilTag-Detection-Python-Sample is under MIT License.