LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert the two dimensional array values in matrix into x-y coordinates

I am working on Image processing on two digital images to see the change in image position in terms of x and y  coordinate values. My idea is to convert the image into its pixel array which will give an array of values from 0 to 255 based on the intensity value of each pixel.  Once I get the array pixel values of the  one image  I am doing the same thing with other image and then I want to subtract the position of these pixels in terms of x and y coordinate for that I need to convert these two-dimensional arrays into x-y coordinates but I am not able to do this.

Please help.

 

BR

Ravi

0 Kudos
Message 1 of 13
(4,462 Views)

You didn't post any code, so (among other things) I have no idea what version of LabVIEW you are using, nor whether you might have the Vision Toolkit.  There are a set of Motion Estimation VIs (I'm looking in the Vision and Motion Palette of LabVIEW 2015)  that might be just what you need ...

 

Bob Schor

0 Kudos
Message 2 of 13
(4,413 Views)

what bob told you is true you have to give us a your code it make easy for us to give best help 
in bellow image I show you how to convert image to 2d array (matrix) if you have vision toolkit .but for more help if you want you have to show us your vi to help and tell about your labview version and toolkit that you have

image to array.jpg

0 Kudos
Message 3 of 13
(4,407 Views)

please find the attached VI. I am using LabVIEW 2015 version with vision development module.  I want to perform a mathematical algorithm on the pixel intensity positions and then to conclude the result of the displacement of the image with respect to the reference image.

Download All
0 Kudos
Message 4 of 13
(4,382 Views)
could you send your vi in 2014 version I do not have 2015
0 Kudos
Message 5 of 13
(4,376 Views)

please find the VI.

 

BR

Ravi

Download All
0 Kudos
Message 6 of 13
(4,373 Views)

ok now I have your vi 
could you tell what is your porblem now ?

0 Kudos
Message 7 of 13
(4,359 Views)

well as you can see that I am trying to detect the pixel shift in two consecutive images. I have converted the image to array then array to matrix form with rows and column. As the images are gray images which mean each pixel has its value between 0 and 255 depending upon the intensity. In the VI, I have simply performed the mathematical operations and some output results are also coming. But these mathematical operations, for example, the subtraction does only subtract the corresponding values but not the recognized position values. I want to at first convert the matrix values to their respective x-y positions lets say starting with the top left corner with (0,0) and accordingly I want the positions to be marked when we move from left to right or top to bottom. Once this is done for both the images I want to subtract these positions to get the displacement in x and y directions respectively. I am thinking of indexing on the matrix row and column to get the x-y coordinates for each pixel value but I am not getting how to do this.

 

BR

Ravi 

0 Kudos
Message 8 of 13
(4,355 Views)
you do not need to do this you can use delete from array to get access for any I&j pixcel value that you want
but before start to use that please study a bit about IMAQ SSIM VI I think this vi also could be helpful for your idea

0 Kudos
Message 9 of 13
(4,349 Views)

Did you look at the examples (Help, Find Examples ..., Toolkits, Vision, Motion Estimation) that ship with LabVIEW and the Vision Toolkit?  Do you know about the two algorithms that they use for Motion Estimation (Horn Schunck and Lucas Kanade)?  I found references for these algorithms in LabVIEW Help, and there's also Google ...

 

Bob Schor

0 Kudos
Message 10 of 13
(4,344 Views)