GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - SouthEugeneRoboticsTeam/DeepSpace-2019-Vision: SERT's OpenCV code for the 2019 Deep Space game

This repository was archived by the owner on Sep 6, 2019. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

153 Commits
153 Commits

Folders and files

NameName
Last commit message
Last commit date
cameras
cameras
 
 
config
config
 
 
images
images
 
 
support
support
 
 
tests/images
tests/images
 
 
vision
vision
 
 
.flake8
.flake8
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
calibrate.py
calibrate.py
 
 
gui.py
gui.py
 
 
install_support.sh
install_support.sh
 
 
requirements.txt
requirements.txt
 
 
run.py
run.py
 
 
start.sh
start.sh
 
 
start_gui.sh
start_gui.sh
 
 

Repository files navigation

Archived. See vision repo for game-agnostic code.

Logo

team 2521 team 2521 team 2521 team 2521

Usage

Before starting the program, you must install OpenCV >= v3.1.x along with the pip dependencies:

$ pip install -r requirements.txt

Then, you can run the program using:

$ python run.py

Full usage:

usage: run.py [-h] [-i IMAGE] [-s SOURCE] [-t TEAM] [-d] [-na MIN_AREA]
              [-xa MAX_AREA] [-nf MIN_FULL] [-xf MAX_FULL]
              [-l LOWER_COLOR [LOWER_COLOR ...]]
              [-u UPPER_COLOR [UPPER_COLOR ...]] [-tn] [-v]

Usage with Docker

If you are using Docker, the installation process is much easier.

Note: due to the sizes of the images that are installed as part of the build process, it is recommended to have a few GB of hard disk space available when building.

First, cd to this repository and then run docker build . -t vision. All existing config files will be used in the build process to make the image.

This will produce a docker image which can be run using:

$ docker run --device /dev/video0 vision

Make sure that you have a camera connected before running this!

Connection Status GUI

SERT's vision software comes with a connection status GUI to help debug connection issues. This GUI can be displayed on a monitor connected to the co-processor. We use an Adafruit 5" screen.

  • RADIO checks connection to the robot's radio (at 10.XX.XX.1)
  • ROBOT checks connection to the roboRIO (at 10.XX.XX.2)
  • NTABL checks connection to the NetworkTables server on the roboRIO
Good Warning Bad
Connection is good and system is ready. Some connections are down. No connection. Ensure ethernet is plugged in.
good good good

Configuration

Command-Line Options

All command-line arguments may be configured in the config.ini file (located at config/config.ini). For example, the --lower-rgb argument may be edited using the lower-rgb line in the config.ini.

optional arguments:
  -h, --help            show this help message and exit
  -i IMAGE, --image IMAGE
                        path to image
  -s SOURCE, --source SOURCE
                        video source (default=0)
  -t TEAM, --team TEAM  the team of the target roboRIO
  -d, --display         display results of processing in a new window
  -na MIN_AREA, --min-area MIN_AREA
                        minimum area for blobs
  -xa MAX_AREA, --max-area MAX_AREA
                        maximum area for blobs
  -nf MIN_FULL, --min-full MIN_FULL
                        minimum fullness of blobs
  -xf MAX_FULL, --max-full MAX_FULL
                        maximum fullness of blobs
  -l LOWER_COLOR [LOWER_COLOR ...], --lower-color LOWER_COLOR [LOWER_COLOR ...]
                        lower color threshold in HSV
  -u UPPER_COLOR [UPPER_COLOR ...], --upper-color UPPER_COLOR [UPPER_COLOR ...]
                        upper color threshold in HSV
  -tn, --tuning         open in tuning mode
  -v, --verbose         for debugging, prints useful values

Camera

For use with the Microsoft Lifecam 3000, the camera's exposure should be set manually because the Lifecam will auto-adjust otherwise, making thresholding difficult. This can be done with V4L:

$ sudo apt-get install v4l-utils
$ v4l-ctl -d /dev/video0 -c exposure_auto=1 # 1=DISABLED, 3=ENABLED
$ v4l-ctl -d /dev/video0 -c exposure_absolute=50

About

SERT's OpenCV code for the 2019 Deep Space game

Topics

2019deepspacedockerfrcopencvpythonrobotvision

Resources

Readme
GPL-3.0 license
Activity
Custom properties

Stars

4 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.