LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get pixel coordinates for running IMAQ Convert pixel to real world?

Hi everybody,

 

I'd like to obtain/display an array of real world coordinates from a pixels picture in order to drive X and Y servo motors. I use the function IMAQ real world coordinates and I have to add as input the pixel coordinates which is an array of clusters X and Y but I don't know how. I guess I can create for each pixel value a cluster of its X and Y coordinates...Is someone can help me, I attached an image of the block diagram.

 

Thanks!!!

0 Kudos
Message 1 of 4
(3,203 Views)
if you need angle for your servo motor you do not need to convert coordinate you can easily use
arctan(y pixel/x pixel ) for find the angle as you see in this equation unit of x and y is not important
but if you really want to convert coordinate just use a multiply pixel rate instated of this vi
0 Kudos
Message 2 of 4
(3,177 Views)

Hello Hatef,

 

Thank you for your answer! Ok for the real world coordinates but how can I get the pixel coordinates? 

0 Kudos
Message 3 of 4
(3,162 Views)
you have to regard center of your servo in image as (0 ,0) point so first related pixel of your servo
then you have to find pixel of rotating part based on algorithm that is suit for your work
then convert pixel value based on your (0 ,0) point and then use arctany/x
0 Kudos
Message 4 of 4
(3,154 Views)