OpenCV for Unity 2.6.5
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.
Loading...
Searching...
No Matches
OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper Class Reference

A helper component class for obtaining camera frames from WebCamTexture and converting them to OpenCV Mat format in real-time. More...

Public Member Functions

virtual bool DidUpdateThisFrame ()
 Use this to check if the Mat has changed since the last frame. Since it would not make sense to do expensive video processing in each Update call, check this value before doing any processing.
 
virtual void Dispose ()
 Releases all resource used by the WebCamTexture2MatHelper object.
 
virtual Source2MatHelperColorFormat GetBaseColorFormat ()
 Return the video base color format.
 
virtual Color32[] GetBufferColors ()
 Get the buffer colors.
 
virtual Matrix4x4 GetCameraToWorldMatrix ()
 Return the camera to world matrix.
 
virtual string GetDeviceName ()
 Return the active camera device name.
 
virtual float GetFPS ()
 Return the active camera framerate.
 
virtual int GetHeight ()
 Return the active camera height.
 
virtual Mat GetMat ()
 Get the mat of the current frame.
 
virtual Matrix4x4 GetProjectionMatrix ()
 Return the projection matrix matrix.
 
virtual WebCamDevice GetWebCamDevice ()
 Return the active WebcamDevice.
 
virtual WebCamTexture GetWebCamTexture ()
 Return the active WebcamTexture.
 
virtual int GetWidth ()
 Return the active camera width.
 
virtual void Initialize (bool autoPlay=true)
 Initialize this instance.
 
virtual void Initialize (bool requestedIsFrontFacing, float requestedFPS=30f, bool rotate90Degree=false, bool autoPlay=true)
 Initialize this instance.
 
virtual void Initialize (int requestedWidth, int requestedHeight, bool autoPlay=true)
 Initialize this instance.
 
virtual void Initialize (string deviceName, int requestedWidth, int requestedHeight, bool requestedIsFrontFacing=false, float requestedFPS=30f, bool rotate90Degree=false, bool autoPlay=true)
 Initialize this instance.
 
virtual bool IsFrontFacing ()
 Indicate whether the active camera device is currently front facng.
 
virtual bool IsInitialized ()
 Indicate whether this instance has been initialized.
 
virtual bool IsPaused ()
 Indicate whether the camera is paused.
 
virtual bool IsPlaying ()
 Indicate whether the active camera is currently playing.
 
virtual void Pause ()
 Pause the active camera.
 
virtual void Play ()
 Start the active camera.
 
virtual void Stop ()
 Stop the active camera.
 
- Public Member Functions inherited from OpenCVForUnity.UnityUtils.Helper.ICameraSource2MatHelper
- Public Member Functions inherited from OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper

Protected Member Functions

virtual IEnumerator _Initialize ()
 Initialize this instance by coroutine.
 
virtual void CancelInitCoroutine ()
 Cancel Init Coroutine.
 
virtual Mat FlipAndRotateMat (Mat frameMat, Mat rotatedFrameMat, bool flipVertical, bool flipHorizontal, bool isFrontFacing, int videoRotationAngle, ScreenOrientation screenOrientation, bool isScreenOrientationCorrect, bool isVidevideoRotationAngleCorrect)
 
virtual void FlipMat (Mat mat, bool flipVertical, bool flipHorizontal, bool isFrontFacing, int videoRotationAngle)
 Flip Mat.
 
virtual IEnumerator hasUserAuthorizedCameraPermission ()
 Check camera permission state by coroutine.
 
virtual bool IsScreenOrientationCorrect ()
 Is ScreenOrientation the correct value?
 
virtual bool IsVideoRotationAngleCorrect ()
 Is VideoRotationAngle the correct value?
 
virtual bool NeedsRotatedFrameMat (bool isScreenOrientationCorrect)
 Determines whether the RotatedFrameMat is needed.
 
virtual IEnumerator OnApplicationFocus (bool hasFocus)
 
virtual void OnDestroy ()
 Raises the destroy event.
 
virtual void OnValidate ()
 
virtual void ReleaseResources ()
 To release the resources.
 
virtual void Update ()
 

Protected Attributes

bool _flipHorizontal = false
 
bool _flipVertical = false
 
UnityEvent _onDisposed
 
Source2MatHelperErrorUnityEvent _onErrorOccurred
 
UnityEvent _onInitialized
 
