hi. i'm currently unable to connect to a camera, with both my own code and the provided sample code and visualtest.exe
visualtest.exe pops up a dialog with "Please connect a camera before running this application"; SimpleCameraList.exe does not succeed either.
the camera work fine with TrackingTools
my setup is:
- Windows7 (64bit)
- TrackingTools 2.3.2
- Camera: OptiTrack S250 M000994
i have installed the Camera SDK on my developer machine, which is _not_ the machine connected to the camera.
my development machine is:
- Windows7 (64bit)
- VisualStudio 2008 Professional Edition
when installing i simply ignored the warning about VS2005 service pack... not being installed.
after i upgraded the projects from vs2005 to vs2008 they compiled fine (well, CameraList/Release did not work before i removed glaux.lib and added cameralibrary.lib and searchpaths)
i then copied all the stuff to the deployment machine, added \lib\ to the PATH (so cameralibrary.dll is found) and started the programs: no luck.
so i started TrackingTools, the camera shows just fine.
if i run SimpleCameraList.exe while TrackingTools are showing the frames, the image disappears and the fan stops and the id-leds on the cam changes from ". 1" to " ."; once the SimpleCameraList releases the CameraManager, the image reappears in TrackingTools and the fan and leds come up again)
any hints what is going wrong?
no cameras detected
Re: no cameras detected
just for completeness sake, the SimpleCameraList.exe displays:
Waiting for cameras to spin up...complete
Cameras:
None
OptiHubs:
None
return key to exit...
and the CameraSDK version i installed is: OptiTrack_Camera_SDK_1.1.1.Final.exe
Waiting for cameras to spin up...complete
Cameras:
None
OptiHubs:
None
return key to exit...
and the CameraSDK version i installed is: OptiTrack_Camera_SDK_1.1.1.Final.exe
Re: no cameras detected
hmm, it's getting weirder...
the Samples still don't find a camera.
however, my own code (if it doesn't crash) lists both attached cameras. hooray.
nevertheless, both CameraManager::X().GetCamera() and CameraManager::X().GetCamera(cameralist[0].UID()) return 0x0
i also tried to get a "virtual camera" (whatever that is) via CameraManager::CameraFactory(0), but that returned 0x0 as well.

the Samples still don't find a camera.
however, my own code (if it doesn't crash) lists both attached cameras. hooray.
nevertheless, both CameraManager::X().GetCamera() and CameraManager::X().GetCamera(cameralist[0].UID()) return 0x0
i also tried to get a "virtual camera" (whatever that is) via CameraManager::CameraFactory(0), but that returned 0x0 as well.

-
- Posts: 1896
- Joined: Tue Feb 01, 2011 8:41 am
- Location: Corvallis, OR
Re: no cameras detected
With ethernet cameras, it is possible that the startup sequence and PoE negotiation can take a longer than expected amount of time. If the program is deciding during that period that the camera is not there, it can fail to detect ethernet cameras. I would recommend putting a statement at the beginning of your program that checks the camera count, and waits until it is either greater than 0 or 20 seconds has passed. This should allow time between the initialization of the camera manager and the continuation of the program for the cameras to properly negotiate their connection.
Re: no cameras detected
thanks for your reply.
however, it seems that this is not the case here:
my ethernet cameras are properly detected, at least CameraList enumerates them as expected.
the weird thing is, that even after i got a valid UID and serialnumber for the attached camera, CameraLibrary::CameraManager::X().GetCamera() returns a NULL-pointer.
also, the program i'm working on is fully interactive, so i can wait a deliberately long time between initialization and a call to CameraList (which works) or X().GetCamera() (which never succeeded yet)
however, it seems that this is not the case here:
my ethernet cameras are properly detected, at least CameraList enumerates them as expected.
the weird thing is, that even after i got a valid UID and serialnumber for the attached camera, CameraLibrary::CameraManager::X().GetCamera() returns a NULL-pointer.
also, the program i'm working on is fully interactive, so i can wait a deliberately long time between initialization and a call to CameraList (which works) or X().GetCamera() (which never succeeded yet)
Re: no cameras detected
hmm, so after i introduced a "Sleep(5000);" the samples finally work!
i still have a huge problem using the cameraSDK in my real-world application, but i will createanother issue for that.
thanks so far.
i still have a huge problem using the cameraSDK in my real-world application, but i will createanother issue for that.
thanks so far.