Table of Contents

Color connected components program

This program is a hue-based object detection algorithm. More information about the CCC program can be found here.

Color connected components Action menu

This menu contains all of the actions available for the color connected components program, which mostly has to do with setting color signatures. To bring up this menu, you must be running the color_connected_components program by selecting it in the Program menu, and then clicking on the Action menu in the menubar.

  • Run/Stop: This is the same as pressing the Run/Stop button in the main window of PixyMon. Selecting this stops the program that's currently running. This is useful when grabbing a frame or typing commands into the console. Select this again to resume video.
  • Set signature: Selecting one of these will allow you to set the signature by selecting your object in the video window with a mouse-select. There is more information here.
  • Set CC signature: Selecting one of these will allow you to set a color code signature by selecting your object in the video window with a mouse-select. There is more information here.
  • Clear all signatures: Selecting this will clear all color signatures.
  • Toggle lamp: Selecting this will turn Pixy2's lamp on or off.
2018/06/06 19:50 · pixycam

Color connected components View menu

This menu contains the different views available in PixyMon for the color connected components program. To bring up this menu, you must be running the color_connected_components program by selecting it in the Program menu, and then clicking on the View menu in the menubar.

  • Blocks: This view shows a black background with the detected objects shown as rectangles with the signature color. Color coded objects are shown as gray. This view is minimal in its representation of what Pixy2 is detecting and has the advantage that it doesn't slow Pixy2's image processing down much. This view usually allows Pixy2 to process frames at the full 60 frames-per-second. PixyMon will usually display at 60 frames-per-second as well with this view.
  • Blocks, video: This view shows raw video as the background layer with the detected objects shown as rectangles. This view will slow Pixy2's image processing, usually down to 30 frames-per-second, because the image data takes time to send over USB.
  • Blocks, video, detected pixels: This view shows raw video as the background layer with the detected objects shown as rectangles. The individual detected pixels are also shown in a different layer. The pixels are the color of the detected signature. This view requires the most data to be sent over USB and will slow down Pixy2's image processing significantly. It's useful for tuning the signatures or when teaching color code signatures.
2018/06/07 14:11 · pixycam

Color connected components Tuning tab

This tab contains all of the most effective parameters for “tuning” the accuracy of color signatures. To bring up this tab, you must be running the color_connected_components 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.)

  • Signature ranges: Signature range tuning is probably the most effective method to improve detection accuracy. Each color signature (1 through 7) has a slider to adjust the inclusiveness of the corresponding signature. Slide the slider to the left if you want the signature to be less inclusive (you're seeing false positives) or slide it to the right if you want the signature to be more inclusive (you're getting false negatives.) There is more information here.
  • Min brightness: sets a minimum brightness setting for all signatures. That is, if a pixel is below the minimum brightness setting, it won't be considered as part of any color signature. So if you are seeing false positives that are sufficiently dark, you can adjust the Min brightness setting higher to reduce the false positives. If you are not able to detect objects that are sufficiently dark, you can adjust the Min brightness setting lower to reduce the false negatives
2018/06/06 02:09 · pixycam
  • 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.
2018/06/05 19:43 · pixycam
2018/06/05 16:55 · pixycam

Color connected components Expert tab

This tab contains more advanced parameters for adjusting various color connected components things. To bring up this tab, you must be running the color_connected_components 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.

  • Block filtering: Increasing this parameter increases the amount of filtering Pixy2 applies to the detection of each block. Increasing this parameter can reduce the false positive detections, but will also increase the amount of time it takes between the object appearing in the frame and it being reported by Pixy2.
  • Max tracking velocity: This parameter sets the maximum distance a detected object can travel between frames. In other words, objects that exceed this velocity will be considered invalid. Decreasing this parameter can reduce the false positive detections, especially if you don't expect your detected objects to move very much from frame to frame. The value is specified in pixels per frame period (16.7 milliseconds).
  • Max blocks: This parameter sets maximum total number of blocks (objects) Pixy2 will report per frame. For example, if you set this parameter to 2, Pixy2 will report a maximum of 2 objects (the 2 largest objects) regardless of which signature the blocks belong to, and all other detected objects will not be reported.
  • Max blocks per signature: This parameter sets the maximum number of blocks (objects) Pixy2 will report per signature, per frame. For example, if you set this parameter to 2, Pixy2 will report a maximum of 2 objects for each signature (the largest objects in the frame) and all other detected objects with that signature will not be reported.
  • Max merge dist: Pixy2 will combine objects that have the same signature and are sufficiently close together in the frame. This parameter adjusts this distance. Increasing this parameter will result in Pixy2 merging more detected blocks together into a single block.
  • * Min block area: sets the minimum area of reported blocks. If a detected block has a smaller area, it will not be reported. For this purpose, area of a block is calculated as width * height.
  • LED brightness: sets the brightness of Pixy2's RGB LED. Pixy2's LED is quite bright if you want it to be (too bright to look at!)
  • Signature teach threshold: This parameter applies when you are teaching Pixy2 a signature using the button-push method. It allows you to adjust how inclusive Pixy2 is when determining which pixels are part of the object you are trying to teach it. You can find more information here.
  • Color code mode: This parameter sets the behavior of color codes, including enabling/disabling. Options include:
    • Enabled: Color codes are enabled, normal mode.
    • Disabled: Color codes are disabled.
    • Color codes only: Only color codes are reported. Objects that match non-color-code signatures will not be reported.
    • Mixed: This is the same as normal color code mode, but Pixy2 will also report color-code signatures that aren't part of color codes. (Normally, Pixy2 only reports color-code signatures that are part of color codes – 2 or more color-code signatures that are close together.)
  • 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.
2018/06/05 18:56 · pixycam
2018/06/06 17:04 · pixycam
2018/06/05 17:55 · pixycam

Signature Labels tab

The Signature Labels tab allows you to label objects that are detected by Pixy2. To bring up this tab, you must be running the color_connected_components 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 Signature Labels tab under Pixy Parameters.

Note that the signature labels are stored on Pixy2. So if you set some signature labels and then plug your Pixy into another computer running PixyMon, the labels will be there.

To label a signature, simply type in the label and click on Apply or OK.

Detected objects that match this signature will then be labeled in PixyMon.

Labeling color codes

Labeling color coded objects requires typing commands into the console, since there are thousands of possible color codes. You can bring up the console by selecting Console in the View menu. Start by pressing the stop button.

794fa13dc2ceb82b255e2d509995a5d4eecd392d.jpg

Then type in the command cc_setLabel followed by the color code number (in octal) followed by the label. Note, if you want spaces in your label, use underscores instead. And don't forget to hit return!

Your label will then show up in the Signature Labels Tab as you'd expect, and any objects that match your color code will be labeled with the label you specified. (yay!)

2018/06/05 20:07 · pixycam