Source2MatHelperColorFormat _outputColorFormat = Source2MatHelperColorFormat.RGBA
 
string _requestedDeviceName = null
 
float _requestedFPS = 30f
 
int _requestedHeight = 480
 
bool _requestedIsFrontFacing = false
 
int _requestedWidth = 640
 
bool _rotate90Degree = false
 
int _timeoutFrameCount = 1500
 
bool autoPlayAfterInitialize
 If set to true play after completion of initialization.
 
Source2MatHelperColorFormat baseColorFormat = Source2MatHelperColorFormat.RGBA
 The base color format.
 
Mat baseMat
 The base mat.
 
Color32[] colors
 The buffer colors.
 
Mat frameMat
 The frame mat.
 
bool hasInitDone = false
 Indicates whether this instance has been initialized.
 
IEnumerator initCoroutine
 The initialization coroutine.
 
bool isInitWaiting = false
 Indicates whether this instance is waiting for initialization to complete.
 
bool isScreenOrientationCorrect
 Is ScreenOrientation the correct value?
 
bool isScreenSizeChangeWaiting = false
 isScreenSizeChangeWaiting
 
bool isVideoRotationAngleCorrect
 Is VideoRotationAngle the correct value?
 
Mat rotatedFrameMat
 The rotated frame mat.
 
int screenHeight
 The height of the screen.
 
ScreenOrientation screenOrientation
 The orientation of the screen.
 
int screenWidth
 The width of the screen.
 
WebCamDevice webCamDevice
 The active WebcamDevice.
 
WebCamTexture webCamTexture
 The active WebcamTexture.
 

Properties

virtual bool flipHorizontal [get, set]
 Set whether to flip horizontal.
 
virtual bool flipVertical [get, set]
 Set whether to flip vertically.
 
UnityEvent onDisposed [get, set]
 UnityEvent that is triggered when this instance is disposed.
 
Source2MatHelperErrorUnityEvent onErrorOccurred [get, set]
 UnityEvent that is triggered when this instance is error Occurred.
 
UnityEvent onInitialized [get, set]
 UnityEvent that is triggered when this instance is initialized.
 
virtual Source2MatHelperColorFormat outputColorFormat [get, set]
 Select the output color format.
 
virtual string requestedDeviceName [get, set]
 Set the name of the camera device to use. (or device index number)
 
virtual float requestedFPS [get, set]
 Set the frame rate of camera.
 
virtual int requestedHeight [get, set]
 Set the height of camera.
 
virtual bool requestedIsFrontFacing [get, set]
 Set whether to use the front facing camera.
 
virtual int requestedWidth [get, set]
 Set the width of camera.
 
virtual bool rotate90Degree [get, set]
 Set whether to rotate camera frame 90 degrees. (clockwise)
 
virtual int timeoutFrameCount [get, set]
 The number of frames before the initialization process times out.
 
- Properties inherited from OpenCVForUnity.UnityUtils.Helper.ICameraSource2MatHelper
- Properties inherited from OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper

Detailed Description

A helper component class for obtaining camera frames from WebCamTexture and converting them to OpenCV Mat format in real-time.

The WebCamTexture2MatHelper class captures video frames from a device's camera using WebCamTexture and converts each frame to an OpenCV Mat object every frame. This component handles camera orientation, rotation, and necessary transformations to ensure the Mat output aligns correctly with the device's display orientation.

This component is particularly useful for image processing tasks in Unity, such as computer vision applications, where real-time camera input in Mat format is required. It enables seamless integration of OpenCV-based image processing algorithms with Unity's camera input.

Note: By setting outputColorFormat to RGBA, processing that does not include extra color conversion is performed.

Attach this component to a GameObject and call GetMat() to retrieve the latest camera frame in Mat format. The helper class manages camera start/stop operations and frame updates internally.

Member Function Documentation

◆ _Initialize()

virtual IEnumerator OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper._Initialize ( )
protectedvirtual

Initialize this instance by coroutine.

Reimplemented in OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatAsyncGPUHelper.

◆ CancelInitCoroutine()

virtual void OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.CancelInitCoroutine ( )
protectedvirtual

Cancel Init Coroutine.

◆ DidUpdateThisFrame()

virtual bool OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.DidUpdateThisFrame ( )
virtual

