aeroTAP evo API is designed to use to develop touchless interface enabled application running with aeroTAP evo Touchless Interface.
Your application can show own designed cursor by disabling aeroTAP evo's virtual cursor.
Setting |
Description |
[Welcome] Tab Guidance OFF |
Turn off the aeroTAP evo guidance display feature. You can get existence of operator via aeroTAP API. Then you can show your own guidance. |
[Advanced]-Tab | Turn off the Multi-hand mode |
[Advanced]Tab Click Action NONE |
If your application can control Click action, turn off aeroTAP evo's click action |
[General]Tab Preview OFF |
No preview window. You application can retrieve camera view. |
Color image, depth image, aeroTAP evo status data structure
Allocate the following data. TAPINFO tapinfo value provides palm tracking information from aeroTAP evo.
aeroTAP evo Palm tracking data definitionAPI |
Description |
Retrieve aeroTAP evo status information typedef BOOL(__cdecl *AERO_GetAeroState)(void *lpszBuf); |
You can obtain current aeroTAP evo status into AEROSTAT structure Parameter: Address of AEROSTATE data structure Return value: Success TRUE , error FALSE bActive[2] If the point is valid(TRUE)/not-valid(FALSE) bObjectType[2] Type of point 0Open Palm.1 Close Palm POINT3i pos[2] Position of palm (X,Y,Z) in current camera resolution bPerson existence of operator TRUE)/無(FALSE) posG Center position of the operator(X,Y,Z) *Salce is 320x240(Left Top X=0,Y=0) *aeroTAP evo can track maximum two points |
int nCamHeadInclined = 10; // Degree int nCamHeadPositionY= 200; // cm POINT3F posHead =aeroState.posHead; //obtain head top position in 3D double inclinedR = nCamHeadInclined*M_PI/180; // height cm posHead.y = nCamHeadPositionY - posHead.z*sin(inclinedR)/10 - posHead.y*cos(inclinedR) /10; // diatance from camera cm posHead.z = posHead.z*cos(inclinedR) / 10; |
AEROSTATE aeroState;
aeroState.nSize = sizeof(AEROSTATE);
if (g_pAERO_GetAeroState && g_pAERO_GetAeroState(&aeroState))
{
CString sTmp;
// Operator info
sTmp.Format(_T("%s"), aeroState.bPerson ? _T("Exist") : _T("N/A"));
GetDlgItem(IDC_STATIC_OPERATOR)->SetWindowTextW(sTmp);
if (aeroState.bPerson)
sTmp.Format(_T("x: %d , y: %d, z: %d"), (int)aeroState.posG.x, (int)aeroState.posG.y, (int)aeroState.posG.z);
else
sTmp = _T("N/A");
GetDlgItem(IDC_STATIC_OP_POS)->SetWindowTextW(sTmp);
// Palm Tracking info
sTmp.Format(_T("%s"), aeroState.bActive[0] ? _T("Tracking") : _T("N/A"));
GetDlgItem(IDC_STATIC_PALM)->SetWindowTextW(sTmp);
if (aeroState.bActive[0])
sTmp.Format(_T("x: %d , y: %d, z: %d"), (int)aeroState.pos[0].x, (int)aeroState.pos[0].y, (int)aeroState.pos[0].z);
else
sTmp = _T("N/A");
GetDlgItem(IDC_STATIC_PALM_POS)->SetWindowTextW(sTmp);
How to use sample code:
1. Create new project in Unity and save it.
2. Copy aeroTAP_CAM.dll, eSPDI_DM.dll to the project folder Assets/Plugins/x86_64.
3. Clock Unity Project Assets/Plugins/x86_64/aeroCAM_DLL, and setup Inspector(OS:Windows, CPU:x86_64 )
4. GameObject->3D Object -> Cube create BOX (any object)
5. Select New Script from Inspector の[Add Component] button, create aeroTAP from [Create and Add]
6. Edit aeroTAP.cs (Copy/past the code below)
7. Run build by Ctrl+B
*Only check build works OK
8.If build works OK, then run aeroTAP evo and run created Unity project
*You an check if Unity detecting operator , palm information.
[aeroTAP.cs]
using System.Collections;