LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do i connect to a standard USB device (webcam) plugged into the PC usbport?

I want to use frames or streams i grab from a standard webcam on my usb. sofar i can only diplay them with an activeX control, but i want to connect to the device directly! The Imaq devices supported by IMAQ vision etc are to good (and to expensive) for my purpose so i want to use the cheap usb cams
0 Kudos
Message 1 of 9
(5,491 Views)
Hello,

All devices on the USB accept hardware-level commands differently, just like devices on the PCI bus. This means that there are no "USB VIs" that simply allow you to communicate to a USB device. The USB is different from the standard Serial port in this regard because almost all devices that connect to Serial communicate via the transmission of ASCII strings.

Anyway, if an ActiveX control is supplied with your USB camera, this is probably the easiest way to communicate with your camera.

I hope this information helps. Good luck with your application and have a pleasant day.

Sincerely,
Darren N.
NI Applications Engineer
0 Kudos
Message 2 of 9
(5,495 Views)
Inventeering.com has a ActiveX Control that interfaces to USB Cameras. LabVIEW examples are there also.
0 Kudos
Message 3 of 9
(5,491 Views)
Hi Darren,

I want to capture image in LABVIEW using a wireless usb security camera. I heard about something called activeX. I would like to know which object do I call in the 'select activeX object'. The did install the exe file provided by the manufacturer for the directX drivers on my pc. I dont know how to proceed further. Can you shed some light on my problem? I would appreciate for your time. Thank you.


Regards,

Dushyant
0 Kudos
Message 4 of 9
(5,020 Views)

Hi Dushyant,

You can use the Automation Open VI (From the Functions Palette go to Connectivity » Active X » Select Active X Class) in LabVIEW.  Then, right click on that VI and Select Active X Class.  From here you will need to select the Active X Class of your USB camera.  Now you can connect Property Nodes and Invoke Nodes to access the properties and methods of this class.  Please let me know   Please take a look at this, and let me know if you have any questions. 

Best of luck on your application and have a wonderful day!!

Regards,
Ching P.
DAQ and Academic Hardware R&D
National Instruments
Message 5 of 9
(5,004 Views)
Hi Ching,

              Thanks a lot for the reply. I am having a trouble finding the activeX class for my camera. How would I know which class belongs to the camera I am working on? I tried calling the manufacture, but they told me that the activeX are directly configured by the windows. Actually, I didnt really understood him. I have the following  camera "http://www.grandtec.com/webcam.htm". Any help is appreciated.


0 Kudos
Message 6 of 9
(4,997 Views)
 

Hi Mozill,

You will need to contact the camera manufacturer for the name of the ActiveX class.  Though LabVIEW provides an ActiveX interface, it does not identify which class relates to a specific product. 

If your camera meets the requirements and you have the NI Vision Development Module, you will be able to use our NI-IMAQ for USB Driver.

Please let me know if you have any further questions.  Best of luck on your application, and have a great weekend!!!

 
Regards,
Ching P.
DAQ and Academic Hardware R&D
National Instruments
Message 7 of 9
(4,977 Views)

Dear Ching,

I did get hold of the  activex drivers for my usb web camera. I discovered if from the ksproxy.ax, kstvtune.ax, kswdmcap.ax, ksxbar.ax, NUVision.ax, and vidcap.ax. However, when I try to browse the same drivers through the 'select ActiveX Class' shortcut menu on 'automation  open' box, I cant find them. So, I tried browsing them through the window/system32/  folder. I do see the .dll files, .ax files,  etc, but  I am not sure if I can use them.

Other question I have is about your last comment on use of "NI Vision Development Module" and "NI-IMAQ for USB Driver".
I would like to know if I can just donwload the addon as free; because I have heard about the vision software for which I have to pay very high price. I am totally new to the vision area of the LABVIEW.  I would really appreciate if you give me a step by step procedure.
Thank you for your time.



 
0 Kudos
Message 8 of 9
(4,955 Views)

Hi Mozill,

If you would like to call the dll files that came with your camera, you can use the Call Library Function Node.  To get more information on this, please look at the LabVIEW Help under Call Library Function Node.  The functions that you call using this Call Library Function Node should be documented by the camera manufacturer.

As for the .ax files, these seem to be the files from the DirectShow Filter.  There is no way to access these files directly in LabVIEW.  You may be able to access them through the dll’s that you have been given.

Though the NI-IMAQ for USB Driver is a free download, it will not work without the NI Vision Development Module (which must be purchased). 

Please let me know if you have any further questions.  Best of luck on your application, and have a great day!!

Regards,
Ching P.
DAQ and Academic Hardware R&D
National Instruments
Message 9 of 9
(4,936 Views)