LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with image control using more than 1 web cam

Hi,
I am using logitech quickcam pro 4000.Actually I want to get image from 3 web cam at a time wich will act as a CCTV.I want to get picture from more than 1 web cam at a time.But,When I start the .vi,than I get image from 1 web cam.I have attached the vi and the demonstration file.
If anyone  has any idea please send me a reply.

(The code was constructed using information from the Logitech Software Development Kit, downloaded from the Logitech web site January 4th 2004.  This package includes the royalty free distribution with the camera driver.

To install the package, download and unzip LabVIEW Logitech UWA.zip and run Setup.exe in the 'redist' folder.  This installs drivers (if not already installed).  Then run LabVIEW and open Logitech Image Acquisition Master.vi.  Click the LabVIEW run button.

Notes for Understanding the Code

[1] The camera is controlled by an Active-X reference from a front panel Acitve-X container that displays the pre-view image.  To create this, create a blank Active-X container on the front panel and select the Active-X Hydra Video Portal class.

[2] Three methods are called, following the Visual Basic guide from Logitech.  The first establishes a connection to the Active-X server.  The status bar is activated in the preview window (EnableUIElements), and we connect a camera (ConnectCamera2).

[3] Here we set the value of property 'EnablePreview' to turn on the preview panel.

[4] We can get the camera description for camera zero here (the first camera connected).

[5] Here we select the video format (64x480 – can change it later).  The next call establishes the preview size by setting property values.  The preview size should be the same as the video format for fastest image acquisition.

[6] We are restricted to saving the picture to a BMP file and then reading it in again.  This is a limitation of the SDK.  After reading the image file we can change it to a JPG if we wish to.

[7] Here we re-read the image file and provide it to ImageDisplay.vi.

Other methods and property values are reasonably self evident.  In LabVIEW, if you right click the Active-X reference terminal on any method, you can create a new method by simply selecting the appropriate one from a list.  The parameters for the method appear automatically and should be reasonably self-evident from the names.  If you want more details, download the SDK from Logitech.

Other methods allow you to make movies in real-time or time-lapse sequences.

Note that you can also monitor Active-X events to detect inputs or parameter changes made elsewhere.  For example it is possible to detect when the button on the camera is pressed.)

Thanks
Kabir

Kabir mamun
PhD Student,DCU
mamunk2@gmail.com
www.iward2010.blogspot.com
Message 1 of 10
(6,037 Views)
Ire, does the activex server allow you to gain references to more than one camera? LabVIEW is purely using this server.
 
Kind regards
 
 
Steven Bird
Applications Engineer
National Instruments
Message 2 of 10
(6,004 Views)
Hi steven,Thanks for your reply.But,would you write to me that what does mean by gain referance?
Thanks
Mamun

Kabir mamun
PhD Student,DCU
mamunk2@gmail.com
www.iward2010.blogspot.com
0 Kudos
Message 3 of 10
(5,993 Views)

Hi,

Steve was talking about the ActiveX server that your Webcam will be using. Fundamentally you need this server to allow you to access more than one webcam, as otherwise you won't be able to access more than one webcam. All LabVIEW will be doing is wrapping over this server so if your server can't handle more than one webcam in the first place then you are going to run into problems.

 

Regards,

 

Peter H.

Applications Engineer.

NIUK.

Message 4 of 10
(5,983 Views)
Hi Peter,
Thanks for your e-mail.And sorry for late.
I have changed my activex server in my labview programme.Current  server name is XVideoOCX.I have attached 1 example.Still I am facing the same problem that I am not getting disply from more than 1 web cam.So would you be able to advice me,what should I do regarding this matter.
Actually,This is a part  of my M.Sc project.I am under pressure.Peter,Please do me  this fevour.

Thanks
Kabir

1 eample from help file:

Video Disply

1. Choose the input mode (Video, Single Image Files, Screen, etc.)

XSetInputMode(0) // This chooses video as input

2. Choose the video device

XSetVideoInput(0) // Choose the first available video input device

3. Initialize XVideoOCX

XInit() // Initialize XVideoOCX

4. Start internal video capture

XStart()

now XVideoOCX should display the live video .... 

5. Stop internal video capture

XStop()

6. Close XVideoOCX

XClose()


Kabir mamun
PhD Student,DCU
mamunk2@gmail.com
www.iward2010.blogspot.com
0 Kudos
Message 5 of 10
(5,948 Views)
Hi Ire,

Peter is out of the office at the moment, and has asked me to answer this post for him.

Basically you will need to contact Logitech to find out if they allow their activeX controls to display from more than one webcam. If Logitech has not provided the functionality to display more than one image, LabVIEW will not be able to display more than one image.

Regards
JamesC
NIUK AE

Message Edited by JamesC on 09-02-2005 04:16 PM

0 Kudos
Message 6 of 10
(5,921 Views)
Ire,

this is a great example. But where can I find the "Logitech UWA.zip".
I have already installed the logitech SDK 1.0. I hoped the included vportal2.dll would do the same but it doesn't
The vi won't found any camera.

Thanks for any help

Yves
0 Kudos
Message 7 of 10
(5,534 Views)
Hi Yves,

Please remember Google is your friend! If you search for "Logitech UWA.zip" you will find documentation at this link but you can remove the PDF filename and you will find the zip file you want here.

Hope this helps

Regards
JamesC
NIUK and Ireland
0 Kudos
Message 8 of 10
(5,500 Views)

Hello James!

Thanks for the links and tips above.

 

I have downloaded the files. And installed the driver. Though, the example, accompanied, doesn't work. I have all the subvi's, but it says : subVI is not executable.

I am using LabVIEW 8.2 

Any idea why this is happening?

Thanks ahead.

Best regards,

Vaibhav

Vaibhav
0 Kudos
Message 9 of 10
(5,101 Views)
Hi Vaibhav,
 
This thread is more than a year old. Please consider creating a new thread for this discussion.
 
Thank You,
Jaidev
Senior Product Manager
National Instruments
0 Kudos
Message 10 of 10
(5,069 Views)