Package edu.wpi.first.cscore
Class ImageSink
java.lang.Object
edu.wpi.first.cscore.VideoSink
edu.wpi.first.cscore.ImageSink
- All Implemented Interfaces:
AutoCloseable
public abstract class ImageSink extends VideoSink
A base class for single image reading sinks.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protected
ImageSink(int handle)
Constructs an ImageSink. -
Method Summary
Modifier and Type Method Description String
getError()
Get error string.void
setDescription(String description)
Set sink description.void
setEnabled(boolean enabled)
Enable or disable getting new frames.Methods inherited from class edu.wpi.first.cscore.VideoSink
close, enumerateProperties, enumerateSinks, equals, getConfigJson, getDescription, getHandle, getKind, getKindFromInt, getName, getProperty, getSource, getSourceProperty, hashCode, isValid, setConfigJson, setSource
-
Constructor Details
-
ImageSink
Constructs an ImageSink.- Parameters:
handle
- The image sink handle.
-
-
Method Details
-
setDescription
Set sink description.- Parameters:
description
- Description
-
getError
Get error string. Call this if WaitForFrame() returns 0 to determine what the error is.- Returns:
- Error string.
-
setEnabled
Enable or disable getting new frames. Disabling will cause processFrame (for callback-based CvSinks) to not be called and WaitForFrame() to not return. This can be used to save processor resources when frames are not needed.- Parameters:
enabled
- Enable to get new frames.
-