OpenCV for Unity 3.0.4
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/5.0/index.html ) for the details of the argument of the method.
Loading...
Searching...
No Matches
OpenCVForUnity.Extensions.SourceToMat.ICameraMatSource Interface Reference

Camera-specific capabilities for IMatSource. More...

Public Member Functions

IReadOnlyList< CameraResolution > GetSupportedResolutions (string deviceNameOrIndex)
 Gets supported resolutions for the specified device name or index string.
 
- Public Member Functions inherited from OpenCVForUnity.Extensions.SourceToMat.IMatSource
Task InitializeAsync (CancellationToken cancellationToken=default)
 Initializes the source asynchronously and leaves playback in MatSourceState.Ready.
 
Task PauseAsync (CancellationToken cancellationToken=default)
 Pauses frame acquisition asynchronously. When already paused, completes immediately without error. When MatSourceState.Initializing, completes immediately without changing state.
 
Task PlayAsync (CancellationToken cancellationToken=default)
 Starts or resumes frame acquisition asynchronously. When already playing, completes immediately without error. When MatSourceState.Initializing, completes immediately without changing state.
 
Task ReleaseAsync (CancellationToken cancellationToken=default)
 Releases underlying resources and returns the source to an uninitialized state. When already uninitialized and the grabber is closed, completes immediately without error.
 
Task StopAsync (CancellationToken cancellationToken=default)
 Stops frame acquisition asynchronously. When already in the ready (not playing) state, completes immediately without error. When MatSourceState.Initializing, completes immediately without changing state.
 
- Public Member Functions inherited from OpenCVForUnity.Extensions.SourceToMat.IMatMetaProperties
bool TryGetMeta (string key, out object value)
 Attempts to get a meta property value by key.
 
bool TrySetMeta (string key, object value)
 Attempts to set a meta property value by key.
 

Properties

string DeviceName [get]
 Gets the effective device name after initialization.
 
float FPS [get]
 Gets the effective frame rate in frames per second.
 
string RequestedDeviceName [get, set]
 Gets or sets the requested device name or index string.
 
float RequestedFPS [get, set]
 Gets or sets the requested frame rate in frames per second.
 
int RequestedHeight [get, set]
 Gets or sets the requested frame height in pixels.
 
int RequestedWidth [get, set]
 Gets or sets the requested frame width in pixels.
 
IReadOnlyList< CameraDeviceInfo > SupportedDevices [get]
 Gets the list of connected camera devices. May be empty when enumeration is unsupported or unavailable.
 
IReadOnlyList< CameraResolution > SupportedResolutions [get]
 Gets supported resolutions for the currently resolved device.
 
- Properties inherited from OpenCVForUnity.Extensions.SourceToMat.IMatSource
SourceToMatColorFormat BaseColorFormat [get]
 Gets the native color format produced by the underlying grabber before output conversion.
 
bool DidUpdateThisFrame [get]
 Gets a value indicating whether FrameMat was updated during the most recent tick.
 
Mat FrameMat [get]
 Gets the owned reusable output buffer. Do not dispose this Mat.
 
int Height [get]
 Gets the current frame height in pixels.
 
int InitTimeoutMs [get, set]
 Gets or sets the initialization wait timeout in milliseconds.
 
bool IsInitialized [get]
 Gets a value indicating whether the source has been initialized and is ready for playback control. Does not include MatSourceState.Initializing.
 
bool IsInitializing [get]
 Gets a value indicating whether initialization is in progress (MatSourceState.Initializing).
 
bool IsPaused [get]
 Gets a value indicating whether frame acquisition is paused.
 
bool IsPlaying [get]
 Gets a value indicating whether frame acquisition is active.
 
SourceToMatColorFormat OutputColorFormat [get, set]
 Gets or sets the output color format. When changed after initialization, the output FrameMat channel layout (Mat type) may change and implementations that raise IMatSourceEvents.OnFrameMatLayoutChanged do so after the new layout is committed.
 
int Width [get]
 Gets the current frame width in pixels.
 

Detailed Description

Camera-specific capabilities for IMatSource.

Member Function Documentation

◆ GetSupportedResolutions()

IReadOnlyList< CameraResolution > OpenCVForUnity.Extensions.SourceToMat.ICameraMatSource.GetSupportedResolutions ( string deviceNameOrIndex)

Gets supported resolutions for the specified device name or index string.

Parameters
deviceNameOrIndexA device name or index string.
Returns
Supported resolutions for the device, or an empty list when the device is unknown, unsupported, or the backend does not enumerate capture modes (platform-dependent). Order is platform-defined. For UI lists, use CameraResolutionUtils.NormalizeDistinctSorted.

Implemented in OpenCVForUnity.UnityIntegration.Helper.SourceToMat.WebCamTextureMatSource.

Property Documentation

◆ DeviceName

string OpenCVForUnity.Extensions.SourceToMat.ICameraMatSource.DeviceName
get

Gets the effective device name after initialization.

Implemented in OpenCVForUnity.UnityIntegration.Helper.SourceToMat.WebCamTextureMatSource.

◆ FPS

float OpenCVForUnity.Extensions.SourceToMat.ICameraMatSource.FPS
get

Gets the effective frame rate in frames per second.

Implemented in OpenCVForUnity.UnityIntegration.Helper.SourceToMat.WebCamTextureMatSource.

◆ RequestedDeviceName

string OpenCVForUnity.Extensions.SourceToMat.ICameraMatSource.RequestedDeviceName
getset

Gets or sets the requested device name or index string.

Implemented in OpenCVForUnity.UnityIntegration.Helper.SourceToMat.WebCamTextureMatSource.

◆ RequestedFPS

float OpenCVForUnity.Extensions.SourceToMat.ICameraMatSource.RequestedFPS
getset

Gets or sets the requested frame rate in frames per second.

Implemented in OpenCVForUnity.UnityIntegration.Helper.SourceToMat.WebCamTextureMatSource.

◆ RequestedHeight

int OpenCVForUnity.Extensions.SourceToMat.ICameraMatSource.RequestedHeight
getset

Gets or sets the requested frame height in pixels.

Implemented in OpenCVForUnity.UnityIntegration.Helper.SourceToMat.WebCamTextureMatSource.

◆ RequestedWidth

int OpenCVForUnity.Extensions.SourceToMat.ICameraMatSource.RequestedWidth
getset

Gets or sets the requested frame width in pixels.

Implemented in OpenCVForUnity.UnityIntegration.Helper.SourceToMat.WebCamTextureMatSource.

◆ SupportedDevices

IReadOnlyList<CameraDeviceInfo> OpenCVForUnity.Extensions.SourceToMat.ICameraMatSource.SupportedDevices
get

Gets the list of connected camera devices. May be empty when enumeration is unsupported or unavailable.

Implemented in OpenCVForUnity.UnityIntegration.Helper.SourceToMat.WebCamTextureMatSource.

◆ SupportedResolutions

IReadOnlyList<CameraResolution> OpenCVForUnity.Extensions.SourceToMat.ICameraMatSource.SupportedResolutions
get

Gets supported resolutions for the currently resolved device.

Resolution for the device implied by RequestedDeviceName when set; otherwise the platform default first candidate. May be empty when the backend does not enumerate capture modes (platform-dependent). Order is platform-defined. For UI lists, use CameraResolutionUtils.NormalizeDistinctSorted.

Implemented in OpenCVForUnity.UnityIntegration.Helper.SourceToMat.WebCamTextureMatSource.


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