Search found 19 matches

by symfonysid
Fri Apr 09, 2010 11:28 am
Forum: OptiTrack SDK
Topic: creating a callback method in C++
Replies: 20
Views: 15773

Re: creating a callback method in C++

I can't remember. My own code was adapted from an OptiTrack example, and I carried that over from one of their examples.
by symfonysid
Fri Apr 09, 2010 8:31 am
Forum: OptiTrack SDK
Topic: creating a callback method in C++
Replies: 20
Views: 15773

Re: creating a callback method in C++

Yes, it should be. You must be missing something. I can remember having the same problem. If I remember correctly, in my case I left out these lines before OptiTrackCamera::instantiateCOMObjects():

CComModule _Module;

BEGIN_OBJECT_MAP(ObjectMap)
END_OBJECT_MAP()
by symfonysid
Fri Apr 09, 2010 7:50 am
Forum: OptiTrack SDK
Topic: creating a callback method in C++
Replies: 20
Views: 15773

Re: creating a callback method in C++

<t>That's a global variable (the only one being used in the application) for the window handle. Look at the bottom of SurfaceTrackerApplication.cpp. It's defined like this:<br/> <br/> HINSTANCE g_hInstance;<br/> <br/> int __stdcall WinMain ( HINSTANCE hInstance,<br/> HINSTANCE hPrevInstance,<br/> LP...
by symfonysid
Tue Apr 06, 2010 10:14 am
Forum: OptiTrack SDK
Topic: creating a callback method in C++
Replies: 20
Views: 15773

Re: creating a callback method in C++

I used a C++ callback in a non MFC application. The source code is available at: http://surfacetracker.sourceforge.net. Look at the class OptitrackCamera.
by symfonysid
Tue Jun 23, 2009 5:01 am
Forum: General OptiTrack Support
Topic: camera driver stops delivering frames in greyscale mode
Replies: 3
Views: 1966

Re: camera driver stops delivering frames in greyscale mode

<t>Hi Birch,<br/> <br/> Thank you for your detailed response! I appreciate it.<br/> <br/> Unfortunately, I think your basic premise that it's a through put problem is wrong. I'm only taking one greyscale image every second. I take 100 blob images, switch into greyscale mode to take 1 greyscale image...
by symfonysid
Mon Jun 22, 2009 9:14 am
Forum: General OptiTrack Support
Topic: camera driver stops delivering frames in greyscale mode
Replies: 3
Views: 1966

camera driver stops delivering frames in greyscale mode

<t>Hi,<br/> <br/> I've been working on an unusual application using an Optitrack camera. The application uses the camera to track the motion of fingers on a surface using its blob tracking, but every 100 frames the application switches the camera into greyscale mode to get a greyscale image that it ...
by symfonysid
Thu Jan 29, 2009 2:43 am
Forum: OptiTrack SDK
Topic: creating a callback method in C++
Replies: 20
Views: 15773

Re: creating a callback method in C++

<t>Hi Yoshi,<br/> <br/> Yes, I had to dig around to find WinMain in GUI toolkit I was using. (It was being called in a macro.) But once I found it, I passed the HINSTANCE variable it was being given to _Module.Init, and now, the callback is working fine! And I'm finally getting 100 frames/sec again!...
by symfonysid
Wed Jan 28, 2009 11:52 am
Forum: OptiTrack SDK
Topic: creating a callback method in C++
Replies: 20
Views: 15773

Re: creating a callback method in C++

<t>Hi Yoshi,<br/> <br/> No. I didn't. I just tried to put them in, but I had some problems, because m_hInstance wasn't declared. In your app m_hInstance is declared in the super class CWinApp, but I'm not using MFC to create the user interface, and I don't have any class that is derived from CWinApp...
by symfonysid
Mon Jan 26, 2009 3:07 am
Forum: OptiTrack SDK
Topic: creating a callback method in C++
Replies: 20
Views: 15773

Re: creating a callback method in C++

Hi Doug,

I haven't heard from you in about a week and a half now. Does this mean that you're working on putting together a less convoluted sample for me?

Thanks,
Greg
by symfonysid
Tue Jan 13, 2009 2:56 am
Forum: OptiTrack SDK
Topic: creating a callback method in C++
Replies: 20
Views: 15773

Re: creating a callback method in C++

<t>Hi Doug,<br/> <br/> Yes. I am particularly invested in getting an event callback. I was polling for frames, but I realized that the timer I was using to poll was only triggering every 15-20 msecs even though I set it to trigger every 5 msecs. Although there might be another way around that proble...