Skip to main content

A modular and versatile Python package for computer vision object detection pipelines tailored for robotics applications

Project description

OVL - Object Vision Library

OVL Logo

Python Module for Computer Vision Object Tracking and Detection mainly for the FIRSTֲ® Robotics Competition Program

Ovl support complex yet modular computer vision pipelines that are easy to create and modify.

Easy to create and setup for beginners and flexible for pros

You can follow up on changes in for the current version in the changelog folder

Documentation

There are multiple code examples here

Documentation is available here

Dependencies:

The following python module dependencies are needed:

  • OpenCV

  • numpy

The following python modules are optional for certain features:

  • NetworkTables (pyNetworkTables) for NetworkTableConnection (installed automatically)

  • Requests (requests) for HTTPConnection

  • PySerial (pyserial) for SerialConnection

OVL is officially supported for python 3.7+ only!

Installation:

Using pip:
python -m pip install ovl[cv]

For the full installation of all features use: python -m pip install ovl[full]

For the frc related features use the frc option: python -m pip install ovl[frc]

Note that opencv doesn't come with the precompiled version of opencv for python automatically. If you wish to compile opencv for yourself - simply refrain from using the cv flag during installation.

Usage:

The library uses simple yet highly customizable syntax to create a vision pipeline using the Vision object

A pipeline that detects a yellow circle:

import ovl

target_filters = [ovl.percent_area_filter(min_area=0.005),
                  ovl.circle_filter(min_area_ratio=0.7),
                  ovl.area_sort()]

threshold = ovl.Color([20, 100, 100], [55, 255, 255])

yellow_circle = ovl.Vision(threshold=threshold,
                           target_filters=target_filters,
                           camera=0,  # open the first connected camera
                           image_filters=[ovl.gaussian_blur()])

while True:
    image = yellow_circle.get_image()
    targets, filtered_image = yellow_circle.detect(image)
    directions = yellow_circle.get_directions(targets, filtered_image)

    print(directions)  # prints out the (x, y) coordinates of the largest target


There are more code examples and usages here

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

ovl-2022.1.3.tar.gz (52.9 kB view details)

Uploaded Source

Built Distribution

ovl-2022.1.3-py3-none-any.whl (75.1 kB view details)

Uploaded Python 3

File details

Details for the file ovl-2022.1.3.tar.gz.

File metadata

  • Download URL: ovl-2022.1.3.tar.gz
  • Upload date:
  • Size: 52.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/21.8.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for ovl-2022.1.3.tar.gz
Algorithm Hash digest
SHA256 279a76a08fedb49e5c5e7d675e8afdaccc973adbed277265643363d56c3c6483
MD5 25db7833ee7b827aad2311ce5074bd98
BLAKE2b-256 f2f690401c5929340f47e7cc50885cfd45848e8b4cab7658417b7440b1806ba1

See more details on using hashes here.

File details

Details for the file ovl-2022.1.3-py3-none-any.whl.

File metadata

  • Download URL: ovl-2022.1.3-py3-none-any.whl
  • Upload date:
  • Size: 75.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/21.8.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for ovl-2022.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0fb85c7535c5ee43f9e4cce71104f3de6aed157a12cd74ee1a562fe6d94259f1
MD5 f470b882e6e5068685143dd1c08e3c66
BLAKE2b-256 a9dd4dcd472ccac9032d43618c731d5beda0e2ff822d4156c132ea081a3f1db2

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