LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

storing multiple values in arrays

Hi

I am very new to Labview programming. I have figured out the logic for my probelem but not sure how to convert it into labview language. So here is the problem statement:

I get the image from a firewire camera and run it in a while loop to display the video. I am able to do this. After this I calculate the pixel value at a particular point of each image and display it. This was also acheived. Now I would like to store this pixel value of first image in 0th position of an array and store the pixel value of second image in the 1st position in the same array and compare the two values and perform downstream operations on a device.

Now my question:

How can I store only two values in an array and refresh these everytime? What i mean is...I would to store the pixel value of 1st image in 0th position and pixel value of second image in 1st position...pixel value of 3rd image in the 0th position and pixel value of 4th image in 1st position and so on and so forth. I would compare the pixel values between images and if the difference is greater than 50 then it would open a certain valve in a device otherwise it would open a different valve in a the device. Any suggestions are highly appriciated. Thanks in advance.

Cheers

Adi

0 Kudos
Message 1 of 5
(3,522 Views)

numeric.pngThat is an easy one!

 

Look in the numeric palette, for the Remainder Quotient vi.  Wire the i from your while loop counter to the X, and the number 2 to the Y.  Wire the R (remainder) to your Array Index.

Machine Vision, Robotics, Embedded Systems, Surveillance

www.movimed.com - Custom Imaging Solutions
0 Kudos
Message 2 of 5
(3,499 Views)

can you post your vi? and not a .png

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

Seriously?

Machine Vision, Robotics, Embedded Systems, Surveillance

www.movimed.com - Custom Imaging Solutions
Message 4 of 5
(3,479 Views)

Hey MoviHohn,

Thanks fo the quick reply. I used your logic and it now works. I solved the problem using shift registers. Thank you very much again. 🙂

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