CLEyeMulticam DestroyCameraInstance does not release Handle
Posted: 22 March 2013 09:52 AM   [ Ignore ]
New Member
Rank
Total Posts:  1
Joined  2013-03-11

Hi,

first off, thanks for this great sdk.

Im trying to use the camera to track an object and output the values into matlab. For this to work, i need to set several parameters before the matlab simulation starts. Since i need the image from the camera to tune the parameters i devised the following solution:

I start a cofiguration program, that creates a camera instance, shows me the image and allows me to set the parameters.

Then i start the matlab simulation which basically loads a custom dll.

The dll notifies the config program via a named pipe.

The config program destroys the camerainstance and notifies the dll when done.

The dll then tries to create a camerainstance, but fails.

It turns out, that once a process creates a CameraInstance, it needs to be killed before another process can create a CameraInstance, even when the original instance has been destroyed.

With ProcessExplorer i found out, that the SDK creates a Handle, that is not closed when destroying the CameraInstance. Obviously once the process dies, the Handle dies as well. But it prevents me from handing over the interface to another process.

Any idea?

Regards
Martin

Profile
 
 
Posted: 23 March 2013 02:24 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  585
Joined  2009-09-17

Hi,

Simple question comes to mind: Why don’t you put camera settings code into a single dll that matlab loads (have something like settings ui where you can set all the parameters)? Then you will not any issues.
The SDK dll was made to be used by a single process. However the scenario you describe should work as long as only one process has a camera driver open. Are you running any software like Skype etc, that might hold a handle to the camera?

Alex

Mad Martin - 22 March 2013 09:52 AM

Hi,

first off, thanks for this great sdk.

Im trying to use the camera to track an object and output the values into matlab. For this to work, i need to set several parameters before the matlab simulation starts. Since i need the image from the camera to tune the parameters i devised the following solution:

I start a cofiguration program, that creates a camera instance, shows me the image and allows me to set the parameters.

Then i start the matlab simulation which basically loads a custom dll.

The dll notifies the config program via a named pipe.

The config program destroys the camerainstance and notifies the dll when done.

The dll then tries to create a camerainstance, but fails.

It turns out, that once a process creates a CameraInstance, it needs to be killed before another process can create a CameraInstance, even when the original instance has been destroyed.

With ProcessExplorer i found out, that the SDK creates a Handle, that is not closed when destroying the CameraInstance. Obviously once the process dies, the Handle dies as well. But it prevents me from handing over the interface to another process.

Any idea?

Regards
Martin

Profile
 
 
 
 


RSS 2.0     Atom Feed