Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Using IMAQ Find Edge and/or IMAQ Find Straight Edges 3 In order to return tip coordinates of a needle

I know that there are functionalities in the two aforementioned functions that allow for start and end points to be found and output after a straight line is found in an ROI. My problem is that these start and end points are with respect to the ROI, and not the the actual object. What I mean by this is that if I have a needle (whose tip is in the ROI) and try to find the corresponding edge, the edge is easy enough to find. However, the red line that is superimposed on the image, representing the found edge is extended past the tip of the needle, and carried until the boundary of the rectangular ROI I am using. Thus when I return the end point, it gives me the end point along the ROI boundary, not the tip of the needle.

 

If anyone knows how to obtain the coordinates of the actual needle tip using the edge funtions in the post subject line, that would be very helpful and much appreciated!

 

0 Kudos
Message 1 of 2
(5,004 Views)

I am not sure what Machine Vision VIs you are using in order to do that. I think that you might be using a Find Straight Edge VI to find the edges of the needle. Once you know where the edges are, you can do another edge detection along the line that runs exactly in the middle of the edges of the needle. I took the liberty to create this example just to show you what I mean. The block diagram is a little sloppy and there might be some bugs, but it should be enough to get you started.

 

There are probably other methods that you could use to find the tip of the needle. You could probably do a threshold to create a binary image of the seperation the needle from the background. Then, you could do a binary analysis to find the top most point of the blob of the needle. 

 

Jeremy P.

Applications Engineer
National Instruments
Download All
0 Kudos
Message 2 of 2
(4,975 Views)