Skip to content

Configuration

Finlay edited this page Feb 27, 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 lines starting with 2 spaces that end with a colon are treated as subentries every line after that starts with 4 spaces will be considered part of that profile and subentry until another one is defined. Inside each profile, variables are in the format of name=data.

Parameters

These parameters are sorted by subentry name

core

  • type The type of device to read the image from (usb,image,video)
  • identifier The identifier for the device to be read from (usb device number for usb, file path for image, and video)
  • 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)
  • csvLog The path to log CSV data to (ex: logs/profile$1.csv. Also note that $1 in this will be replaced with the run id and note that if the parent folder does not exist csv logging will be disabled)
  • interface The output interface to send data out to (networktables is currently the only option)
  • pipeline The pipeline to use to process the images (blobdetect,facedetect,dummy)
  • preprocessors The pre processor(s) to apply to the images (resize,crop. Note that they are applied in order)
  • maths The math processor(s) to apply to the output targets (angleoffset,distance,group,prefferedtarget. Note that they are applied in order)

blobdetect

  • 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
  • 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)
  • minArea The minimum percentage of the image (in decimal) that any object needs to be in order to be recognized

facedetect

  • minFaceSize The minimum percentage of the image that the face can take up (0-1)

prefferedtarget

  • 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)

distance

  • 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

angleoffset

The angle offset module uses quadratics to calculate the distance offset to objects based on angle and area

  • aoA The A value in the quadratic equation
  • aoB The B value in the quadratic equation
  • aoC The C value in the quadratic equation

resize

  • width The width to resize the input image to
  • height The height to resize the input image to

crop

  • cX1 The X value of the first corner of the area of the image to keep (0-1)
  • cY1 The Y value of the first corner of the area of the image to keep (0-1)
  • cX2 The X value of the other corner of the area of the image to keep (0-1)
  • cY2 The Y value of the other corner of the area of the image to keep (0-1)

group

  • 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)

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
  • logFile The file to save error logs to (ex: logs/log$1.log. Note: $1 will be dynamically replaced with the run id)

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 by default

Clone this wiki locally