Skip to main content

a framework that wraps opencv for our needs in FRC

Project description

Spikes ComputerVision Framework

Spikes ComputerVision Framework, or scvf for short, is a framework that is made to make programming CV for the FRC easier

This framework wraps opencv and pipelines generated by grip in a way that is efficient and elegant.

Installation Instructions:

$ python3 -m pip install scvf

API

communication through network tables

use the pipeline_name key to send the pipeline_name
use the camera_id key to send the camera id
use the exposure key to send the exposure for the camera

pipeline compatibility

Though we recommend grip as the main tool to generate cv2 pipelines using grip is not strictly required
You can provide any object to server as a pipeline as long as it contains the next two methods:
process() - a method that processes a given image
get_output() - a method that returns the output of the processing

IO functions

scvf receives two functions that are responsible for communications with external data sources.

  1. settings_supplier(callback) this function receives settings and supplies them to callback provided to it.
  2. output_consumer(output) this function sends the output of the image processing to it's next destination

Notes

GRIP and SCVF compatibility

if you are using grip to generate your pipelines keep in mind that the pipelines generated from it aren't compatible with scvf out of the box due to differences between python3 and python2

as of now, these changes are required:

  • change the enum for the blur type to a python3-enum
  • change the findContours function as instructed here
  • add a get_output() method that is compatible with the API specified above
Opencv 4
  • Switch between the im2 and contour contours variables in the filter_contours function of your pipeline

IO implementations

  • make sure that your custom output_consumer is compatible with the output provided by your pipelines.

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

scvf-1.1.2.tar.gz (5.6 kB view details)

Uploaded Source

File details

Details for the file scvf-1.1.2.tar.gz.

File metadata

  • Download URL: scvf-1.1.2.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.2

File hashes

Hashes for scvf-1.1.2.tar.gz
Algorithm Hash digest
SHA256 3cd430e523d2d8552a0442b144b3046bcb71169bfdae07c5c073fa7c069f766f
MD5 e80bd30d41e42bca771855569c6ebdbf
BLAKE2b-256 1b4d183cd2c6fd4437bdbe2a464901adb855af78ba637d0c898d49263250a7e9

See more details on using hashes here.

Supported by

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