ManoMotion SDK PRO  1.4.4.1
ManoMotion SDK PRO API documentation
ManomotionManager Class Reference

The ManomotionManager handles the communication with the SDK. More...

Inheritance diagram for ManomotionManager:
ManomotionBase

Public Member Functions

void StopProcessing ()
 Stops the SDK from processing. More...
 
void SetManoMotionSettings (ImageFormat newImageFormat, string newLicenseKey)
 Fills in the information needed in the manosettings Struct in order to initialize ManoMotion Tech. More...
 
void SetManoMotionSmoothingValue (Slider slider)
 Sets the ManoMotion tracking smoothing value throught the gizmo slider, the bigger the value the stronger the smoothing. More...
 
void ShouldCalculateSkeleton3D (bool condition)
 Lets the SDK know if it should calculate the Skeleton in 3D or 2D. More...
 
void ShouldCalculateGestures (bool condition)
 Lets the SDK know that it needs to calculate the Gestures. More...
 
void ShouldRunFastMode (bool condition)
 Lets the SDK know if it should run fast mode or not. More...
 
void ShouldRunWristInfo (bool condition)
 Lets the SDK know if it should calculate wrist information. More...
 
void ShouldRunFingerInfo (bool condition)
 Lets the SDK know if it should calculate finger information. More...
 
void ToggleFingerInfoFinger (int index)
 Toggle wich finger do use for the finger information. More...
 
void ShouldRunContour (bool condition)
 Lets the SDK know if it should calculate hand contour. More...
 

Static Public Attributes

static Action OnManoMotionFrameProcessed
 Sends information after each frame is processed by the SDK. More...
 
static Action OnManoMotionLicenseInitialized
 Sends information after the license is checked by the SDK. More...
 
static Action< int, int > OnSkeleton3dActive
 Sends information when changing between 2D and 3D joints. More...
 

Protected Member Functions

void SetResolution (int width, int height)
 Sends the resolution values to the SDK. More...
 
void SetFrameArray (Color32[] pixels)
 Gives instruction where frame pixels are stored. More...
 
void SetMRFrameArray (Color32[] pixels)
 Gives instruction where frame pixels are stored. More...
 
virtual void Awake ()
 
void Start ()
 
override void SetResolutionValues (int width, int height)
 Sets the resolution values used throughout the initialization methods of the arrays and textures. More...
 
override void InstantiateSession ()
 Instantiates the SDK Settings information. More...
 
void InitiateLibrary ()
 Initiates the library. More...
 
override void SetUnityConditions ()
 Sets the Application to not go to sleep mode as well as the requested framerate. More...
 
void Update ()
 
void HandleOrientationChanged ()
 Updates the orientation information as captured from the device to the Session More...
 
void UpdateTexturesWithNewInfo (ManoMotionFrame newFrame)
 Updates the RGB Frame of Visualization Info with the pixels captured from the camera. More...
 
void GetCameraFramePixelColors (ManoMotionFrame newFrame)
 Gets the camera frame pixel colors. More...
 
override void ProcessManomotion ()
 Evaluates the dimension of the pixel color array and if it matches the dimensions proceeds with Processing the Frame. More...
 
override void CalculateFPSAndProcessingTime ()
 Calculates the Frames Per Second in the application and retrieves the estimated Processing time. More...
 
void CalculateProcessingTime ()
 Calculates the elapses time needed for processing the frame. More...
 
void ProcessFrame ()
 Wrapper method that calls the ManoMotion core tech to process the frame in order to perform hand tracking and gesture analysis More...
 
override void Init (string serial_key)
 

Protected Attributes

HandInfoUnity[] hand_infos
 The information about the hand. More...
 
VisualizationInfo visualization_info
 
Session manomotion_session
 The information about the Session values, the SDK settings. More...
 
int _width
 the width of the images processed More...
 
int _height
 the height of the images processed More...
 
int _fps
 
int _processing_time
 
Color32[] framePixelColors
 Frame pixels. More...
 
Color32[] MRframePixelColors
 Frame pixels. More...
 
ManoLicense _manoLicense
 
ManoSettings _manoSettings
 
