Class Pixy2CCC


  • public class Pixy2CCC
    extends java.lang.Object
    Java Port of Pixy2 Arduino Library Defines Color Connected Components tracker for Pixy2 https://github.com/PseudoResonance/Pixy2JavaAPI
    • Constructor Detail

      • Pixy2CCC

        protected Pixy2CCC​(Pixy2 pixy)
        Constructs Pixy2 Color Connected Components tracker
        Parameters:
        pixy - Pixy2 instance
    • Method Detail

      • getBlocks

        public int getBlocks()

        Gets signature Pixy2CCC.Blocks from Pixy2

        Defaults to waiting for a response, getting blocks from all signatures and a maximum of all 256 blocks

        Returned data should be retrieved from the cache with getBlockCache()

        Returns:
        Pixy2 error code
      • getBlocks

        public int getBlocks​(boolean wait)

        Gets signature Pixy2CCC.Blocks from Pixy2

        Defaults to getting blocks from all signatures and a maximum of all 256 blocks

        Returned data should be retrieved from the cache with getBlockCache()

        Parameters:
        wait - Whether to wait for Pixy2 if data is not available
        Returns:
        Pixy2 error code
      • getBlocks

        public int getBlocks​(boolean wait,
                             int sigmap)

        Gets signature Pixy2CCC.Blocks from Pixy2

        Defaults to getting a maximum of all 256 blocks

        Returned data should be retrieved from the cache with getBlockCache()

        Parameters:
        wait - Whether to wait for Pixy2 if data is not available
        sigmap - Sigmap to look for
        Returns:
        Pixy2 error code
      • getBlocks

        public int getBlocks​(boolean wait,
                             int sigmap,
                             int maxBlocks)

        Gets signature Pixy2CCC.Blocks from Pixy2

        Returned data should be retrieved from the cache with getBlockCache()

        Parameters:
        wait - Whether to wait for Pixy2 if data is not available
        sigmap - Sigmap to look for
        maxBlocks - Maximum blocks to look for
        Returns:
        Pixy2 error code
      • getBlockCache

        public java.util.ArrayList<Pixy2CCC.Block> getBlockCache()

        Gets ArrayList of signature blocks from cache

        getBlocks(boolean, int, int) must be executed first to get the data actual from Pixy2

        Returns:
        Pixy2 signature Blocks