Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Find end points of line

Solution that can be applied is to use Radon transform or Hougth transform.

First make sure the line is white on black background (revers the image if needed)

In Radon transform operation is:

for i = 1 to 180

- rotate image by 1 degree (IMAQ rotate)

- sum the image to vector on X and Y (IMAQ linear avrage)

end

You will get 90 vectors while each represent diffrent angle.

The line that shows the longest white in the vector that is the length of the line and you also get the angle.

Vecor that is 90 degree from it will show the line as a spot on the vector.

From that knowing the angle and line location in the vectors you can trace back to the location on the image.

Amit Shachaf
0 Kudos
Message 11 of 11
(869 Views)