Class CameraServerCvJNI

java.lang.Object
edu.wpi.first.cscore.CameraServerCvJNI

public class CameraServerCvJNI
extends Object
CameraServer CV JNI.
  • Method Details

    • forceLoad

      public static void forceLoad() throws IOException
      Force load the library.
      Throws:
      IOException - if library load failed
    • createCvSource

      public static int createCvSource​(String name, int pixelFormat, int width, int height, int fps)
      Creates a CV source.
      Parameters:
      name - Name.
      pixelFormat - OpenCV pixel format.
      width - Image width.
      height - Image height.
      fps - Frames per second.
      Returns:
      CV source.
    • putSourceFrame

      public static void putSourceFrame​(int source, long imageNativeObj)
      Put source frame.
      Parameters:
      source - Source handle.
      imageNativeObj - Image native object handle.
    • createCvSink

      public static int createCvSink​(String name, int pixelFormat)
      Creates a CV sink.
      Parameters:
      name - Name.
      pixelFormat - OpenCV pixel format.
      Returns:
      CV sink handle.
    • grabSinkFrame

      public static long grabSinkFrame​(int sink, long imageNativeObj)
      Returns sink frame handle.
      Parameters:
      sink - Sink handle.
      imageNativeObj - Image native object handle.
      Returns:
      Sink frame handle.
    • grabSinkFrameTimeout

      public static long grabSinkFrameTimeout​(int sink, long imageNativeObj, double timeout)
      Returns sink frame timeout in microseconds.
      Parameters:
      sink - Sink handle.
      imageNativeObj - Image native object handle.
      timeout - Timeout in seconds.
      Returns:
      Sink frame timeout in microseconds.