Skip to main content

apriltag marker detection

Project description

Apriltag

apriltag marker detection based on https://github.com/swatbotics/apriltag

Dependencies

  • OpenCV (optional)

Example

  import apriltag
  import cv2
  img = cv2.imread('apriltag_foto.jpg'.cv2.IMREAD_GRAYSCALE)
  detector = apriltag.Detector()
result = detector.detect(img)

result is in the form of

[DetectionBase(tag_family='tag36h11', tag_id=2, hamming=0, goodness=0.0, decision_margin=98.58241271972656, homography=array([[ -1.41302664e-01,   1.08428082e+00,   1.67512900e+01],
   [ -8.75899366e-01,   1.50245469e-01,   1.70532040e+00],
   [ -4.89183533e-04,   2.12210247e-03,   6.02052342e-02]]), center=array([ 278.23643912,   28.32511859]), corners=array([[ 269.8939209 ,   41.50381088],
   [ 269.57183838,   11.79248142],
   [ 286.1383667 ,   15.84242821],
   [ 286.18066406,   43.48323059]])),
DetectionBase(tag_family='tag36h11', ... etc

Multiple options can be specified to tune the detection performance:

options = apriltag.Detectoroptions(families='tag36h11',
                                 border=1,
                                 nthreads=4,
                                 quad_decimate=1.0,
                                 quad_blur=0.0,
                                 refine_edges=True,
                                 refine_decode=False,
                                 refine_pose=False,
                                 debug=False,
                                 quad_contours=True)
detector = apriltag.Detector()
result = detector.detect(img)

.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apriltag-0.0.12.tar.gz (188.0 kB view details)

Uploaded Source

File details

Details for the file apriltag-0.0.12.tar.gz.

File metadata

  • Download URL: apriltag-0.0.12.tar.gz
  • Upload date:
  • Size: 188.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for apriltag-0.0.12.tar.gz
Algorithm Hash digest
SHA256 d39baca983618cee3ba119ba92797fd9a87beebf1caca9f5bc748ec6a46b5843
MD5 2cae541f4d5a5ff3eb8e36c2dfa1970d
BLAKE2b-256 24682af63f81644825e46fb3709220ec8479f42473c80d0016bc953609dc3a9d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page