This module is a simplified version of the C++ module FirstVision. It is available with JeVois v1.6.2 or later.
This module implements a simple color-based object detector using OpenCV in Python. Its main goal is to also demonstrate full 6D pose recovery of the detected object, in Python.
This module isolates pixels within a given HSV range (hue, saturation, and value of color pixels), does some cleanups, and extracts object contours. It is looking for a rectangular U shape of a specific size (set by parameters
This module usually works best with the camera sensor set to manual exposure, manual gain, manual color balance, etc so that HSV color values are reliable. See the file script.cfg file in this module's directory for an example of how to set the camera settings each time this module is loaded.
This module is provided for inspiration. It has no pretension of actually solving the FIRST Robotics vision problem in a complete and reliable way. It is released in the hope that FRC teams will try it out and get inspired to develop something much better for their own robot.
See http://jevois.org/tutorials for tutorials on getting started with programming JeVois in Python without having to install any development software on your host computer.
Edit the module's file at JEVOIS:/modules/JeVois/FirstPython/FirstPython.py and set the parameters