Weird SDK behaviour

Post Reply
JeDi
Posts: 41
Joined: Thu Mar 10, 2011 3:59 am

Weird SDK behaviour

Post by JeDi » Fri Jul 18, 2014 4:24 am

Hi,

I am using the Camera SDK (latest version at the time of writing) in combination with Qt (5.3). I got it to work, but I had to jump to some hoops that I would want more information about.

I have a rig with 6 V120:SLIM cameras, attached to standard USB hubs. These are the steps I do for initialisation:
  • I register myself as listener
  • I wait for initialisation
  • I query the cameras using CameraLibrary::CameraList cameras;. No cameras are added (which they should according to the documentation and sample code). They are added though, when I do camMgr.GetCameraList(cameras);
  • I create a sync module and add all cameras
  • I start all cameras and set their video mode to precision
Then, when I want to start dumping frames, I use AttachListener on the sync module. I don't get any events called from the camera manager listener, and the FrameGroupAvailable method of the sync module listener is called a couple of times and then never again.

So I had to use a couple of workarounds to get the camera SDK to work, but it seems to work in the end:
  • When I want a list of camera, I have to call camMgr.GetCameraList(cameras) otherwise the list isn't populated
  • I use a time now (called every frame) to query for a new frame group (GetFrameGroup) and dump the frame if one is available (and release each frame and the frame group itself afterwards).
I don't really need the camera manager events for now, but I will once I have to make the application robust and production ready.

Does anyone have an idea why I am having these problems? Could it be due to the Qt runloop or something? Has anyone else successfully used the Camera SDK in Qt, without these workarounds?

Greetings,
JeDi

JeDi
Posts: 41
Joined: Thu Mar 10, 2011 3:59 am

Re: Weird SDK behaviour

Post by JeDi » Fri Jul 18, 2014 1:45 pm

Another strange thing: the first frame I capture using the method above, always says there is one camera (with the actual points that I am tracking). All frames after that correctly give me all cameras.

beckdo
NaturalPoint Employee
NaturalPoint Employee
Posts: 520
Joined: Tue Jan 02, 2007 2:02 pm

Re: Weird SDK behaviour

Post by beckdo » Tue Jul 22, 2014 11:32 am

Are you using mingw or MSVC as your compiler?

JeDi
Posts: 41
Joined: Thu Mar 10, 2011 3:59 am

Re: Weird SDK behaviour

Post by JeDi » Sun Aug 03, 2014 6:43 pm

I use MSVC. Do the cameras even work with MingW? That would be interesting :-)

beckdo
NaturalPoint Employee
NaturalPoint Employee
Posts: 520
Joined: Tue Jan 02, 2007 2:02 pm

Re: Weird SDK behaviour

Post by beckdo » Wed Aug 06, 2014 2:13 pm

Ok, great MSVC is the way to go of course. We don't support MingW.

We use QT here internally for many internal tools. I have not experienced any of the things you're describing. I'm not sure why you're seeing this but depending how you've coded against the Camera SDK, there's certainly the possibility that something is causing issues.

If you'd like me to review your camera code, please send it to support and I will review it myself and give feedback. I might see something that's causing your issues.

Thx,
Doug

JeDi
Posts: 41
Joined: Thu Mar 10, 2011 3:59 am

Re: Weird SDK behaviour

Post by JeDi » Wed Aug 06, 2014 2:24 pm

OK, thanks! One thing is that I use VS2013, but I am also using the camera SDK in another application where I do get the events, and also using VS2013.

One other thing that I can think of is the fact that in the same application, I also link in the Motive SDK. I don't initialise tracking tools though.

Post Reply