<< return to Pixycam.com

User Tools

Site Tools


wiki:v2:pantilt_demo_pane

Pan/tilt Demo Tab

This tab contains parameters to adjust parameters associated with the pan/tilt demo, such as the PID gains for each axis. To bring up the Pan/tilt Demo Tab, first bring up the Configure Dialog (click on the gear icon or select File➜Configure). Now select the Pan/Tilt Demo tab under Pixy Parameters.

  • Pan P gain: This parameter adjusts the proportional gain for the pan axis (servo 0).
  • Pan D gain: This parameter adjusts the derivative gain for the pan axis (servo 0).
  • Tilt P gain: This parameter adjusts the proportional gain for the tilt axis (servo 1).
  • Tilt D gain: This parameter adjusts the derivative gain for the tilt axis (servo 1).
  • Signature 1-7 range: These sliders are used to adjust the inclusiveness of the color signatures. See the full explanation below under “Signature tuning.”
  • 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 this setting higher to reduce the false positives. If you are not able to detect objects that are sufficiently dark, you can adjust this setting lower to reduce the false negatives.
  • 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.

Some useful notes:

  • The default values work well with the Pixy pan/tilt mechanism, but you are welcome to tweak to get more performance or use a homemade pan/tilt mechanism, which will surely mean you'll need to play around and find good gain values.
  • The proportional gain will control the speed of the servos. If your servos aren't moving fast enough, try increasing the proportional gain.
  • The derivative gain will help ensure that you don't overshoot or oscillate. If your servos are oscillating, try increasing the derivative gain. If increasing the derivative gain doesn't reduce oscillations, try reducing the proportional gain and reset the derivative gain to 0, then try increasing the derivative gain again.
  • The gain parameters can be set to negative values, which may be necessary if your servos need to move in the opposite direction (assuming you're using your own pan/tilt mechanism).
  • The RC-servo port pinouts, as well as which port is which can be found here.

Signature tuning

Signature range tuning is probably the most effective method to improve detection accuracy. Bring 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 Configuration Dialog).

Tuning

Use the slider for Signature 1 range to adjust the inclusiveness of signature 1 (assuming it's signature 1 you're wanting to adjust). Slide it to the left if you want to be less inclusive (i.e. you're seeing false positives, like the picture below):

or slide it to the right if you want to be more inclusive (i.e. you're seeing false negatives) or the detection is intermittent or sparse (like in the picture below):

Choose a slider value that provides good strong detection like the picture below:

You can adjust all seven color signatures this way to maximize detection accuracy. Be sure to press Apply or OK to save the slider ranges! The adjusted values won't be saved if you press Cancel or dismiss the dialog.

2018/04/09 21:52 · jfrench
wiki/v2/pantilt_demo_pane.txt · Last modified: 2021/05/18 00:16 by jfrench