Class AutoCamera

  • Direct Known Subclasses:
    USBVisionCamera

    public class AutoCamera
    extends java.lang.Object
    Automatic camera streaming.
    • Constructor Summary

      Constructors 
      Constructor Description
      AutoCamera()  
      AutoCamera​(int usb_slot)  
      AutoCamera​(java.lang.String name, int usb_slot)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      edu.wpi.cscore.VideoSource getFeed()
      Get the camera feed object
      void keepCameraAwake​(boolean enabled)
      Set the camera connection mode
      void loadJsonConfig​(java.lang.String filepath)
      Load a json file as a config
      void setResolution​(int height, int width, int fps)
      Set the camera resolution and framerate
      void showCamera​(boolean show)
      Set camera visible
      • Methods inherited from class java.lang.Object

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

      • AutoCamera

        public AutoCamera()
      • AutoCamera

        public AutoCamera​(int usb_slot)
      • AutoCamera

        public AutoCamera​(java.lang.String name,
                          int usb_slot)
    • Method Detail

      • showCamera

        public void showCamera​(boolean show)
        Set camera visible
        Parameters:
        show -
      • setResolution

        public void setResolution​(int height,
                                  int width,
                                  int fps)
        Set the camera resolution and framerate
        Parameters:
        height - Height in pixels
        width - Width in pixels
        fps - Frames per second
      • loadJsonConfig

        public void loadJsonConfig​(java.lang.String filepath)
        Load a json file as a config
        Parameters:
        filepath - Path to json file
      • keepCameraAwake

        public void keepCameraAwake​(boolean enabled)
        Set the camera connection mode
        Parameters:
        enabled - Should the camera always be streaming video?
      • getFeed

        public edu.wpi.cscore.VideoSource getFeed()
        Get the camera feed object
        Returns:
        Camera VideoSource