Line tracking Tuning tab
This tab contains all of the most effective parameters for “tuning” the accuracy of the line tracking algorithm. To bring up this tab, you must be running the line_tracking program by selecting it in the Program menu, and then bringing up the Configure Dialog (click on the gear icon or select File➜Configure). Now select the Tuning tab under Pixy Parameters (it should be the first pane you see when you bring up the Configure Dialog.)
Edge threshold: Adjusting this parameter determines how inclusive the line detection algorithm is. If the edge threshold is decreased, more potential lines will be detected. If it's increased, less potential lines will be detected. If Pixy2 isn't detecting the lines you want it to detect, this is likely the parameter that needs to be adjusted.
Maximum line width: This adjusts the maximum width of the detected lines (in pixels.) Lines that are wider will not be detected.
Minimum line width: This adjusts the minimum width of the detected lines (in pixels.) Lines that are narrower will not be detected.
White line: Enabling this parameter will change Pixy2's line detection algorithm from dark lines on a light background to light lines on a dark background.
Camera brightness: This parameter is in all Tuning tabs regardless of the program that's being run. It sets the exposure setting of Pixy, which controls the brightness of the image. The Camera Brightness setting is important because the correct exposure setting will lead to the best detection accuracy.
Line tracking Expert tab
This tab contains more advanced parameters for adjusting various line tracking things. To bring up this tab, you must be running the line_tracking program by selecting it in the Program menu, and then bringing up the Configure Dialog (click on the gear icon or select File➜Configure). Now select the Expert tab under Pixy Parameters.
Warning! These are “expert” parameters. Some are used for testing/debugging and furthermore may cause the line tracking algorithm to act strangely for some values. No smoke will pour out of your Pixy2 (that's good) but exercising a little caution is advised!
Edge distance: This parameter adjusts the distance (in pixels) between the edge detector. Increasing this value will help detect edges that are less distinct (fuzzier), but increasing will affect the barcode detection and decoding – that is, it will increase the minimum barcode size.
Line extraction distance: This parameter is used for testing/debugging and currently has no effect.
Maximum line compare: This parameter can be thought of as maximum line velocity parameter for tracking lines between frames. For example, if a line moves from one side of the frame to the other side of the frame in one frame period (i.e. improbably large line velocity), it's probably not the same line, so this parameter is a sanity check for the tracking algorithm. Decreasing this value tells the algorithm to be more restrictive regarding the line velocity. Increasing the value tells the algorithm to be less restrictive regarding line velocity.
Maximum merge distance: This parameter determines how far the line tracking algorithm searches for nearby lines that might form an intersection. If the lines you are trying to track are wider, you should increase this parameter until the intersections formed with the wider lines are accurately detected.
Minimum line length: This tells the algorithm to throw out lines shorter than this parameter.
Line filtering: Increasing this parameter leads to more filtering and can result in less false positive line detections, but with some added latency regarding when new lines are reported.
Intersection filtering: Increasing this parameter leads to more filtering and can result in less false positive intersection detections, but with some added latency regarding when new intersections are reported.
Barcode filtering: Increasing this parameter leads to more filtering and can result in less false positive barcode detections, but with some added latency regarding when new barcodes are reported.
Default turn angle: This parameter sets the path the algorithm takes when encountering an intersection. The algorithm will pick the path that is
closest to the specified angle. Turn angles are specified in degrees, with 0 being straight ahead, left being 90 and right being -90 (for example), although any valid angle value can be used. Valid angles are between -180 and 180. This parameter is usually set to 0, which essentially means “go straight at intersections (or pick the straightest path) unless I tell you otherwise.” Telling the algorithm otherwise is done through
setNextTurn() in the
API.
Delayed turn: This parameter tells the algorithm to stop choosing paths at intersections automatically. It requires the client program to indicate the path with
setNextTurn() in the
API before the intersection goes out of frame. It's an extra expert option. It's included because sometimes you might not know which way to turn at the next intersection until you actually see the intersection (the number of branches and their angles, for example.) It's also useful? fun? to set it because PixyMon will dutifully label the intersections: “3-way intersection”, “4-way intersection”, etc. because it doesn't know which way to turn yet.
Manual vector select: When the algorithm initializes, it needs to figure out which line should be the Vector, a.k.a. the line you want to follow. It will automatically choose the Vector based on some characteristics that it thinks are attractive, like a line that intersects the bottom of the frame and/or a line that is close to vertical. You can bypass this selection process by enabling this parameter. The algorithm will then set the Vector based on
setVector() calls through the
API.
Default program: This parameter shows up in all Expert tabs regardless of the program that's currently running. It sets the program that gets executed upon power-up. The available programs are listed in the pulldown menu.
Program select on power-up: This parameter shows up in all
Expert tabs regardless of the program that's currently running. Enabling this will enable the
button program selection upon power-up.
Debug: This parameter shows up in all Expert tabs regardless of the program that's currently running. It sets the debug level within Pixy2. Setting the value to 0 means that no debugging information is displayed.
Barcode Labels tab
The Barcode Labels tab allows you to label barcodes that are detected by Pixy2. To bring up this tab, you must be running the line_tracking program by selecting it in the Program menu, and then bringing up the Configure Dialog (click on the gear icon or select File➜Configure). Now select the Barcode Labels tab under Pixy Parameters.
Note that the barcode labels are stored on Pixy2. So if you set some barcode labels and then plug your Pixy2 into another computer running PixyMon, the labels will be there.
To label a barcode, simply type in the label and click on Apply or OK.
Detected barcodes that match this barcode will then be labeled in PixyMon.