ImageFormat currentImageFormat
 
- Protected Attributes inherited from ManomotionBase
string _licenseKey
 

Static Protected Attributes

static ManomotionManager instance
 

Properties

Session Manomotion_Session [get, set]
 
static ManomotionManager Instance [get]
 
string LicenseKey [get, set]
 
ManoLicense Mano_License [get, set]
 
ManoSettings ManoSettings [get, set]
 

Private Member Functions

static void processFrame (ref HandInfo hand_info0, ref Session manomotion_session)
 
static void setFrameArray (Color32[] frame)
 
static void setMRFrameArray (Color32[] frame)
 
static void setResolution (int width, int height)
 
static void stop ()
 
static void init (ManoSettings settings, ref ManoLicense mano_license)
 
void HandleManoMotionFrameResized (ManoMotionFrame newFrame)
 Respond to the event of a ManoMotionFrame resized. More...
 
void HandleManoMotionFrameInitialized (ManoMotionFrame newFrame)
 Respond to the event of a ManoMotionFrame being initialized. More...
 
void HandleNewFrame (ManoMotionFrame newFrame)
 Respond to the event of a ManoMotionFrame being sent for processing. More...
 
void HandleAddOnSet (AddOn addon)
 Gets the correct manomotion_session addon from the inputManager More...
 
void InstantiateHandInfos ()
 Initializes the values for the hand information. More...
 
void InstantiateVisualisationInfo ()
 Instantiates the visualisation info. More...
 

Private Attributes

InputManagerBaseClass input_manager
 
bool _initialized
 
float fpsCooldown = 0
 
int frameCount = 0
 
List< int > processing_time_list = new List<int>()
 Stores the processing time values. More...
 
int minIndex = 0
 
int maxIndex = 5
 

Static Private Attributes

const string library = "manomotion"
 

Detailed Description

The ManomotionManager handles the communication with the SDK.

Member Function Documentation

◆ Awake()

virtual void ManomotionManager.Awake ( )
inlineprotectedvirtual

◆ CalculateFPSAndProcessingTime()

override void ManomotionManager.CalculateFPSAndProcessingTime ( )
inlineprotectedvirtual

Calculates the Frames Per Second in the application and retrieves the estimated Processing time.

Implements ManomotionBase.

◆ CalculateProcessingTime()

void ManomotionManager.CalculateProcessingTime ( )
inlineprotected

Calculates the elapses time needed for processing the frame.

◆ GetCameraFramePixelColors()

void ManomotionManager.GetCameraFramePixelColors ( ManoMotionFrame  newFrame)
inlineprotected

Gets the camera frame pixel colors.

◆ HandleAddOnSet()

void ManomotionManager.HandleAddOnSet ( AddOn  addon)
inlineprivate

Gets the correct manomotion_session addon from the inputManager

Parameters
addonThe addon used with the inputManager

◆ HandleManoMotionFrameInitialized()

void ManomotionManager.HandleManoMotionFrameInitialized ( ManoMotionFrame  newFrame)
inlineprivate

Respond to the event of a ManoMotionFrame being initialized.

Parameters
newFrameThe new frame to process

◆ HandleManoMotionFrameResized()

void ManomotionManager.HandleManoMotionFrameResized ( ManoMotionFrame  newFrame)
inlineprivate

Respond to the event of a ManoMotionFrame resized.

Parameters
newFrameThe new frame to process

◆ HandleNewFrame()

void ManomotionManager.HandleNewFrame ( ManoMotionFrame  newFrame)
inlineprivate

Respond to the event of a ManoMotionFrame being sent for processing.

Parameters
newFrameThe new frame to process

◆ HandleOrientationChanged()

void ManomotionManager.HandleOrientationChanged ( )
inlineprotected

Updates the orientation information as captured from the device to the Session

◆ init()

static void ManomotionManager.init ( ManoSettings  settings,
ref ManoLicense  mano_license 
)
private

◆ Init()

override void ManomotionManager.Init ( string  serial_key)
inlineprotectedvirtual

Implements ManomotionBase.

◆ InitiateLibrary()

void ManomotionManager.InitiateLibrary ( )
inlineprotected

