Package edu.wpi.grip.core.sources
Class JavaCvSink
- java.lang.Object
-
- edu.wpi.cscore.VideoSink
-
- edu.wpi.cscore.ImageSink
-
- edu.wpi.grip.core.sources.JavaCvSink
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class JavaCvSink extends edu.wpi.cscore.ImageSink
-
-
Constructor Summary
Constructors Constructor Description JavaCvSink(java.lang.String name)
Create a sink for accepting OpenCV images.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
long
grabFrame(org.bytedeco.javacpp.opencv_core.Mat image)
Wait for the next frame and get the image.long
grabFrame(org.bytedeco.javacpp.opencv_core.Mat image, double timeout)
Wait for the next frame and get the image.
-
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Overrides:
close
in classedu.wpi.cscore.VideoSink
-
grabFrame
public long grabFrame(org.bytedeco.javacpp.opencv_core.Mat image)
Wait for the next frame and get the image. Times out (returning 0) after 0.225 seconds. The provided image will have three 3-bit channels stored in BGR order.- Returns:
- Frame time, or 0 on error (call GetError() to obtain the error message)
-
grabFrame
public long grabFrame(org.bytedeco.javacpp.opencv_core.Mat image, double timeout)
Wait for the next frame and get the image. Times out (returning 0) after timeout seconds. The provided image will have three 3-bit channels stored in BGR order.- Returns:
- Frame time, or 0 on error (call GetError() to obtain the error message); the frame time is in 1 us increments.
-
-