Use this to check if the Mat has changed since the last frame. Since it would not make sense to do expensive video processing in each Update call, check this value before doing any processing.

Returns
true, if the Mat has been updated false otherwise.

Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.

Reimplemented in OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatAsyncGPUHelper.

◆ Dispose()

virtual void OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.Dispose ( )
virtual

Releases all resource used by the WebCamTexture2MatHelper object.

Call Dispose when you are finished using the WebCamTexture2MatHelper. The Dispose method leaves the WebCamTexture2MatHelper in an unusable state. After calling Dispose, you must release all references to the WebCamTexture2MatHelper so the garbage collector can reclaim the memory that the WebCamTexture2MatHelper was occupying.

Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.

Reimplemented in OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatAsyncGPUHelper.

◆ FlipAndRotateMat()

virtual Mat OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.FlipAndRotateMat ( Mat frameMat,
Mat rotatedFrameMat,
bool flipVertical,
bool flipHorizontal,
bool isFrontFacing,
int videoRotationAngle,
ScreenOrientation screenOrientation,
bool isScreenOrientationCorrect,
bool isVidevideoRotationAngleCorrect )
protectedvirtual

◆ FlipMat()

virtual void OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.FlipMat ( Mat mat,
bool flipVertical,
bool flipHorizontal,
bool isFrontFacing,
int videoRotationAngle )
protectedvirtual

Flip Mat.

Parameters
mat
flipVertical
flipHorizontal
isFrontFacing
videoRotationAngle

◆ GetBaseColorFormat()

virtual Source2MatHelperColorFormat OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.GetBaseColorFormat ( )
virtual

Return the video base color format.

Returns
The video base color format.

Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.

◆ GetBufferColors()

virtual Color32[] OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.GetBufferColors ( )
virtual

Get the buffer colors.

Returns
The buffer colors.

◆ GetCameraToWorldMatrix()

virtual Matrix4x4 OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.GetCameraToWorldMatrix ( )
virtual

Return the camera to world matrix.

Returns
The camera to world matrix.

Implements OpenCVForUnity.UnityUtils.Helper.ICameraSource2MatHelper.

◆ GetDeviceName()

virtual string OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.GetDeviceName ( )
virtual

Return the active camera device name.

Returns
The active camera device name.

Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.

◆ GetFPS()

virtual float OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.GetFPS ( )
virtual

Return the active camera framerate.

Returns
The active camera framerate.

Implements OpenCVForUnity.UnityUtils.Helper.ICameraSource2MatHelper.

◆ GetHeight()

virtual int OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.GetHeight ( )
virtual

Return the active camera height.

Returns
The active camera height.

Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.

◆ GetMat()

virtual Mat OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.GetMat ( )
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.

Returns
The mat of the current frame.

Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.

Reimplemented in OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatAsyncGPUHelper.

◆ GetProjectionMatrix()

virtual Matrix4x4 OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.GetProjectionMatrix ( )
virtual

Return the projection matrix matrix.

Returns
The projection matrix.

Implements OpenCVForUnity.UnityUtils.Helper.ICameraSource2MatHelper.

◆ GetWebCamDevice()

virtual WebCamDevice OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.GetWebCamDevice ( )
virtual

Return the active WebcamDevice.

Returns
The active WebcamDevice.

◆ GetWebCamTexture()

virtual WebCamTexture OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.GetWebCamTexture ( )
virtual

Return the active WebcamTexture.

Returns
The active WebcamTexture.

◆ GetWidth()

virtual int OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.GetWidth ( )
virtual

Return the active camera width.

Returns
The active camera width.

Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.

◆ hasUserAuthorizedCameraPermission()

virtual IEnumerator OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.hasUserAuthorizedCameraPermission ( )
protectedvirtual

Check camera permission state by coroutine.

◆ Initialize() [1/4]

virtual void OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.Initialize ( bool autoPlay = true)
virtual

Initialize this instance.

Parameters
autoPlayIf set to true play after completion of initialization.

Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.

◆ Initialize() [2/4]

virtual void OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.Initialize ( bool requestedIsFrontFacing,
float requestedFPS = 30f,
bool rotate90Degree = false,
bool autoPlay = true )
virtual

Initialize this instance.

Parameters
requestedIsFrontFacingIf set to true requested to using the front camera.
requestedFPSRequested FPS.
rotate90DegreeIf set to true requested to rotate camera frame 90 degrees. (clockwise)
autoPlayIf set to true play after completion of initialization.

