05-20-2016 04:27 PM - edited 05-20-2016 04:41 PM
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
05-21-2016 08:27 AM - edited 05-21-2016 08:28 AM
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
05-21-2016 08:36 AM
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
05-22-2016 07:07 AM
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.
05-22-2016 07:17 AM
05-22-2016 07:25 AM
please find the VI.
BR
Ravi
05-22-2016 07:56 AM - edited 05-22-2016 08:08 AM
ok now I have your vi
could you tell what is your porblem now ?
05-22-2016 08:07 AM
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
05-22-2016 08:19 AM
05-22-2016 08:39 AM
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