|
OpenCV for Unity 2.6.3
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.2. More...
Public Types | |
| enum | MultiSource2MatHelperClassName : int { WebCamTexture2MatHelper = 0 , VideoCapture2MatHelper , UnityVideoPlayer2MatHelper , Image2MatHelper , AsyncGPUReadback2MatHelper , WebCamTexture2MatAsyncGPUHelper , CustomSource2MatHelper } |
| enum | MultiSource2MatHelperClassCategory : int { Camera = 0 , Video , Image , Texture , Custom } |
Public Member Functions | |
| virtual MultiSource2MatHelperClassName | GetCurrentSource2MatHelperClassName () |
| virtual void | Initialize (bool autoPlay=true) |
| Initialize this instance. | |
| virtual bool | IsInitialized () |
| Indicate whether this instance has been initialized. | |
| virtual void | Play () |
| Start the source device. | |
| virtual void | Pause () |
| Pause the source device. | |
| virtual void | Stop () |
| Stop the source device. | |
| virtual bool | IsPlaying () |
| Indicate whether the source device is currently playing. | |
| virtual bool | IsPaused () |
| Indicate whether the device is paused. | |
| virtual string | GetDeviceName () |
| Return the source device name. | |
| virtual int | GetWidth () |
| Return the source width. | |
| virtual int | GetHeight () |
| Return the source height. | |
| virtual Source2MatHelperColorFormat | GetBaseColorFormat () |
| Return the source base color format. | |
| virtual bool | DidUpdateThisFrame () |
| Indicate whether the source buffer of the frame has been updated. | |
| 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. | |
| virtual void | Dispose () |
Public Member Functions inherited from OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper | |
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. | |
| MultiSource2MatHelperClassName | _currentSource2MatHelperClassName = MultiSource2MatHelperClassName.WebCamTexture2MatHelper |
| MultiSource2MatHelperClassCategory | _currentSource2MatHelperClassCategory = MultiSource2MatHelperClassCategory.Camera |
| string | _requestedDeviceName = null |
| Set the name of the camera device to use. (or device index number) | |
| int | _requestedWidth = 640 |
| Set the width of camera. | |
| int | _requestedHeight = 480 |
| Set the height of camera. | |
| bool | _requestedIsFrontFacing = false |
| Set whether to use the front facing camera. | |
| float | _requestedFPS = 30f |
| Set the frame rate of camera. | |
| string | _requestedVideoFilePath = string.Empty |
| Set the video file path, relative to the starting point of the "StreamingAssets" folder, or absolute path. | |
| bool | _loop = true |
| Indicate whether to play this video in a loop. | |
| string | _requestedImageFilePath = string.Empty |
| Set the image file path, relative to the starting point of the "StreamingAssets" folder, or absolute path. | |
| bool | _repeat = true |
| Indicate whether to play this image in a repeat. | |
| Texture | _sourceTexture |
| Set the source texture. | |
| Component | _customClassComponent = null |
| Set the custom class <ISource2MatHelper> component. | |
| Source2MatHelperColorFormat | _outputColorFormat = Source2MatHelperColorFormat.RGBA |
| Select the output color format. | |
| int | _timeoutFrameCount = 1500 |
| The number of frames before the initialization process times out. | |
| UnityEvent | _onInitialized |
| UnityEvent that is triggered when this instance is initialized. | |
| UnityEvent | _onDisposed |
| UnityEvent that is triggered when this instance is disposed. | |
| Source2MatHelperErrorUnityEvent | _onErrorOccurred |
| UnityEvent that is triggered when this instance is error Occurred. | |
| bool | autoPlayAfterInitialize |
| If set to true play after completion of initialization. | |
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 Texture | sourceTexture [get, set] |
| virtual Source2MatHelperColorFormat | outputColorFormat [get, set] |
| virtual int | timeoutFrameCount [get, set] |
| UnityEvent | onInitialized [get, set] |
| UnityEvent | onDisposed [get, set] |
| Source2MatHelperErrorUnityEvent | onErrorOccurred [get, set] |
Properties inherited from OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper | |
MultiSource 2 mat helper. v 1.0.2.
|
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 |
Set the source texture.
|
protected |
The number of frames before the initialization process times out.
|
protected |
If set to true play after completion of initialization.
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
get |
|
getset |
|
getset |