Class Pixy2Video


  • public class Pixy2Video
    extends java.lang.Object
    Java Port of Pixy2 Arduino Library Defines video getter for Pixy2 https://github.com/PseudoResonance/Pixy2JavaAPI
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Pixy2Video.RGB  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Pixy2Video​(Pixy2 pixy)
      Constructs Pixy2 video getter
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getRGB​(int x, int y, Pixy2Video.RGB rgb)
      Gets average RGB value at 5x5 area around specified coordinates in the image
      int getRGB​(int x, int y, Pixy2Video.RGB rgb, boolean saturate)
      Gets average RGB value at 5x5 area around specified coordinates in the image
      • Methods inherited from class java.lang.Object

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

    • Constructor Detail

      • Pixy2Video

        protected Pixy2Video​(Pixy2 pixy)
        Constructs Pixy2 video getter
        Parameters:
        pixy - Pixy2 instance
    • Method Detail

      • getRGB

        public int getRGB​(int x,
                          int y,
                          Pixy2Video.RGB rgb)
        Gets average RGB value at 5x5 area around specified coordinates in the image

        Defaults to saturating response color

        Parameters:
        x - X value
        y - Y value
        rgb - RGB container to return values in
        Returns:
        Pixy2 error code
      • getRGB

        public int getRGB​(int x,
                          int y,
                          Pixy2Video.RGB rgb,
                          boolean saturate)
        Gets average RGB value at 5x5 area around specified coordinates in the image
        Parameters:
        x - X value
        y - Y value
        rgb - RGB container to return values in
        saturate - Whether or not to scale all RGB values to maximize the greatest value at 255
        Returns:
        Pixy2 error code