LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

measure pixels distance

Hi everyone!

I would like to measure the radius of each pixels by reading BMP file. BMP dimensions is 50x50 pixels and each pixel size is 0.032 milimeters.
This is what I've done so far. I was able to get only grey level of pixels in diagonal lines but I would like to get each pixel's distance(milimeters) from center point of the circle.

Can anyone show me a way on how to do it?


Thanks 🙂

 (I attached jpg file because i couldn't upload bmp file)

 

Download All
0 Kudos
Message 1 of 3
(3,309 Views)

Hi rainy01!

 

 

altenbach posted this very neat vi

 

The linked vi calculates an centered euclidian distance transform  in px of a given input image.

 

 

 

All you have to do is to scale it up by multiplication with your mm/px factor (0,032)

 

2013-05-08_px-euklid-mm.png

 

The euclidian distance is calculated very efficient in altenbachs approach via complex numbers.

 

You also could try a more explicit approach without complex numbers by using directly the i of the FOR loop and arithmetic functions.

 

 

Alex

Message 2 of 3
(3,255 Views)

I understand. Thanks! Helped me a lot! 🙂

0 Kudos
Message 3 of 3
(3,223 Views)