public class CvSource extends VideoSource
VideoSource.Kind
m_handle
Constructor and Description |
---|
CvSource(java.lang.String name,
VideoMode.PixelFormat pixelFormat,
int width,
int height,
int fps)
Create an OpenCV source.
|
CvSource(java.lang.String name,
VideoMode mode)
Create an OpenCV source.
|
Modifier and Type | Method and Description |
---|---|
VideoProperty |
createBooleanProperty(java.lang.String name,
boolean defaultValue,
boolean value) |
VideoProperty |
createIntegerProperty(java.lang.String name,
int minimum,
int maximum,
int step,
int defaultValue,
int value) |
VideoProperty |
createProperty(java.lang.String name,
VideoProperty.Kind kind,
int minimum,
int maximum,
int step,
int defaultValue,
int value)
Create a property.
|
VideoProperty |
createStringProperty(java.lang.String name,
java.lang.String value) |
void |
notifyError(java.lang.String msg)
Signal sinks that an error has occurred.
|
void |
putFrame(Mat image)
Put an OpenCV image and notify sinks.
|
void |
setConnected(boolean connected)
Set source connection status.
|
void |
setDescription(java.lang.String description)
Set source description.
|
void |
SetEnumPropertyChoices(VideoProperty property,
java.lang.String[] choices)
Configure enum property choices.
|
enumerateProperties, enumerateSinks, enumerateSources, enumerateVideoModes, equals, free, getDescription, getHandle, getKind, getKindFromInt, getLastFrameTime, getName, getProperty, getVideoMode, hashCode, isConnected, isValid, setFPS, setPixelFormat, setResolution, setVideoMode, setVideoMode
public CvSource(java.lang.String name, VideoMode mode)
name
- Source name (arbitrary unique identifier)mode
- Video mode being generatedpublic CvSource(java.lang.String name, VideoMode.PixelFormat pixelFormat, int width, int height, int fps)
name
- Source name (arbitrary unique identifier)pixelFormat
- Pixel formatwidth
- widthheight
- heightfps
- fpspublic void putFrame(Mat image)
image
- OpenCV imagepublic void notifyError(java.lang.String msg)
public void setConnected(boolean connected)
connected
- True for connected, false for disconnectedpublic void setDescription(java.lang.String description)
description
- Descriptionpublic VideoProperty createProperty(java.lang.String name, VideoProperty.Kind kind, int minimum, int maximum, int step, int defaultValue, int value)
name
- Property namekind
- Property kindminimum
- Minimum valuemaximum
- Maximum valuestep
- Step valuedefaultValue
- Default valuevalue
- Current valuepublic VideoProperty createIntegerProperty(java.lang.String name, int minimum, int maximum, int step, int defaultValue, int value)
public VideoProperty createBooleanProperty(java.lang.String name, boolean defaultValue, boolean value)
public VideoProperty createStringProperty(java.lang.String name, java.lang.String value)
public void SetEnumPropertyChoices(VideoProperty property, java.lang.String[] choices)
property
- Propertychoices
- Choices