LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Inverting a 2D Array

Hi,
 
I have written a VI that takes a bitmap image and converts it into a 2D Array of pixel intensities and then maps it on an intensity graph.  My problem is that in the processing of the data the image is rotated ninety degrees to the right.  When I use the transpose array function, this rotates the array another ninety degrees to the right producing an inverted image.  I am trying to invert the image again by spliting the array into one dimensional arrays and inverting it column by column.  When I take a subset of the array, even though I am only extracting one column the array is still considered two dimensional and thus cannot be inverted using the invert one dimensional array function.  I have attached a copy of the subVI I am trying to create to invert the array.  Is there any way split a two dimensional array into one dimensional arrays or is there a better way to flip the image?
 
Thanks in advance,
K80
0 Kudos
Message 1 of 3
(2,827 Views)
I can't look at your code, but my suggestion would be not to use the Array Subset VI. Instead, wire the array a for loop, which will auto index it, creating 1D arrays. Wire this 1D array into the Reverse Array function and wire it back out of the for loop. It will auto index out and build a 2D array which you should now be able to use.

___________________
Try to take over the world!
Message 2 of 3
(2,824 Views)

That works much better.  Thanks for your help!

K80

0 Kudos
Message 3 of 3
(2,822 Views)