Initiates the library.

◆ InstantiateHandInfos()

void ManomotionManager.InstantiateHandInfos ( )
inlineprivate

Initializes the values for the hand information.

◆ InstantiateSession()

override void ManomotionManager.InstantiateSession ( )
inlineprotectedvirtual

Instantiates the SDK Settings information.

Implements ManomotionBase.

◆ InstantiateVisualisationInfo()

void ManomotionManager.InstantiateVisualisationInfo ( )
inlineprivate

Instantiates the visualisation info.

◆ ProcessFrame()

void ManomotionManager.ProcessFrame ( )
inlineprotected

Wrapper method that calls the ManoMotion core tech to process the frame in order to perform hand tracking and gesture analysis

◆ processFrame()

static void ManomotionManager.processFrame ( ref HandInfo  hand_info0,
ref Session  manomotion_session 
)
private

◆ ProcessManomotion()

override void ManomotionManager.ProcessManomotion ( )
inlineprotectedvirtual

Evaluates the dimension of the pixel color array and if it matches the dimensions proceeds with Processing the Frame.

And adds the processing time to the processing_time_list.

Implements ManomotionBase.

◆ setFrameArray()

static void ManomotionManager.setFrameArray ( Color32[]  frame)
private

◆ SetFrameArray()

void ManomotionManager.SetFrameArray ( Color32[]  pixels)
inlineprotected

Gives instruction where frame pixels are stored.

◆ SetManoMotionSettings()

void ManomotionManager.SetManoMotionSettings ( ImageFormat  newImageFormat,
string  newLicenseKey 
)
inline

Fills in the information needed in the manosettings Struct in order to initialize ManoMotion Tech.

Parameters
newPlatformRequires the platform the app is going to be used in.
newImageFormatRequires the image format that ManoMotion tech is going to process
newLicenseKeyRequires a Serial Key that is valid for ManoMotion tech and it linked with the current boundle ID used in the application.

◆ SetManoMotionSmoothingValue()

void ManomotionManager.SetManoMotionSmoothingValue ( Slider  slider)
inline

Sets the ManoMotion tracking smoothing value throught the gizmo slider, the bigger the value the stronger the smoothing.

Parameters
sliderSlider.

◆ setMRFrameArray()

static void ManomotionManager.setMRFrameArray ( Color32[]  frame)
private

◆ SetMRFrameArray()

void ManomotionManager.SetMRFrameArray ( Color32[]  pixels)
inlineprotected

Gives instruction where frame pixels are stored.

◆ setResolution()

static void ManomotionManager.setResolution ( int  width,
int  height 
)
private

◆ SetResolution()

void ManomotionManager.SetResolution ( int  width,
int  height 
)
inlineprotected

Sends the resolution values to the SDK.

◆ SetResolutionValues()

override void ManomotionManager.SetResolutionValues ( int  width,
int  height 
)
inlineprotectedvirtual

Sets the resolution values used throughout the initialization methods of the arrays and textures.

Parameters
widthRequires a width value.
heightRequires a height value.

Implements ManomotionBase.

◆ SetUnityConditions()

override void ManomotionManager.SetUnityConditions ( )
inlineprotectedvirtual

Sets the Application to not go to sleep mode as well as the requested framerate.

Implements ManomotionBase.

◆ ShouldCalculateGestures()

void ManomotionManager.ShouldCalculateGestures ( bool  condition)
inline

Lets the SDK know that it needs to calculate the Gestures.

Parameters
conditionrun or not

◆ ShouldCalculateSkeleton3D()

void ManomotionManager.ShouldCalculateSkeleton3D ( bool  condition)
inline

Lets the SDK know if it should calculate the Skeleton in 3D or 2D.

And gives information to SkeletonManager which skeleton model to display.

Parameters
conditionrun or not

◆ ShouldRunContour()

void ManomotionManager.ShouldRunContour ( bool  condition)
inline

Lets the SDK know if it should calculate hand contour.

Parameters
conditionrun or not

◆ ShouldRunFastMode()

void ManomotionManager.ShouldRunFastMode ( bool  condition)
inline

Lets the SDK know if it should run fast mode or not.

