Package org.photonvision.jni
Class CscoreExtras
java.lang.Object
org.photonvision.jni.CscoreExtras
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic TimestampSource
getTimestampSource
(RawFrame frame) static long
grabRawSinkFrameTimeoutLastTime
(int sink, long framePtr, double timeout, long lastFrameTime) Fill with the latest image from the source this sink is connected to.static long
wrapRawFrame
(long rawFramePtr) Wrap the data owned by a RawFrame in a cv::Mat
-
Constructor Details
-
CscoreExtras
public CscoreExtras()
-
-
Method Details
-
grabRawSinkFrameTimeoutLastTime
public static long grabRawSinkFrameTimeoutLastTime(int sink, long framePtr, double timeout, long lastFrameTime) Fill with the latest image from the source this sink is connected to.If lastFrameTime is provided and non-zero, the sink will fill image with the first frame from the source that is not equal to lastFrameTime. If lastFrameTime is zero, the time of the current frame owned by the CvSource is used, and this function will block until the connected CvSource provides a new frame.
- Parameters:
sink
- Sink handle.framePtr
- Pointer to a wpi::RawFrame.timeout
- Timeout in seconds.lastFrameTime
- Timestamp of the last frame - used to compare new frames against.- Returns:
- Frame time, in uS, of the incoming frame.
-
wrapRawFrame
public static long wrapRawFrame(long rawFramePtr) Wrap the data owned by a RawFrame in a cv::Mat- Parameters:
rawFramePtr
-- Returns:
- pointer to a cv::Mat
-
getTimestampSource
-