◆ Initialize() [3/4]

virtual void OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.Initialize ( int requestedWidth,
int requestedHeight,
bool autoPlay = true )
virtual

Initialize this instance.

Parameters
requestedWidthRequested width.
requestedHeightRequested height.
autoPlayIf set to true play after completion of initialization.

◆ Initialize() [4/4]

virtual void OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.Initialize ( string deviceName,
int requestedWidth,
int requestedHeight,
bool requestedIsFrontFacing = false,
float requestedFPS = 30f,
bool rotate90Degree = false,
bool autoPlay = true )
virtual

Initialize this instance.

Parameters
deviceNameDevice name.
requestedWidthRequested width.
requestedHeightRequested height.
requestedIsFrontFacingIf set to true requested to using the front camera.
requestedFPSRequested FPS.
rotate90DegreeIf set to true requested to rotate camera frame 90 degrees. (clockwise)
autoPlayIf set to true play after completion of initialization.

◆ IsFrontFacing()

virtual bool OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.IsFrontFacing ( )
virtual

Indicate whether the active camera device is currently front facng.

Returns
true, if the active camera device is front facng, false otherwise.

Implements OpenCVForUnity.UnityUtils.Helper.ICameraSource2MatHelper.

◆ IsInitialized()

virtual bool OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.IsInitialized ( )
virtual

Indicate whether this instance has been initialized.

Returns
true, if this instance has been initialized, false otherwise.

Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.

◆ IsPaused()

virtual bool OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.IsPaused ( )
virtual

Indicate whether the camera is paused.

Returns
true, if the active camera is paused, false otherwise.

Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.

◆ IsPlaying()

virtual bool OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.IsPlaying ( )
virtual

Indicate whether the active camera is currently playing.

Returns
true, if the active camera is playing, false otherwise.

Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.

◆ IsScreenOrientationCorrect()

virtual bool OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.IsScreenOrientationCorrect ( )
protectedvirtual

Is ScreenOrientation the correct value?

Returns
True if ScreenOrientation is the correct value; otherwise, false.

◆ IsVideoRotationAngleCorrect()

virtual bool OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.IsVideoRotationAngleCorrect ( )
protectedvirtual

Is VideoRotationAngle the correct value?

Returns
True if VideoRotationAngle is the correct value; otherwise, false.

◆ NeedsRotatedFrameMat()

virtual bool OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.NeedsRotatedFrameMat ( bool isScreenOrientationCorrect)
protectedvirtual

Determines whether the RotatedFrameMat is needed.

Returns
True if RotatedFrameMat is needed; otherwise, false.

◆ OnApplicationFocus()

virtual IEnumerator OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.OnApplicationFocus ( bool hasFocus)
protectedvirtual

◆ OnDestroy()

virtual void OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.OnDestroy ( )
protectedvirtual

Raises the destroy event.

◆ OnValidate()

virtual void OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.OnValidate ( )
protectedvirtual

◆ Pause()

virtual void OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.Pause ( )
virtual

◆ Play()

virtual void OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.Play ( )
virtual

◆ ReleaseResources()

virtual void OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.ReleaseResources ( )
protectedvirtual

To release the resources.

Reimplemented in OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatAsyncGPUHelper.

◆ Stop()

virtual void OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.Stop ( )
virtual

◆ Update()

virtual void OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.Update ( )
protectedvirtual

Member Data Documentation

◆ _flipHorizontal

bool OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper._flipHorizontal = false
protected

◆ _flipVertical

bool OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper._flipVertical = false
protected

◆ _onDisposed

UnityEvent OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper._onDisposed
protected

◆ _onErrorOccurred

Source2MatHelperErrorUnityEvent OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper._onErrorOccurred
protected

◆ _onInitialized

UnityEvent OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper._onInitialized
protected

◆ _outputColorFormat

Source2MatHelperColorFormat OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper._outputColorFormat = Source2MatHelperColorFormat.RGBA
protected

◆ _requestedDeviceName

string OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper._requestedDeviceName = null
protected

◆ _requestedFPS

float OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper._requestedFPS = 30f
protected

◆ _requestedHeight

int OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper._requestedHeight = 480
protected

◆ _requestedIsFrontFacing

bool OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper._requestedIsFrontFacing = false
protected

