02-11-2011 02:13 PM
Hello,
I have 2 smart cameras NI 1762 and I want to let them communicate together then I will try to do traingulation technique to calculate the fepth of an object?
I don't know how I can the both cameras working in same time and how to get two images from them. Also, Is there any sample code for traingulation?
Thanks,
Mahmoud
02-14-2011 08:59 AM
Hi Mahmoud,
I don't know if this helps, but I found these two links on triangulating object locations: http://zone.ni.com/devzone/cda/tut/p/id/8176 and Stereo (ppt file)
I'm not quite sure how to synchronize camera acquisition, but you could probably get pretty close if trigger your acquisition using the digital I/O ports. For example, one of the cameras could set a digital out pin to high to trigger the other camera to acquire an image. You could probably also work out an added delay in one of the cameras acquiring in order to better synchronize the images.
Cheers,
Karl M.
02-14-2011 04:15 PM
Thanks, the documents is too useful.
Actually, now I can see both cameras when I open vision builder (I used switch). but until now I can choose one camera then capture image. then I have to choose another camera and capture another image. My question, is there any possibly if I can make the both cameras captures separate images in same time? should I use lab view or vision builder is enough? I need think done then I can do traingulation technique.
02-15-2011 09:34 AM
I don't know that you can acquire two images simultaneously in Vision Assistant. Maybe you can, but I've never tried. However, I know you can get images at the same time using LabVIEW.
See this manual on the smart camera to setup triggering on your cameras to acquire images simultaneously: http://www.ni.com/pdf/manuals/372429b.pdf
The code to grab the image would be running on the camera in Real-Time. In order to compare the images to do some triangulation, you'll need to transfer one or both of the images. I recommend using Network Streams. Here is an example (though it uses IMAQ-dx instead of IMAQ): http://decibel.ni.com/content/docs/DOC-12974
Here's another "quick start" manual that has a better table of the pinouts: http://www.ni.com/pdf/manuals/372351c.pdf
The code could something like:
Code on Camera A: Waits for trigger to acquire image, once acquired, sends image to host for analysis
Code on Camera B: Generates trigger (either on a regular interval or based on a network command you send) that causes both Camera A and B to acquire. Sends image to host for analysis (or analyzes image along with Camera A's image).
Code on Optional Host: Sends network command to Camera B to generate trigger. Receives image from Camera A and Camera B. Analyzes image and performs triangulation math.
-Karl
02-17-2011 05:36 PM
Hello,
Appreciated you help, for this manual http://www.ni.com/pdf/manuals/372429b.pdf , I found triggring issue but there is no details how I connect both cameras
together to computer?
Also, When I connect smart camera and open vision builder I can see the cameras but I still do not know how to see my camera when I open LabView.
is there any document for that because I think you told me I can programe it through Labview software not vision builder.
Thanks,
Mahmoud
02-21-2011 11:00 AM
Hi Mahmoud,
If you're having trouble connecting to your Smart Camera or triggering, please feel free to contact us by calling 1-866-ASK-MYNI (1-866-275-6964) or posting on our product specific discussion forums.
Cheers,
Olivia