OpenCV for Unity
2.6.2
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.10.0/index.html ) for the details of the argument of the method.
|
MultiSource 2 mat helper. v 1.0.0 More...
Public Member Functions | |
virtual MultiSource2MatHelperClassName | GetCurrentSource2MatHelperClassName () |
virtual void | Initialize (bool autoPlay=true) |
Initialize this instance. More... | |
virtual bool | IsInitialized () |
Indicate whether this instance has been initialized. More... | |
virtual void | Play () |
Start the source device. More... | |
virtual void | Pause () |
Pause the source device. More... | |
virtual void | Stop () |
Stop the source device. More... | |
virtual bool | IsPlaying () |
Indicate whether the source device is currently playing. More... | |
virtual bool | IsPaused () |
Indicate whether the device is paused. More... | |
virtual string | GetDeviceName () |
Return the source device name. More... | |
virtual int | GetWidth () |
Return the source width. More... | |
virtual int | GetHeight () |
Return the source height. More... | |
virtual Source2MatHelperColorFormat | GetBaseColorFormat () |
Return the source base color format. More... | |
virtual bool | DidUpdateThisFrame () |
Indicate whether the source buffer of the frame has been updated. More... | |
virtual Mat | GetMat () |
Get the mat of the current frame. The Mat object's type is 'CV_8UC4' or 'CV_8UC3' or 'CV_8UC1' (ColorFormat is determined by the outputColorFormat setting). Please do not dispose of the returned mat as it will be reused. More... | |
virtual void | Dispose () |
Protected Member Functions | |
virtual void | OnValidate () |
virtual MultiSource2MatHelperClassCategory | ClassNameToClassCategory (MultiSource2MatHelperClassName className) |
Protected Attributes | |
ISource2MatHelper | _source2MatHelper |
MultiSource2MatHelperClassName | _requestedSource2MatHelperClassName = MultiSource2MatHelperClassName.WebCamTexture2MatHelper |
Select the source to mat helper class name. If CustomSource2MatHelper is selected, only the UnityEvent inspector is overridden for the custom helper class component. More... | |
MultiSource2MatHelperClassName | _currentSource2MatHelperClassName = MultiSource2MatHelperClassName.WebCamTexture2MatHelper |
MultiSource2MatHelperClassCategory | _currentSource2MatHelperClassCategory = MultiSource2MatHelperClassCategory.Camera |
string | _requestedDeviceName = null |
Set the name of the camera device to use. (or device index number) More... | |
int | _requestedWidth = 640 |
Set the width of camera. More... | |
int | _requestedHeight = 480 |
Set the height of camera. More... | |
bool | _requestedIsFrontFacing = false |
Set whether to use the front facing camera. More... | |
float | _requestedFPS = 30f |
Set the frame rate of camera. More... | |
string | _requestedVideoFilePath = string.Empty |
Set the video file path, relative to the starting point of the "StreamingAssets" folder, or absolute path. More... | |
bool | _loop = true |
Indicate whether to play this video in a loop. More... | |
string | _requestedImageFilePath = string.Empty |
Set the image file path, relative to the starting point of the "StreamingAssets" folder, or absolute path. More... | |
bool | _repeat = true |
Indicate whether to play this image in a repeat. More... | |
Component | _customClassComponent = null |
Set the custom class <ISource2MatHelper> component. More... | |
Source2MatHelperColorFormat | _outputColorFormat = Source2MatHelperColorFormat.RGBA |
Select the output color format. More... | |
int | _timeoutFrameCount = 1500 |
The number of frames before the initialization process times out. More... | |
UnityEvent | _onInitialized |
UnityEvent that is triggered when this instance is initialized. More... | |
UnityEvent | _onDisposed |
UnityEvent that is triggered when this instance is disposed. More... | |
Source2MatHelperErrorUnityEvent | _onErrorOccurred |
UnityEvent that is triggered when this instance is error Occurred. More... | |
Properties | |
ISource2MatHelper | source2MatHelper [get] |
MultiSource2MatHelperClassName | requestedSource2MatHelperClassName [get, set] |
virtual int | requestedWidth [get, set] |
virtual int | requestedHeight [get, set] |
virtual bool | requestedIsFrontFacing [get, set] |
virtual float | requestedFPS [get, set] |
virtual string | requestedVideoFilePath [get, set] |
virtual bool | loop [get, set] |
virtual string | requestedImageFilePath [get, set] |
virtual bool | repeat [get, set] |
virtual Source2MatHelperColorFormat | outputColorFormat [get, set] |
virtual int | timeoutFrameCount [get, set] |
UnityEvent | onInitialized [get, set] |
UnityEvent | onDisposed [get, set] |
Source2MatHelperErrorUnityEvent | onErrorOccurred [get, set] |
![]() | |
Source2MatHelperColorFormat | outputColorFormat [get, set] |
int | timeoutFrameCount [get, set] |
UnityEvent | onInitialized [get, set] |
UnityEvent | onDisposed [get, set] |
Source2MatHelperErrorUnityEvent | onErrorOccurred [get, set] |
MultiSource 2 mat helper. v 1.0.0
|
protectedvirtual |
|
virtual |
Indicate whether the source buffer of the frame has been updated.
true
, if the source buffer has been updated false
otherwise.Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
|
virtual |
Return the source base color format.
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
|
virtual |
Return the source device name.
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Return the source height.
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Get the mat of the current frame. The Mat object's type is 'CV_8UC4' or 'CV_8UC3' or 'CV_8UC1' (ColorFormat is determined by the outputColorFormat setting). Please do not dispose of the returned mat as it will be reused.
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Return the source width.
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Initialize this instance.
autoPlay | If set to true play after completion of initialization. |
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Indicate whether this instance has been initialized.
true
, if this instance has been initialized, false
otherwise.Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Indicate whether the device is paused.
true
, if the device is paused, false
otherwise.Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Indicate whether the source device is currently playing.
true
, if the source device is playing, false
otherwise.Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
protectedvirtual |
|
virtual |
Pause the source device.
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Start the source device.
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Stop the source device.
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
protected |
|
protected |
|
protected |
Set the custom class <ISource2MatHelper> component.
|
protected |
Indicate whether to play this video in a loop.
|
protected |
UnityEvent that is triggered when this instance is disposed.
|
protected |
UnityEvent that is triggered when this instance is error Occurred.
|
protected |
UnityEvent that is triggered when this instance is initialized.
|
protected |
Select the output color format.
|
protected |
Indicate whether to play this image in a repeat.
|
protected |
Set the name of the camera device to use. (or device index number)
|
protected |
Set the frame rate of camera.
|
protected |
Set the height of camera.
|
protected |
Set the image file path, relative to the starting point of the "StreamingAssets" folder, or absolute path.
|
protected |
Set whether to use the front facing camera.
|
protected |
Select the source to mat helper class name. If CustomSource2MatHelper is selected, only the UnityEvent inspector is overridden for the custom helper class component.
|
protected |
Set the video file path, relative to the starting point of the "StreamingAssets" folder, or absolute path.
|
protected |
Set the width of camera.
|
protected |
|
protected |
The number of frames before the initialization process times out.
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
get |
|
getset |