VideoCapture to mat helper. v 1.0.4.
More...
|
virtual void | Initialize () |
| Initializes this instance.
|
|
virtual void | Initialize (string requestedVideoFilePath) |
| Initializes this instance.
|
|
virtual bool | IsInitialized () |
| Indicates whether this instance has been initialized.
|
|
virtual void | Play () |
| Starts the video.
|
|
virtual void | Pause () |
| Pauses the video.
|
|
virtual void | Stop () |
| Stops the video.
|
|
virtual bool | IsPlaying () |
| Indicates whether the video is currently playing.
|
|
virtual int | GetWidth () |
| Returns the video width.
|
|
virtual int | GetHeight () |
| Returns the video height.
|
|
virtual float | GetFPS () |
| Returns the video framerate.
|
|
virtual float | GetPosRatio () |
| Returns the relative position of the video file: 0=start of the film, 1=end of the film.
|
|
virtual void | SetPosRatio (float ratio) |
| Sets the relative position of the video file: 0=start of the film, 1=end of the film.
|
|
virtual ColorFormat | GetBaseColorFormat () |
| Returns the video base color format.
|
|
virtual VideoCapture | GetVideoCapture () |
| Returns the VideoCapture instance.
|
|
virtual bool | DidUpdateThisFrame () |
| Indicates whether the video 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 VideoCaptrueToMatHelper object.
|
|
|
UnityEvent | onInitialized |
| UnityEvent that is triggered when this instance is initialized.
|
|
UnityEvent | onDisposed |
| UnityEvent that is triggered when this instance is disposed.
|
|
ErrorUnityEvent | onErrorOccurred |
| UnityEvent that is triggered when this instance is error Occurred.
|
|
|
virtual string | requestedVideoFilePath [get, set] |
|
virtual int | apiPreference [get, set] |
|
virtual ColorFormat | outputColorFormat [get, set] |
|
virtual int | timeoutFrameCount [get, set] |
|
virtual bool | loop [get, set] |
|
VideoCapture | videoCapture [get, set] |
|
virtual bool | isReading [get, set] |
|
virtual bool | isPlaying [get, set] |
|
virtual bool | didUpdateThisFrame [get, set] |
|
virtual bool | didUpdateImageBufferInCurrentFrame [get, set] |
|
Mat | imageBufferMat [get, set] |
|
virtual bool | isThreadRunning [get, set] |
|
virtual bool | shouldStopThread [get, set] |
|
VideoCapture to mat helper. v 1.0.4.
◆ ColorFormat
Enumerator |
---|
GRAY | |
RGB | |
BGR | |
RGBA | |
BGRA | |
◆ ErrorCode
Enumerator |
---|
UNKNOWN | |
VIDEO_FILE_NOT_EXIST | |
VIDEO_FILE_CANT_OPEN | |
TIMEOUT | |
◆ _Initialize()
virtual IEnumerator OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper._Initialize |
( |
| ) |
|
|
protectedvirtual |
Initializes this instance by coroutine.
◆ CancelInitCoroutine()
virtual void OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.CancelInitCoroutine |
( |
| ) |
|
|
protectedvirtual |
◆ Channels()
virtual int OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.Channels |
( |
ColorFormat | type | ) |
|
|
protectedvirtual |
◆ ColorConversionCodes()
virtual int OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.ColorConversionCodes |
( |
ColorFormat | srcType, |
|
|
ColorFormat | dstType ) |
|
protectedvirtual |
◆ DidUpdateThisFrame()
virtual bool OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.DidUpdateThisFrame |
( |
| ) |
|
|
virtual |
Indicates whether the video buffer of the frame has been updated.
- Returns
true
, if the video buffer has been updated false
otherwise.
◆ Dispose()
virtual void OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.Dispose |
( |
| ) |
|
|
virtual |
Releases all resource used by the VideoCaptrueToMatHelper object.
Call Dispose when you are finished using the VideoCaptrueToMatHelper. The Dispose method leaves the VideoCaptrueToMatHelper in an unusable state. After calling Dispose, you must release all references to the VideoCaptrueToMatHelper so the garbage collector can reclaim the memory that the VideoCaptrueToMatHelper was occupying.
◆ GetBaseColorFormat()
virtual ColorFormat OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.GetBaseColorFormat |
( |
| ) |
|
|
virtual |
Returns the video base color format.
- Returns
- The video base color format.
◆ GetFPS()
virtual float OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.GetFPS |
( |
| ) |
|
|
virtual |
Returns the video framerate.
- Returns
- The video framerate.
◆ GetHeight()
virtual int OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.GetHeight |
( |
| ) |
|
|
virtual |
Returns the video height.
- Returns
- The video height.
◆ GetMat()
virtual Mat OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.GetMat |
( |
| ) |
|
|
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).
- Returns
- The mat of the current frame.
◆ GetPosRatio()
virtual float OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.GetPosRatio |
( |
| ) |
|
|
virtual |
Returns the relative position of the video file: 0=start of the film, 1=end of the film.
- Returns
- The relative position of the video file: 0=start of the film, 1=end of the film.
◆ GetVideoCapture()
virtual VideoCapture OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.GetVideoCapture |
( |
| ) |
|
|
virtual |
Returns the VideoCapture instance.
- Returns
- The VideoCapture instance.
◆ GetWidth()
virtual int OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.GetWidth |
( |
| ) |
|
|
virtual |
Returns the video width.
- Returns
- The video width.
◆ Initialize() [1/2]
virtual void OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.Initialize |
( |
| ) |
|
|
virtual |
Initializes this instance.
◆ Initialize() [2/2]
virtual void OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.Initialize |
( |
string | requestedVideoFilePath | ) |
|
|
virtual |
Initializes this instance.
- Parameters
-
requestedVideoFilePath | Requested video file path. |
◆ IsInitialized()
virtual bool OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.IsInitialized |
( |
| ) |
|
|
virtual |
Indicates whether this instance has been initialized.
- Returns
true
, if this instance has been initialized, false
otherwise.
◆ IsPlaying()
virtual bool OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.IsPlaying |
( |
| ) |
|
|
virtual |
Indicates whether the video is currently playing.
- Returns
true
, if the video is playing, false
otherwise.
◆ LateUpdate()
virtual void OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.LateUpdate |
( |
| ) |
|
|
protectedvirtual |
◆ OnDestroy()
virtual void OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.OnDestroy |
( |
| ) |
|
|
protectedvirtual |
Raises the destroy event.
◆ OnValidate()
virtual void OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.OnValidate |
( |
| ) |
|
|
protectedvirtual |
◆ Pause()
virtual void OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.Pause |
( |
| ) |
|
|
virtual |
◆ Play()
virtual void OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.Play |
( |
| ) |
|
|
virtual |
◆ ReadFrame()
virtual void OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.ReadFrame |
( |
| ) |
|
|
protectedvirtual |
◆ ReleaseResources()
virtual void OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.ReleaseResources |
( |
| ) |
|
|
protectedvirtual |
To release the resources.
◆ SetPosRatio()
virtual void OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.SetPosRatio |
( |
float | ratio | ) |
|
|
virtual |
Sets the relative position of the video file: 0=start of the film, 1=end of the film.
- Parameters
-
ratio | The relative position of the video file: 0=start of the film, 1=end of the film. |
◆ StartWaitFrameTimeThread()
virtual void OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.StartWaitFrameTimeThread |
( |
| ) |
|
|
protectedvirtual |
◆ Stop()
virtual void OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.Stop |
( |
| ) |
|
|
virtual |
◆ StopWaitFrameTimeThread()
virtual void OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.StopWaitFrameTimeThread |
( |
| ) |
|
|
protectedvirtual |
◆ WaitFrameTimeThreadWorker()
virtual void OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.WaitFrameTimeThreadWorker |
( |
| ) |
|
|
protectedvirtual |
◆ _apiPreference
int OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper._apiPreference = Videoio.CAP_ANY |
|
protected |
Set the apiPreference. VideoCapture API backends identifier. (Advanced Option) See ReadMe.pdf for setup instructions for using CAP_FFMPEG on Windows platforms.
◆ _didUpdateImageBufferInCurrentFrame
bool OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper._didUpdateImageBufferInCurrentFrame = false |
|
protected |
◆ _didUpdateThisFrame
bool OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper._didUpdateThisFrame = false |
|
protected |
◆ _imageBufferMat
Mat OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper._imageBufferMat |
|
protected |
◆ _isPlaying
bool OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper._isPlaying = false |
|
protected |
◆ _isReading
bool OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper._isReading = false |
|
protected |
◆ _isThreadRunning
bool OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper._isThreadRunning = false |
|
protected |
◆ _loop
bool OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper._loop = true |
|
protected |
Indicates whether to play this video in a loop.
◆ _outputColorFormat
Select the output color format.
◆ _requestedVideoFilePath
string OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper._requestedVideoFilePath = string.Empty |
|
protected |
◆ _shouldStopThread
bool OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper._shouldStopThread = false |
|
protected |
◆ _timeoutFrameCount
int OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper._timeoutFrameCount = 1500 |
|
protected |
The number of frames before the initialization process times out.
◆ _videoCapture
VideoCapture OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper._videoCapture |
|
protected |
◆ baseColorFormat
◆ baseMat
Mat OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.baseMat |
|
protected |
◆ frameMat
Mat OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.frameMat |
|
protected |
◆ getFilePathCoroutine
IEnumerator OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.getFilePathCoroutine |
|
protected |
The get file path coroutine.
◆ hasInitDone
bool OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.hasInitDone = false |
|
protected |
Indicates whether this instance has been initialized.
◆ imageBufferMatLockObject
System.Object OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.imageBufferMatLockObject = new System.Object() |
|
protected |
◆ initCoroutine
IEnumerator OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.initCoroutine |
|
protected |
The initialization coroutine.
◆ isInitWaiting
bool OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.isInitWaiting = false |
|
protected |
Indicates whether this instance is waiting for initialization to complete.
◆ onDisposed
UnityEvent OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.onDisposed |
UnityEvent that is triggered when this instance is disposed.
◆ onErrorOccurred
ErrorUnityEvent OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.onErrorOccurred |
UnityEvent that is triggered when this instance is error Occurred.
◆ onInitialized
UnityEvent OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.onInitialized |
UnityEvent that is triggered when this instance is initialized.
◆ sync
System.Object OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.sync = new System.Object() |
|
protected |
◆ videoCaptureLockObject
System.Object OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.videoCaptureLockObject = new System.Object() |
|
protected |
◆ apiPreference
virtual int OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.apiPreference |
|
getset |
◆ didUpdateImageBufferInCurrentFrame
virtual bool OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.didUpdateImageBufferInCurrentFrame |
|
getsetprotected |
◆ didUpdateThisFrame
virtual bool OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.didUpdateThisFrame |
|
getsetprotected |
◆ imageBufferMat
Mat OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.imageBufferMat |
|
getsetprotected |
◆ isPlaying
virtual bool OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.isPlaying |
|
getsetprotected |
◆ isReading
virtual bool OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.isReading |
|
getsetprotected |
◆ isThreadRunning
virtual bool OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.isThreadRunning |
|
getsetprotected |
◆ loop
virtual bool OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.loop |
|
getset |
◆ outputColorFormat
virtual ColorFormat OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.outputColorFormat |
|
getset |
◆ requestedVideoFilePath
virtual string OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.requestedVideoFilePath |
|
getset |
◆ shouldStopThread
virtual bool OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.shouldStopThread |
|
getsetprotected |
◆ timeoutFrameCount
virtual int OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.timeoutFrameCount |
|
getset |
◆ videoCapture
VideoCapture OpenCVForUnity.UnityUtils.Helper.VideoCaptureToMatHelper.videoCapture |
|
getsetprotected |
The documentation for this class was generated from the following file: