Skip to content

Configuration

Finlay Maroney edited this page Jan 28, 2020 · 7 revisions

Configuring visionParams.properties

Configuration file explanation

visionParams.properties is the primary config file that is used by FVTS, it contains information about all of the vision profiles that are needed to detect objects.

Graphical configuration

FVTS has an integrated graphical configuration editor that can be accessed by running the program in development mode, see Development for information on how to do this.

Manual configuration

The configuration has a wide variety of parameters that it takes, this file is in a non standard format that is name: which defines a profile, then every line after that starts with 2 spaces will be considered part of that profile until another one is defined, inside each profile variables are in the format of name=data.

Parameters

  • minSaturation The minimum saturation for the colour threshold
  • maxSaturation The maximum saturation for the colour threshold
  • minValue The minimum value for the colour threshold
  • maxValue The maximum value for the colour threshold
  • minHue The minimum hue for the colour threshold
  • maxHue The maximum hue for the colour threshold
  • type The type of device to read the image from (WIP and only currently supports usb)
  • identifier The identifier for the device to be read from (usb device number for usb)
  • erodeDilateIterations The number of erode dilate iterations to run on the image to reduce noise (note: very slow operation so don't increase this too much)
  • distToCentreImportance The importance between 0 and 1 that the preferred target is closest to the centre instead of the largest target (adjust this to be closer to 1 if your robot cannot turn well, but if it can turn easily then closer to 0 is good)
  • imgDumpPath The path to save vision images to (should be on removable media that is mounted on a pi because the sd card has limited writes)
  • imgDumpTime The number of seconds between saving vision images (note that this can contain decimals up to double precision)
  • slope The slope used to calculate the distance from vision objects (FVTS takes the height of the object and treats it like a point on a line to find the distance)
  • yIntercept The y intercept used to calculate the distance from vision objects
  • resolution The resolution to scale images to before FVTS processes them (smaller makes it much faster, note that around 160x120 or 80x60 is recommended for raspberry pis)
  • imageFile The file to load a static image from (for debugging stuff)
  • group 1 or 0 which represents if FVTS should try to group objects based on angles (1=yes 0=no)
  • groupAngle The angle that the objects are at (1 object at this angle and the other 1 at negative this angle)
  • minArea The minimum percentage of the image (in decimal) that any object needs to be in order to be recognized

Configuring master.cf

Configuration file explanation

master.cf is the master configuration file that controls global settings as well as which profiles are enabled

Configuration

master.cf is in the same format as visionParams.properties, except instead of profile names it uses configuration section names

The sections in the master.cf file are as follows

  • config
  • enabled

Config section

This section is for global configuration variables

The parameters in config are as follows

  • allowOverride Which enables/disables the NetworkTables vision profile override which is explained here

Enabled section

This section is for enabling/disabling vision profiles

In order to enable/disable profiles add an entry to the enabled section in the format profile:enabled (true/false)

Note: Any profiles not listed in master.cf are enabled

Clone this wiki locally