◆ _requestedWidth

int OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper._requestedWidth = 640
protected

◆ _rotate90Degree

bool OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper._rotate90Degree = false
protected

◆ _timeoutFrameCount

int OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper._timeoutFrameCount = 1500
protected

◆ autoPlayAfterInitialize

bool OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.autoPlayAfterInitialize
protected

If set to true play after completion of initialization.

◆ baseColorFormat

Source2MatHelperColorFormat OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.baseColorFormat = Source2MatHelperColorFormat.RGBA
protected

The base color format.

◆ baseMat

Mat OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.baseMat
protected

The base mat.

◆ colors

Color32 [] OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.colors
protected

The buffer colors.

◆ frameMat

Mat OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.frameMat
protected

The frame mat.

◆ hasInitDone

bool OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.hasInitDone = false
protected

Indicates whether this instance has been initialized.

◆ initCoroutine

IEnumerator OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.initCoroutine
protected

The initialization coroutine.

◆ isInitWaiting

bool OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.isInitWaiting = false
protected

Indicates whether this instance is waiting for initialization to complete.

◆ isScreenOrientationCorrect

bool OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.isScreenOrientationCorrect
protected

Is ScreenOrientation the correct value?

◆ isScreenSizeChangeWaiting

bool OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.isScreenSizeChangeWaiting = false
protected

isScreenSizeChangeWaiting

◆ isVideoRotationAngleCorrect

bool OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.isVideoRotationAngleCorrect
protected

Is VideoRotationAngle the correct value?

◆ rotatedFrameMat

Mat OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.rotatedFrameMat
protected

The rotated frame mat.

◆ screenHeight

int OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.screenHeight
protected

The height of the screen.

◆ screenOrientation

ScreenOrientation OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.screenOrientation
protected

The orientation of the screen.

◆ screenWidth

int OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.screenWidth
protected

The width of the screen.

◆ webCamDevice

WebCamDevice OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.webCamDevice
protected

The active WebcamDevice.

◆ webCamTexture

WebCamTexture OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.webCamTexture
protected

The active WebcamTexture.

Property Documentation

◆ flipHorizontal

virtual bool OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.flipHorizontal
getset

Set whether to flip horizontal.

◆ flipVertical

virtual bool OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.flipVertical
getset

Set whether to flip vertically.

◆ onDisposed

UnityEvent OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.onDisposed
getset

UnityEvent that is triggered when this instance is disposed.

Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.

◆ onErrorOccurred

Source2MatHelperErrorUnityEvent OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.onErrorOccurred
getset

UnityEvent that is triggered when this instance is error Occurred.

Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.

◆ onInitialized

UnityEvent OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.onInitialized
getset

UnityEvent that is triggered when this instance is initialized.

Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.

◆ outputColorFormat

virtual Source2MatHelperColorFormat OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.outputColorFormat
getset

Select the output color format.

Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.

◆ requestedDeviceName

virtual string OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.requestedDeviceName
getset

Set the name of the camera device to use. (or device index number)

Implements OpenCVForUnity.UnityUtils.Helper.ICameraSource2MatHelper.

◆ requestedFPS

virtual float OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.requestedFPS
getset

Set the frame rate of camera.

Implements OpenCVForUnity.UnityUtils.Helper.ICameraSource2MatHelper.

◆ requestedHeight

virtual int OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.requestedHeight
getset

Set the height of camera.

Implements OpenCVForUnity.UnityUtils.Helper.ICameraSource2MatHelper.

◆ requestedIsFrontFacing

virtual bool OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.requestedIsFrontFacing
getset

Set whether to use the front facing camera.

Implements OpenCVForUnity.UnityUtils.Helper.ICameraSource2MatHelper.

◆ requestedWidth

virtual int OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.requestedWidth
getset

Set the width of camera.

Implements OpenCVForUnity.UnityUtils.Helper.ICameraSource2MatHelper.

◆ rotate90Degree

virtual bool OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.rotate90Degree
getset

Set whether to rotate camera frame 90 degrees. (clockwise)

◆ timeoutFrameCount

virtual int OpenCVForUnity.UnityUtils.Helper.WebCamTexture2MatHelper.timeoutFrameCount
getset

The number of frames before the initialization process times out.

Implements OpenCVForUnity.UnityUtils.Helper.ISource2MatHelper.


The documentation for this class was generated from the following file: