Class ColorMatchResult

  • public class ColorMatchResult
    extends java.lang.Object
    • Field Summary

      Modifier and Type Field Description
      edu.wpi.first.wpilibj.util.Color color  
      double confidence  
    • Constructor Summary

      Constructor Description
      ColorMatchResult​(edu.wpi.first.wpilibj.util.Color color, double confidence)
      Construct a color match result object.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • color

        public final edu.wpi.first.wpilibj.util.Color color
      • confidence

        public final double confidence
    • Constructor Detail

      • ColorMatchResult

        public ColorMatchResult​(edu.wpi.first.wpilibj.util.Color color,
                                double confidence)
        Construct a color match result object. This object stores color which is a copy of the stored value registered to the ColorMatch object, and a confidence.

        The condifence is simply 1 - euclidian distance

        color - copy of matched color from ColorMatch object
        confidence - confidence number for the measurement. This is the 1 - euclidean distance of the two color vectors