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)
Create a boolean property.
|
VideoProperty |
createIntegerProperty(java.lang.String name,
int minimum,
int maximum,
int step,
int defaultValue,
int value)
Create an integer property.
|
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)
Create a string property.
|
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.
|
void |
SetEnumPropertyChoices(VideoProperty property,
java.lang.String[] choices)
Deprecated.
Use
setEnumPropertyChoices instead. |
close, enumerateProperties, enumerateSinks, enumerateSources, enumerateVideoModes, equals, free, getActualDataRate, getActualFPS, 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)
Only 8-bit single-channel or 3-channel (with BGR channel order) images are supported. If the format, depth or channel order is different, use Mat.convertTo() and/or cvtColor() to convert it first.
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)
name
- Property nameminimum
- Minimum valuemaximum
- Maximum valuestep
- Step valuedefaultValue
- Default valuevalue
- Current valuepublic VideoProperty createBooleanProperty(java.lang.String name, boolean defaultValue, boolean value)
name
- Property namedefaultValue
- Default valuevalue
- Current valuepublic VideoProperty createStringProperty(java.lang.String name, java.lang.String value)
name
- Property namevalue
- Current valuepublic void setEnumPropertyChoices(VideoProperty property, java.lang.String[] choices)
property
- Propertychoices
- Choices@Deprecated public void SetEnumPropertyChoices(VideoProperty property, java.lang.String[] choices)
setEnumPropertyChoices
instead.property
- Propertychoices
- Choices