Class TofArFaceManager
Manages face recognition
Inheritance
Inherited Members
Namespace: TofAr.V0.Face
Assembly: TofArFaceAssembly.dll
Syntax
public class TofArFaceManager : Singleton<TofArFaceManager>, IStreamStoppable, IDisposable, IStreamHolder, IDependManager
Fields
autoStart
If true, Face data stream will automatically start when the application is started
Declaration
public bool autoStart
Field Value
Type |
---|
System.Boolean |
StreamKey
Stream key
Declaration
public const string StreamKey = "tofar_face_camera2_stream"
Field Value
Type |
---|
System.String |
Properties
DetectorType
Detector type
Declaration
public FaceDetectorType DetectorType { get; set; }
Property Value
Type |
---|
FaceDetectorType |
FaceData
Face data
Declaration
public FaceData FaceData { get; }
Property Value
Type |
---|
FaceData |
FrameRate
Actual FPS
Declaration
public float FrameRate { get; }
Property Value
Type |
---|
System.Single |
IsPlaying
True if recording file is being played
Declaration
public bool IsPlaying { get; }
Property Value
Type |
---|
System.Boolean |
IsStreamActive
If true, it is streaming
Declaration
public bool IsStreamActive { get; }
Property Value
Type |
---|
System.Boolean |
Stream
Stream
Declaration
public Stream Stream { get; }
Property Value
Type |
---|
SensCord.Stream |
StreamPlay
Playback stream
Declaration
public Stream StreamPlay { get; }
Property Value
Type |
---|
SensCord.Stream |
Version
Component version No.
Declaration
public string Version { get; }
Property Value
Type |
---|
System.String |
Methods
Dispose()
Object disposal
Declaration
public void Dispose()
FinalizeRestartStreamByDependManager(Object)
Post-processing of stream restart requested by dependent managers
Declaration
public void FinalizeRestartStreamByDependManager(object requestSource)
Parameters
Type | Name | Description |
---|---|---|
System.Object | requestSource | Requester |
GetProperty<T>()
Get component property
Declaration
public T GetProperty<T>()
where T : class, IBaseProperty, new()
Returns
Type | Description |
---|---|
T | Property class |
Type Parameters
Name | Description |
---|---|
T | IBaseProperty inherited class |
GetProperty<T>(T)
Get property of Component. Input parameter value may be designated.
Declaration
public T GetProperty<T>(T value)
where T : class, IBaseProperty
Parameters
Type | Name | Description |
---|---|---|
T | value | Input parameter |
Returns
Type | Description |
---|---|
T | Property class |
Type Parameters
Name | Description |
---|---|
T | IBaseProperty inherited class |
GetProperty<T>(T, Int32)
Set the size of the serialization buffer and get component properties. Input parameter value may be designated.
Declaration
public T GetProperty<T>(T value, int bufferSize)
where T : class, IBaseProperty, new()
Parameters
Type | Name | Description |
---|---|---|
T | value | Input parameter |
System.Int32 | bufferSize | Serialization buffer size |
Returns
Type | Description |
---|---|
T | Property class |
Type Parameters
Name | Description |
---|---|
T | IBaseProperty inherited class |
GetPropertyList()
Get property list
Declaration
public string[] GetPropertyList()
Returns
Type | Description |
---|---|
System.String[] | Property list |
PauseStream()
Pause stream
Declaration
public void PauseStream()
RestartStreamByDependManager(Object)
Restart stream as requested by dependent managers
Declaration
public void RestartStreamByDependManager(object requestSource)
Parameters
Type | Name | Description |
---|---|---|
System.Object | requestSource | Requester |
SetEstimatedResult(FaceResult)
Estimation result
Declaration
public void SetEstimatedResult(FaceResult result)
Parameters
Type | Name | Description |
---|---|---|
FaceResult | result | Face recognition result |
SetEstimatedResults(FaceResults)
Estimation result
Declaration
public void SetEstimatedResults(FaceResults results)
Parameters
Type | Name | Description |
---|---|---|
FaceResults | results | Face recognition result |
SetProperty<T>(T)
Set component property
Declaration
public void SetProperty<T>(T value)
where T : class, IBaseProperty
Parameters
Type | Name | Description |
---|---|---|
T | value | Input parameter |
Type Parameters
Name | Description |
---|---|
T | IBaseProperty inherited class |
StartPlayback(String)
Start playback of the recording file from the specified path
Declaration
public void StartPlayback(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Directory path of recording file to playback |
StartStream()
Start streaming
Declaration
public void StartStream()
StopPlayback()
Stop playback of recording file
Declaration
public void StopPlayback()
StopStream(Object)
Stop streaming
Declaration
public void StopStream(object sender = null)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | Caller object |
UnpauseStream()
Restart stream
Declaration
public void UnpauseStream()
Events
OnApplicationPausing
Application pausing
Declaration
public static event TofArFaceManager.ApplicationPausingEventHandler OnApplicationPausing
Event Type
Type | Description |
---|---|
TofArFaceManager.ApplicationPausingEventHandler |
OnApplicationResuming
Application resuming
Declaration
public static event TofArFaceManager.ApplicationResumingEventHandler OnApplicationResuming
Event Type
Type | Description |
---|---|
TofArFaceManager.ApplicationResumingEventHandler |
OnFaceEstimated
Notice on Face estimation result event
Declaration
public static event TofArFaceManager.OnFaceEstimatedHandler OnFaceEstimated
Event Type
Type | Description |
---|---|
TofArFaceManager.OnFaceEstimatedHandler |
OnFrameArrived
Notice on arrival of new frame
This component only occurs when running on the device
Declaration
public static event TofArFaceManager.FrameArrivedEventHandler OnFrameArrived
Event Type
Type | Description |
---|---|
TofArFaceManager.FrameArrivedEventHandler |
OnStreamStarted
Notice on starting of streaming
Declaration
public static event TofArFaceManager.StreamStartedEventHandler OnStreamStarted
Event Type
Type | Description |
---|---|
TofArFaceManager.StreamStartedEventHandler |
OnStreamStopped
Notice on ending of streaming
Declaration
public static event TofArFaceManager.StreamStoppedEventHandler OnStreamStopped
Event Type
Type | Description |
---|---|
TofArFaceManager.StreamStoppedEventHandler |