- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am trying to write a test touchless program in c++, but It appeared some problems.
code as follows:
class UXEventHandler : public PXCTouchlessController::UXEventHandler {
public:
virtual void PXCAPI OnFiredUXEvent(const PXCTouchlessController::UXEventData *uxEventData) {
switch (uxEventData->type) {
case PXCTouchlessController::UXEventData::UXEvent_StartZoom:
// handle start zoom
break;
case PXCTouchlessController::UXEventData::UXEvent_Zoom:
// handle continued zoom
break;
case PXCTouchlessController::UXEventData::UXEvent_EndZoom:
// handle end zoom
break;
// handle all events
}
}
};
struct ProfileInfo : public PXCTouchlessController::ProfileInfo{
PXCHandModule *handModule;
Configuration config;
};
// Initialize the Sense Manager
PXCSenseManager *senseManager = PXCSenseManager::CreateInstance();
// Enable hand analysis in the multimodal pipeline
senseManager->EnableTouchlessController();
// Initialize the pipeline
senseManager->Init();
// Get an instance of Touchless Controller
PXCTouchlessController *touchlessController = senseManager->QueryTouchlessController();
// register fozr ux events
UXEventHandler eventHandler;
touchlessController->SubscribeEvent(&eventHandler);
// Configure Touchless Controller
ProfileInfo profInfo;
touchlessController->QueryProfile(&profInfo);
profInfo |= (PXCTouchlessController::ProfileInfo::Configuration_Allow_Selection | PXCTouchlessController::ProfileInfo::Configuration_Enable_Injection);
touchlessController->SetProfile(&profInfo);
// main processing loop
while (senseManager->AcquireFrame(true) >= PXC_STATUS_NO_ERROR) {
senseManager->ReleaseFrame();
}
// Release resources
senseManager->Release();
But this place has errors:
no matches for "|=" operators Operands of type: Profieinfo |= int
profInfo |= (PXCTouchlessController::ProfileInfo::Configuration_Allow_Selection | PXCTouchlessController::ProfileInfo::Configuration_Enable_Injection);
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you looked at touchless C# sample code? You can find it @C:\Program Files (x86)\Intel\RSSDK\framework\CSharp\FF_TouchlessControllerViewer.cs and C:\Program Files (x86)\Intel\RSSDK\framework\CSharp\FF_TouchlessListBox.cs. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can TouchlessController be implemented by mfc?
I met with difficulties with SDK
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page