LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ "find circular edge 3" "show results" -- accuracy with which the center dot is placed?

I am working on a LabVIEW routine that uses the IMAQ  image processing routines to find and display the center of a series of circular objects in live images acquired from a camera.   I started out with having the "find circular edge 3" configured to "show results", which at first I thought to be just a line overlaying the edge that was found, but I later discovered that the results also include a small filled dot supposedly at the center of the circle.  Until I noticed the dot, I had been using the "IMAQ Overlay Line" VI (twice) to draw a "+" at the coordinates of the circle center.  But eventually I began to notice that some circle centers were showing up with a bit of cruft around the intersection of the "+" center mark.  That's when I zoomed in and found the filled center dot that was part of the "show results", and for some images, it and the "+" sign were not entirely aligned to each other.

 

After a short bit of digging I noticed that the "IMAQ Overlay Line" VI expects I32 coordinates while the "find circular edge 3" returns DBL coordinates.  The DBL values that I was feeding the Overlay Line VI were either being rounded up or down to the nearest integer pixel location before the lines were drawn.  I thought that I'd have to live with this until I discovered that the "IMAQ Overlay Multiple Lines" VI accepts DBL coordinates and, if used individually, the VI can be used to draw individual line segments positioned with sub-pixel resolution.  

 

At this point I thought that all was good until I noticed that again, for some images, the bit of cruft was showing up.  Zooming in again, I again see that the "results" dot is no longer centered on the "+" intersection. The dot, when it does not match up, always seems to be biased to either the left and/or above the center indicated by the "+".  Examination of the image pixel locations using the cursor while observing the cursor coordinates leads me to believe that the "+" intersection is in the correct location on the image for the DBL coordinates while the filled dot generated by the "find edge - show results" is rounded down to the nearest integer pixel location.  My "fix" has been to turn off the "show results" and instead use the "show edges".

 

Has anyone else noticed this "feature" of the "show results" center dot or am I possibly doing something wrong?

 

0 Kudos
Message 1 of 1
(595 Views)