11-03-2011 09:13 AM
Hi -
I want to overlay the edge points found using the IMAQ Line Guage VI, very similar to how it is done in the 'Edge Detection Example.vi'.
However, the only outputs for the IMAQ Line Guage VI are distances. I can use the IMAQ Edge Tool 3 to get edge information to overlay, but it is unclear to me that the edge information provided by the IMAQ Edge Tool 3 is consistent with the calculations in IMAQ Line Guage VI. I do need the sub-pixel accuracy.
Can someone let me know how we can do this with IMAQ Line Guage?
As another note, I tried using IMAQ Edge Tool itself but was obtaining some very strange results for distances, which is why I turned to IMAQ Line Guage, which is giving me good results.
Thanks,
Don
Solved! Go to Solution.
11-04-2011 11:12 AM
Hi DonRoth,
Have you tried using the IMAQ Caliper Tool.VI or the IMAQ Simple Edge.VI? Both of these have the subpixel accuracy you want and will also allow you to see the pixel coordinates to perform the overlay. You will have to get the coordinates from the array of clusters that these VIs output. You can do this by indexing the array and then unbundle by name the cluster. Hope this helps!
Mychal F
11-07-2011 09:00 AM - edited 11-07-2011 09:01 AM
OK. The caliper function finds edge pairs along a specified path in the image. So I tried this but am getting an error that not sure how to handle. Here is my strategy. I am drawing a line on the Vision Image and using the ROI property node to extract ROI descriptor. I use the same edge parameters that I had been using with the Distance fx. Below and attached are the screenshot and VI if you have any suggestions. I am sure we are close. I only want the first and last edge. Distance and coordinates so I can overlay the latter onto the line where edges are detected.
Error -1074395318 occurred at IMAQ Caliper Tool
Possible reason(s):
IMAQ Vision: You supplied an insufficient number of points to perform this operation.
11-07-2011 12:42 PM - edited 11-07-2011 12:45 PM
Fixed it. Was missing IMAQ ROIProfile which is needed to get the correct coordinates input for Caliper Tool. But I think it would be easier to just have edge information coming out of IMAQ Line Guage VI since you can see that I had to manually write code to get the first and last edge, and distance. Certainly that information is somewhere in the Line Guage VI. NI would just need to add the edge information as an output.