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.
|
AsyncGPUReadback 2 mat helper. v 1.0.1. More...
Public Member Functions | |
virtual void | Initialize (bool autoPlay=true) |
Initializes this instance. | |
virtual void | Initialize (Texture sourceTexture, bool autoPlay=true) |
Initialize this instance. | |
virtual bool | IsInitialized () |
Indicates whether this instance has been initialized. | |
virtual void | Play () |
Starts the readback. | |
virtual void | Pause () |
Pauses the readback. | |
virtual void | Stop () |
Stops the readback. | |
virtual bool | IsPlaying () |
Indicates whether the readback is currently playing. | |
virtual bool | IsPaused () |
Indicates whether the readback is paused. | |
virtual string | GetDeviceName () |
Return the active image device name. | |
virtual int | GetWidth () |
Returns the readback buffer width. | |
virtual int | GetHeight () |
Returns the readback buffer height. | |
virtual Source2MatHelperColorFormat | GetBaseColorFormat () |
Returns the readback buffer base color format. | |
virtual Texture | GetSourceTexture () |
Returns the Source Texture. | |
virtual bool | DidUpdateThisFrame () |
Indicates whether the readback buffer of the frame has been updated. | |
virtual Mat | GetMat () |
Gets 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). | |
virtual void | Dispose () |
Releases all resource used by the AsyncGPUReadback2MatHelper object. | |
Public Member Functions inherited from OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper |
Protected Member Functions | |
virtual void | Update () |
virtual void | LateUpdate () |
virtual void | OnDestroy () |
Raises the destroy event. | |
virtual IEnumerator | _Initialize () |
Initializes this instance by coroutine. | |
virtual void | CancelInitCoroutine () |
Cancel Init Coroutine. | |
virtual void | ReleaseResources () |
To release the resources. | |
Protected Attributes | |
Texture | _sourceTexture |
Set the source texture. | |
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 | didUpdateThisFrame = false |
bool | didUpdateImageBufferInCurrentFrame = false |
Texture2D | texture |
The texture. | |
Mat | frameMat |
The frame mat. | |
Mat | baseMat |
The base mat. | |
bool | useAsyncGPUReadback |
The useAsyncGPUReadback. | |
Source2MatHelperColorFormat | baseColorFormat = Source2MatHelperColorFormat.RGBA |
The base color format. | |
bool | isInitWaiting = false |
Indicates whether this instance is waiting for initialization to complete. | |
bool | hasInitDone = false |
Indicates whether this instance has been initialized. | |
IEnumerator | initCoroutine |
The initialization coroutine. | |
bool | isPlaying = false |
Indicates whether this instance has been initialized. | |
bool | autoPlayAfterInitialize |
If set to true play after completion of initialization. | |
Properties | |
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.ITextureSource2MatHelper | |
Properties inherited from OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper |
AsyncGPUReadback 2 mat helper. v 1.0.1.
Efficiently process the conversion to Mat format for Texture classes for which the GetPixels method cannot be used, such as RenderTexture and external texture format Texture2D.
By setting outputColorFormat to RGBA processing that does not include extra color conversion is performed.
|
protectedvirtual |
Initializes this instance by coroutine.
|
protectedvirtual |
Cancel Init Coroutine.
|
virtual |
Indicates whether the readback buffer of the frame has been updated.
true
, if the readback buffer has been updated false
otherwise.Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Releases all resource used by the AsyncGPUReadback2MatHelper object.
Call Dispose when you are finished using the AsyncGPUReadback2MatHelper. The Dispose method leaves the AsyncGPUReadback2MatHelper in an unusable state. After calling Dispose, you must release all references to the AsyncGPUReadback2MatHelper so the garbage collector can reclaim the memory that the AsyncGPUReadback2MatHelper was occupying.
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Returns the readback buffer base color format.
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Return the active image device name.
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Returns the readback buffer height.
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Gets 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).
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Returns the Source Texture.
|
virtual |
Returns the readback buffer width.
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Initializes this instance.
autoPlay | If set to true play after completion of initialization. |
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Initialize this instance.
sourceTexture | Source Texture. |
autoPlay | If set to true play after completion of initialization. |
|
virtual |
Indicates whether this instance has been initialized.
true
, if this instance has been initialized, false
otherwise.Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Indicates whether the readback is paused.
true
, if the readback is playing, false
otherwise.Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Indicates whether the readback is currently playing.
true
, if the readback is playing, false
otherwise.Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
protectedvirtual |
|
protectedvirtual |
Raises the destroy event.
|
virtual |
Pauses the readback.
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Starts the readback.
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
protectedvirtual |
To release the resources.
|
virtual |
Stops the readback.
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
protectedvirtual |
|
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 |
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.
|
protected |
The base color format.
|
protected |
The base mat.
|
protected |
|
protected |
|
protected |
The frame mat.
|
protected |
Indicates whether this instance has been initialized.
|
protected |
The initialization coroutine.
|
protected |
Indicates whether this instance is waiting for initialization to complete.
|
protected |
Indicates whether this instance has been initialized.
|
protected |
The texture.
|
protected |
The useAsyncGPUReadback.
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |