Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

3D camera from SoftKinetic

Hello. 
I have bought a DepthSense 311 ToF camera from SoftKinetic. 
It comes with an SDK, where I can view all of the depth images and the RGB image. 
It is also possible for me to export a .csv file that contains a matrix corresponding to the resolution of the depth image (160x120), where the value of each pixel is the distance towards the point it measures in mm (see attachment for an example). 
However, I need to be able to obtain this depth information by the use of LabVIEW directly. It could be okay if I could just set up LabVIEW to control the SDK from SoftKinetic. 

Does anyone have experience with the DS311 camera in LabVIEW?

Thanks in advance. 

René

0 Kudos
Message 1 of 15
(7,170 Views)

Hello,

 

the SDK should have a .dll or .NET support? You should be able to call the functions/methods in Labview directly.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 2 of 15
(7,167 Views)

True, there actually are some .dll's. 
Have you tried it/do you know if it is indeed possible to do it like this?

0 Kudos
Message 3 of 15
(7,159 Views)

Hello,

 

I do not  have any information about the .dll's so it's hard to say anything.

You should first read the documentation and if that doesn't help, contact the developer of the SDK and sort things out directly.

 

Best regards,

K

 

 


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 4 of 15
(7,151 Views)

Hello Rene,

 

What have you already tried based on their SDK?

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 5 of 15
(7,110 Views)

I tried using their commandline tool (DepthSenseBenchmark.exe), but apparently it is only capable of exporting data about the frames, and save that as a .csv file, and not export an entire frame. 
I have also tried looking into the .dll's that are located in the installation folder, by using the call library function node in LabVIEW. However, it seemed to me as a dead end (or maybe I'm just not familiar with this function, as I haven't tried it before). 
Then I contacted SoftKinetics helpdesk, and they could offer a Matlab bridge. However, I don't have Matlab available. 

I also tried to look at the C++ sample which is provided, the consoleDemo code. Buuut this is definitely not my cup of tea, and I came up empty. 
Have you gotten any experience with this kind of camera?

0 Kudos
Message 6 of 15
(7,109 Views)

Hello René,

 

Are you able to share what you have tried?

What is going wrong?

Do you get errors?

Do you have a Programmers Reference or any other manual concerning this SDK?

 

I personally do not have any experience with this camera, but we (the forum) could assist you in trying to use the DLLs.

 

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 7 of 15
(7,099 Views)

Hi,

 

I briefly looked at the SDK and it seems like you would have to create a interface DLL that encapsulate their code to call it from LabVIEW and retrieve images and 3D data. There does not seem to be an easier way.

Just out of curiosity, what is your application?

0 Kudos
Message 8 of 15
(7,090 Views)

It seems that we got it figured out, we are slowly approaching a solution. The included C++ sample code has been modified and then it was possible to interface to LabVIEW. 

 

The application is to measure some objects. 
However, I might be need some input as how to measure distances. 
The output from the camera is the distance towards the point that is being measured. In order to measure for instance a horizontal dimension in the image, am I right
that I would need to create a mathematical model that would tell me that at for instance 680 mm, 1 pixel = 5 mm?

0 Kudos
Message 9 of 15
(7,059 Views)

Hello,

 

you could use a pinhole camera model to calculate the two remaining spatial coordinates for each depth value:

 

X = Z*(u-cx) / fx,

Y = Z*(v-cy) / fy,

 

where (u,v) is the image coordinate of the query point and fx and fy is the respective focal distance of the camera in pixels. cx and cy represent the location of the image center. You would need to calibrate the intrinsic parameters of the camera, but that is fairly simple. In the equations above, no lens distortion is considered. If you want to consider lens distortion you need to use:

 

X = Z* (((u-cx) / fx) + du),

Y = Z* (((v-cy) / fy) + dv),

 

where du and dv are the values of optical correction (based on the model used).

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
Message 10 of 15
(7,056 Views)