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.
|
Image 2 mat helper. v 1.0.1. More...
Public Member Functions | |
virtual void | Initialize (bool autoPlay=true) |
Initialize this instance. | |
virtual void | Initialize (string requestedImageFilePath, bool autoPlay=true) |
Initialize this instance. | |
virtual bool | IsInitialized () |
Indicate whether this instance has been initialized. | |
virtual void | Play () |
Start the image. | |
virtual void | Pause () |
Pause the image. | |
virtual void | Stop () |
Stop the image. | |
virtual bool | IsPlaying () |
Indicate whether the image is currently playing. | |
virtual bool | IsPaused () |
Indicate whether the image is paused. | |
virtual string | GetDeviceName () |
Return the active image device name. | |
virtual int | GetWidth () |
Return the image width. | |
virtual int | GetHeight () |
Return the image height. | |
virtual Source2MatHelperColorFormat | GetBaseColorFormat () |
Return the image base color format. | |
virtual bool | DidUpdateThisFrame () |
Indicate whether the image 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). | |
virtual void | Dispose () |
Releases all resource used by the Image2MatHelper object. | |
Public Member Functions inherited from OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper |
Protected Member Functions | |
virtual void | OnValidate () |
virtual void | LateUpdate () |
virtual void | OnDestroy () |
Raises the destroy event. | |
virtual IEnumerator | _Initialize () |
Initialize this instance by coroutine. | |
virtual void | StartWaitFrameTimeThread () |
virtual void | StopWaitFrameTimeThread () |
virtual IEnumerator | WaitFrameTimeThreadWorker () |
virtual void | CancelInitCoroutine () |
Cancel Init Coroutine. | |
virtual void | ReleaseResources () |
To release the resources. | |
Protected Attributes | |
string | _requestedImageFilePath = string.Empty |
Set the image file path, relative to the starting point of the "StreamingAssets" folder, or absolute path. | |
Source2MatHelperColorFormat | _outputColorFormat = Source2MatHelperColorFormat.BGR |
Select the output color format. | |
int | _timeoutFrameCount = 1500 |
The number of frames before the initialization process times out. | |
bool | _repeat = true |
Indicate whether to play this image in a repeat. | |
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 | isPlaying = false |
bool | didUpdateThisFrame = false |
bool | didUpdateImageBufferInCurrentFrame = false |
Mat | frameMat |
The frame mat. | |
Source2MatHelperColorFormat | baseColorFormat = Source2MatHelperColorFormat.BGR |
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. | |
IEnumerator | getFilePathCoroutine |
The get file path coroutine. | |
string | imageFileFullPath |
IEnumerator | waitFrameTimeCoroutine |
The wait frame time coroutine. | |
bool | isThreadRunning = false |
bool | shouldStopThread = false |
bool | autoPlayAfterInitialize |
If set to true play after completion of initialization. | |
Properties | |
virtual string | requestedImageFilePath [get, set] |
virtual Source2MatHelperColorFormat | outputColorFormat [get, set] |
virtual int | timeoutFrameCount [get, set] |
virtual bool | repeat [get, set] |
UnityEvent | onInitialized [get, set] |
UnityEvent | onDisposed [get, set] |
Source2MatHelperErrorUnityEvent | onErrorOccurred [get, set] |
Properties inherited from OpenCVForUnity.UnityUtils.Helper.IImageSource2MatHelper | |
Properties inherited from OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper |
Image 2 mat helper. v 1.0.1.
By setting outputColorFormat to GRAY or BGR, processing that does not include extra color conversion is performed.
|
protectedvirtual |
Initialize this instance by coroutine.
|
protectedvirtual |
Cancel Init Coroutine.
|
virtual |
Indicate whether the image buffer of the frame has been updated.
true
, if the image buffer has been updated false
otherwise.Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Releases all resource used by the Image2MatHelper object.
Call Dispose when you are finished using the Image2MatHelper. The Dispose method leaves the Image2MatHelper in an unusable state. After calling Dispose, you must release all references to the Image2MatHelper so the garbage collector can reclaim the memory that the Image2MatHelper was occupying.
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Return the image base color format.
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Return the active image device name.
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Return the image 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).
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Return the image 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 |
Initialize this instance.
requestedImageFilePath | Requested image file path. |
autoPlay | If set to true play after completion of initialization. |
|
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 image is paused.
true
, if the image is paused, false
otherwise.Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Indicate whether the image is currently playing.
true
, if the image is playing, false
otherwise.Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
protectedvirtual |
|
protectedvirtual |
Raises the destroy event.
|
protectedvirtual |
|
virtual |
Pause the image.
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
virtual |
Start the image.
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
protectedvirtual |
To release the resources.
|
protectedvirtual |
|
virtual |
Stop the image.
Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.
|
protectedvirtual |
|
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 |
Indicate whether to play this image in a repeat.
|
protected |
Set the image file path, relative to the starting point of the "StreamingAssets" folder, or absolute path.
|
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 |
|
protected |
|
protected |
The frame mat.
|
protected |
The get file path coroutine.
|
protected |
Indicates whether this instance has been initialized.
|
protected |
|
protected |
The initialization coroutine.
|
protected |
Indicates whether this instance is waiting for initialization to complete.
|
protected |
|
protected |
|
protected |
|
protected |
The wait frame time coroutine.
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |