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.1.tar.gz (52.8 kB view details)

Uploaded Source

Built Distribution

ovl-2022.1.1-py3-none-any.whl (75.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ovl-2022.1.1.tar.gz
  • Upload date:
  • Size: 52.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.2

File hashes

Hashes for ovl-2022.1.1.tar.gz
Algorithm Hash digest
SHA256 918440f0f3881d960ab89c308ed24dfae176cbbebf7c6fd9546a11133350b0a9
MD5 757a266bdf822cbd84e53dca3a2f6074
BLAKE2b-256 183af0cc32fff72891d98d6835dbe80128df0d360c087f8cf4fa86d150770f91

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ovl-2022.1.1-py3-none-any.whl
  • Upload date:
  • Size: 75.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.2

File hashes

Hashes for ovl-2022.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5afe1cbecb8cff863d6b05e1306c96d07cb0670217c09a700c10ac5867c13097
MD5 9f5b7149b7b3e3c4e6687b1b41d89803
BLAKE2b-256 ac2c5736cf18faa146449ac36b1ca98bb2f7f0eccb03acc0562a9d0b64146e0f

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