LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying video images to array

Solved!
Go to solution

My goal is to display the video feed of my webcam both as an actual image as well as an array at a controllable framerate. I don't know how to control the latter, and the first one didn't work out as well.

My VI can be seen here:

Labview display not working.png

I tried turning it into a series of elements and then that into an array. That can be seen here:

Labview display that also doesn't work.png

This however also doesn't work.

I want to display both the image and the array. The array has numbers changing very quickly because, ofcourse it's video (given that the webcam is not laying absolutely still on a surface).

I want to do this in such a way that I can 'push' this array through my algorithm which then gives me a whole new array.

 

I tried a lot of things also not shown here, but I just couldn't get it to display an array with all the values per pixels and that changing very rapidly.

How can I do this?

 

0 Kudos
Message 1 of 3
(3,771 Views)
Solution
Accepted by topic author Choisai

You are using a RGB U32 Data Type for your image.  None of the outputs of the IMAQ ImageToArray.vi will work.  You must  either change the image type to something else or use IMAQ ColorImageToArray.vi.  It is located in

 

Vision and Motion>>Vision Utiilties>>Color Utilities

 

 

 

Randall Pursley
0 Kudos
Message 2 of 3
(3,718 Views)

The latter did the trick, though using the IMAQ Cast image (located at the function palette under Vision and Motion - Vision utilities - image management)  to convert it to any 8-bit / 16-bit or whatever type of data also worked. My final version, which also controls the brightness of the image, can be found in the attachment.

 

DO NOTE: I have had three blue screens now due to running this program. I used an old USB webcam camera and it apparently suffers very fast from too much data, causing the 'data overflow' problem which caused my computer to crash. I've tried assigning more memory to my programs, but that is not as effective as keeping the camera as still as possible.

I've hadn't had the problem with the built in webcam of my laptop though

0 Kudos
Message 3 of 3
(3,712 Views)