05-13-2013 11:47 AM
Good afternoon,
Is there any function that can measure the distance from any pixel in an image to all the surrounding pixels which represent a border?. Just like a Laser Range Finder would work. I Just want to compare real distances to simulated distances in an image.
I tried with almost all the Labview examples but no one seems very useful to me.
Thanks in advance.
05-13-2013 12:47 PM
Are you using the vision VI's?
You can do 'find edge' to find your border.
This will give you a X or Y value depending whether your border is horizontal or vertical.
Substract that value from you point value.
05-13-2013 01:24 PM
The above will give you the shortest distance to the border. If you truely want the distance to each pixel contained within the border, you will first need to establish the coordinates for each pixel that creates the border. Then, you can use distance equations to calcluate the distance (in pixels) for each using a for loop.
05-13-2013 02:44 PM
Thanks to both of you,
I'll try what you said. I also saw clamp Horizontal Min/Max and clamp vertical Min/Max that detect dinstances in search areas.
The problem that I see in "Find edge" is that it only searches for lines, so when I get angles it maybe doesn't recognize them. Also, searching directions dont include diferent angles, just from left to righ, top to bottom and vice versa