Package edu.wpi.first.cscore
Class CameraServerCvJNI
java.lang.Object
edu.wpi.first.cscore.CameraServerCvJNI
public class CameraServerCvJNI extends Object
CameraServer CV JNI.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CameraServerCvJNI.Helper
Sets whether JNI should be loaded in the static block. -
Method Summary
Modifier and Type Method Description static int
createCvSink(String name, int pixelFormat)
Creates a CV sink.static int
createCvSource(String name, int pixelFormat, int width, int height, int fps)
Creates a CV source.static void
forceLoad()
Force load the library.static long
grabSinkFrame(int sink, long imageNativeObj)
Returns sink frame handle.static long
grabSinkFrameTimeout(int sink, long imageNativeObj, double timeout)
Returns sink frame timeout in microseconds.static void
putSourceFrame(int source, long imageNativeObj)
Put source frame.
-
Method Details
-
forceLoad
Force load the library.- Throws:
IOException
- if library load failed
-
createCvSource
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
Put source frame.- Parameters:
source
- Source handle.imageNativeObj
- Image native object handle.
-
createCvSink
Creates a CV sink.- Parameters:
name
- Name.pixelFormat
- OpenCV pixel format.- Returns:
- CV sink handle.
-
grabSinkFrame
Returns sink frame handle.- Parameters:
sink
- Sink handle.imageNativeObj
- Image native object handle.- Returns:
- Sink frame handle.
-
grabSinkFrameTimeout
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.
-