LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Capturing an Image from a webcam in LabVIEW without Vision toolbox

Solved!
Go to solution

I'm trying to take a picture through LabView and export the image to Matlab. I dont have the vision toolbox.

I'm looking for guidance in how to do this.

Thanks  

0 Kudos
Message 1 of 20
(6,015 Views)

Basic question: What kind of camera is it? The absolute standard format for pictures is 2D-uInt8-Array for grayscale and 2D-uInt32 for RGB-pictures.

 

First you need to know, how to get the image from the camera.

0 Kudos
Message 2 of 20
(5,998 Views)

The webcam is a logitech C170

0 Kudos
Message 3 of 20
(5,991 Views)

That's a tough thing. The vision-package from NI supports the gigE-standard. Since this is no gigE-camera (at least I guess so), this probably wouldnt help you anyway. At least as far as I know.

 

This is a standard webcam, so if it is recognized as a webcam under windows, it must be possible to access it with any generic webcam tool. If you find a dll which gives you back one picture, you can use it.

 

My approach would be: Find some c-code which captures one image. Package it into a dll. Access the dll from LabView.

0 Kudos
Message 4 of 20
(5,985 Views)

Take a look this post:

2 hours finished the webcam program:

https://forums.ni.com/t5/LabVIEW/2-hours-finished-the-webcam-program/m-p/782481#M357701

 

 

George Zou
Message 5 of 20
(5,978 Views)

 

Hi zou

I had a look on the forum on you linked me. I opened VI (linked below) when I run the VI i get a live image but unable to take a picture. I'm confused on where the Boolean switch is wired to.

https://forums.ni.com/ni/attachments/ni/170/357701/1/Webcam.vi

0 Kudos
Message 6 of 20
(5,972 Views)

@PhysicsFTW wrote:

I opened VI (linked below) when I run the VI i get a live image but unable to take a picture. I'm confused on where the Boolean switch is wired to.

https://forums.ni.com/ni/attachments/ni/170/357701/1/Webcam.vi


It isn't wired.  For reasons that escape me (although the author of the LabVIEW 8.5 code may be a beginner with LabVIEW, which would explain the extremely awkward coding practices).  There is no need for a Stacked Sequence, nor a Timed Loop.  Error lines should be used to serialize things, and the Stop placed (appropriately) in an Event loop to "Exit when Stop pushed", without the need for polling.

 

If you are really interested in working with Images, this is so much easier with IMAQdx.

 

Bob Schor

 

Oops -- I answered the wrong question.  When you said "Boolean switch", I thought you meant the Boolean control marked "Stop".  I didn't notice the totally unused, misplaced, and unnecessary Boolean control marked "Boolean".  Just delete it, as the person who posted this should have done ...

0 Kudos
Message 7 of 20
(5,955 Views)

You wouldn't know of any other method 

0 Kudos
Message 8 of 20
(5,926 Views)

@PhysicsFTW wrote:

I'm trying to take a picture through LabView and export the image to Matlab. I dont have the vision toolbox.

 


So why not use directly some method to read the picture in Matlab? I'm pretty sure Matlab has some toolbox that supports vision acquisition. Might be not free either, but well, you know the saying, you get what you pay for.

Rolf Kalbermatter
Averna BV
Message 9 of 20
(5,920 Views)

Hi Rolf,

Its part of a larger project that has to be done on labview. I can get a live video on the VI linked but unable to get a pciture. I'm confused on how to amend it for that purpose.

https://forums.ni.com/ni/attachments/ni/170/357701/1/Webcam.vi

0 Kudos
Message 10 of 20
(5,914 Views)