LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array manipulation

I have two arrays from two identical images which need to be aligned according to intensity values. To compare the two I use a correlatino coefficient equation.
I will use the first array as a base, then put through a numerical iteration to see whether all the points in the array equal the value 0.95. If not then I need to shift the array up along the y-axis until the output is decreasing if it decreases then I need to shift in the other direction until the values= 0.95. Then I need to do the same in the x-direction.
Then I know that both images are trully aligned.

Please help!
0 Kudos
Message 1 of 3
(2,702 Views)
Your question is not very clear.
It seems that you have two 2D arrays, that you don't need to compare to each other. You just need to compare elements in each dimension on each of those arrays separately.
You will pass the 2D array to a For loop. The loop will run that many number of times as is the number of rows in the array. So in each loop iteration you will check the values in the array rows, lets says these are y values. Put another For loop inside and compare the y elemnts inside the inner loop. Now, I am not sure what you mean by "shift the array" Do you want to shift the entire row one row up if you find an element in that row that is greater than .95, or down if it is less than .95? If so, then use the While loop instead, as the inner loop, and as so
on as you find an element not equal to .95, exit the while loop and shift the row. To shift the rows/collumns, you can use delete/insert array element VIs.
I hope this helps.
Zvezdana S.
0 Kudos
Message 2 of 3
(2,702 Views)
Sorry let me explain it better.

Firstly I have one array which contains the gray scale values from indentical images but the intensities are slightly different. I need to split the array into equal squares(A and B) and line up the arrays so that the picture's data line up. As I cannot guarentee that each pixel of the image line when I split the array up I need to move it around so it does.

I need to put each array as a input into a correlation co-efficient equation and the output of the equation is the values of 0.95 etc.
This needs will out put a single array. from this array I will need to analyse row by row first then colomn by colomn.

So if the first row of the output is not 0.95 then I need to move up array B and enter them into the equ
ation again and repeat the process of entering the new conbination of array data into the correlation equation. I need to continue as the number increases, as it decrease I will need to change direction.

This process then needs to be repeated in the colomn direction. Till all the array matches 0.95 or more.

Can this be done? I only have labview 6.0 with no add ons. I have attached a photo of the output picture. As you can see I need to cut it and make the arrays match so the pictures are aligned.
0 Kudos
Message 3 of 3
(2,702 Views)