Parameters
conditionrun or not

◆ ShouldRunFingerInfo()

void ManomotionManager.ShouldRunFingerInfo ( bool  condition)
inline

Lets the SDK know if it should calculate finger information.

4 will run the finger_info for the ring finger, 0 is off.

Parameters
conditionrun or not

◆ ShouldRunWristInfo()

void ManomotionManager.ShouldRunWristInfo ( bool  condition)
inline

Lets the SDK know if it should calculate wrist information.

Parameters
conditionrun or not

◆ Start()

void ManomotionManager.Start ( )
inlineprotected

◆ stop()

static void ManomotionManager.stop ( )
private

◆ StopProcessing()

void ManomotionManager.StopProcessing ( )
inline

Stops the SDK from processing.

◆ ToggleFingerInfoFinger()

void ManomotionManager.ToggleFingerInfoFinger ( int  index)
inline

Toggle wich finger do use for the finger information.

0 = off 1 = Thumb 2 = Index 3 = Middle 4 = Ring 5 = Pinky

Parameters
indexint between 0 and 5, 0 is off and 1-5 is the different fingers

◆ Update()

void ManomotionManager.Update ( )
inlineprotected

◆ UpdateTexturesWithNewInfo()

void ManomotionManager.UpdateTexturesWithNewInfo ( ManoMotionFrame  newFrame)
inlineprotected

Updates the RGB Frame of Visualization Info with the pixels captured from the camera.

Field Documentation

◆ _fps

int ManomotionManager._fps
protected

◆ _height

int ManomotionManager._height
protected

the height of the images processed

◆ _initialized

bool ManomotionManager._initialized
private

◆ _manoLicense

ManoLicense ManomotionManager._manoLicense
protected

◆ _manoSettings

ManoSettings ManomotionManager._manoSettings
protected

◆ _processing_time

int ManomotionManager._processing_time
protected

◆ _width

int ManomotionManager._width
protected

the width of the images processed

◆ currentImageFormat

ImageFormat ManomotionManager.currentImageFormat
protected

◆ fpsCooldown

float ManomotionManager.fpsCooldown = 0
private

◆ frameCount

int ManomotionManager.frameCount = 0
private

◆ framePixelColors

Color32 [] ManomotionManager.framePixelColors
protected

Frame pixels.

◆ hand_infos

HandInfoUnity [] ManomotionManager.hand_infos
protected

The information about the hand.

◆ input_manager

InputManagerBaseClass ManomotionManager.input_manager
private

◆ instance

ManomotionManager ManomotionManager.instance
staticprotected

◆ library

const string ManomotionManager.library = "manomotion"
staticprivate

◆ manomotion_session

Session ManomotionManager.manomotion_session
protected

The information about the Session values, the SDK settings.

◆ maxIndex

int ManomotionManager.maxIndex = 5
private

◆ minIndex

int ManomotionManager.minIndex = 0
private

◆ MRframePixelColors

Color32 [] ManomotionManager.MRframePixelColors
protected

Frame pixels.

◆ OnManoMotionFrameProcessed

Action ManomotionManager.OnManoMotionFrameProcessed
static

Sends information after each frame is processed by the SDK.

◆ OnManoMotionLicenseInitialized

Action ManomotionManager.OnManoMotionLicenseInitialized
static

Sends information after the license is checked by the SDK.

◆ OnSkeleton3dActive

Action<int, int> ManomotionManager.OnSkeleton3dActive
static

Sends information when changing between 2D and 3D joints.

◆ processing_time_list

List<int> ManomotionManager.processing_time_list = new List<int>()
private

Stores the processing time values.

◆ visualization_info

VisualizationInfo ManomotionManager.visualization_info
protected

Property Documentation

◆ Instance

ManomotionManager ManomotionManager.Instance
staticget

◆ LicenseKey

string ManomotionManager.LicenseKey
getset

◆ Mano_License

ManoLicense ManomotionManager.Mano_License
getset

◆ Manomotion_Session

Session ManomotionManager.Manomotion_Session
getset

◆ ManoSettings

ManoSettings ManomotionManager.ManoSettings
getset

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