Skip to main content

An AprilTags wrapper with camera discovery and axis conversion.

Project description

april_vision

Lint & build PyPI version MIT license

A fiducial marker system used by Student Robotics. Uses april tag markers to provide detection, pose and distance estimation for these markers.

Installation

This library requires OpenCV but the default installation does not install OpenCV. There are a few different versions of OpenCV with different install sizes, to install the default package without OpenCV, run the following command.

pip install april-vision

To install the lightweight headless version OpenCV install the library with the following command.

pip install april-vision[opencv]

If you want to perform some of the more advanced features of the CLI (live view of the camera) you need the full version of OpenCV. The CLI dependecies can be installed with the following command.

pip install april-vision[cli]

Then the full version of OpenCV can then be installed with the following command.

pip install opencv-python>=4.8

All the versions of OpenCV (standard, headless and contrib) clash so you should only have one installed.

Example

from april_vision.examples.camera import setup_cameras

# Markers 0-100 are 80mm in size
tag_sizes = {
    range(0, 100): 80
}

# Returns a dict of index and camera
cameras = setup_cameras(tag_sizes)

if len(cameras) == 0:
    print("No cameras found")

for name, cam in cameras.items():
    print(name)
    print(cam.see())

Tools

When installed april_vision can be used on the command line providing the following list of useful tools. Each of the tools contain help text on correct usage accessed via the -h argument.

annotate_image
annotate_video
calibrate
live
marker_generator
vision_debug
tools
    family_details
    list_cameras

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

april_vision-2.2.0.tar.gz (672.8 kB view details)

Uploaded Source

Built Distribution

april_vision-2.2.0-py3-none-any.whl (59.4 kB view details)

Uploaded Python 3

File details

Details for the file april_vision-2.2.0.tar.gz.

File metadata

  • Download URL: april_vision-2.2.0.tar.gz
  • Upload date:
  • Size: 672.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for april_vision-2.2.0.tar.gz
Algorithm Hash digest
SHA256 7c8dc74aa39fa4f61adac704cd85ae2dcd5767d7dd6cc5cf0522090cb46ea365
MD5 19d5ea276ffe08efd5072bcf9dc7351e
BLAKE2b-256 ababddf50f405f444f7450da70a3a3a1bb75ccb05c4433209572a03868d5dfa3

See more details on using hashes here.

File details

Details for the file april_vision-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: april_vision-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 59.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for april_vision-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1f0df41b86f4188dd23c6403a9dd1e6d9e537c1fee0d99cb9a5bc405f3ee589a
MD5 ffc4921ad79e94e653efd1a9d90ced75
BLAKE2b-256 b6056aa68907761e6ee81ce963dfa2aefcc827851ad7ccfdc9dce55432da8722

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