Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

usb camera image to array

Solved!
Go to solution

Dear Labview Experts,

 

I have a USB camera and I'd like to use labview to do a few simple image manipulation algorithms, problem is I don't have Vision Development / Vision Assistant modules. Can I extract a pixel array from this device via labview without these modules? Just need a 2d array of pixel values...thanks

0 Kudos
Message 1 of 5
(3,324 Views)
Solution
Accepted by topic author ledsrcool

If you want to do it all in LabVIEW then you're going to have to purchase the Vision Acquisition Software.  You could then acquire the image, save it to a file, and then use the Read *image* File.vi on the Graphics Formats palette to read the image in as a pixmap cluster.  You can then use the Unflatten Pixmap.vi to produce a 2D array of image data.  If you don't need to acquire in LabVIEW, then save the image as a PNG, BMP, or JPG and then do the same thing.  Once you have the image array you can perform calculations just as you would any other data array.

Vision and Motion Enthusiast
Certified LabVIEW Associate Developer
0 Kudos
Message 2 of 5
(3,318 Views)

Thanks for the help, that's all I needed. Will probably start looking at the Vision acquisition software then as it would be more useful for my purposes to do everything through LabVIEW.

0 Kudos
Message 3 of 5
(3,315 Views)

I agree that you need Vision Acquisition Software to get images from the camera.  The rest is overly complex, though.  After acquiring an image, just use ImageToArray to convert the image to a 2D array.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 4 of 5
(3,312 Views)

Bruce,

 

You're correct, in the help it says that ImagetoArray is part of VDM, but I'm pretty sure it is included with the VAS package as well.  If so that would be a much simpler process. 

Vision and Motion Enthusiast
Certified LabVIEW Associate Developer
0 Kudos
Message 5 of 5
(3,309 Views)