Can anyone help me out to find the diameter of the hole using imaq vision?

have to measure the diameter of the holes and generate the report in the format given belowI have also enclosed the image to be processed)
example:
HOLE SPECIFICATIONS PLATE NO. 1
X Y DIAMETER X Y
C 8.4 3.79 3.122 8.472 3.675
D 8.51 3.54 3.117 8.579 3.647
F 0 0 1.089 0 0
H 4.08 9.474 1.083 4.045 9.731
J 3.78 9.86 0.845 3.698 9.957
can anyone help me out to solve it,, Thanking you in advance!
Attachments:
03260005.JPG ‏103 KB

Hello.
I have some suggestions for the image processing component of your application. I have attached a Vision Assistant script to this post (Vision Assistant 7.1) which performs essentially the following steps. These steps could be followed in any programming environment and should yield decent results:
Extract the Luminance plane from the RGB image (simply to get it into 8-bit mono format for the thresholding. Could be done with a color threshold VI).
Threshold the image so that the bright components are left and the dark is set to 0.
Perform a particle filter to remove the particles that are too large (the surrounding area).
Perform a particle analysis on the remaining particles, which should be the holes in the
plate only. Set the particle analysis to return the Location of the 'Center of Mass X' and 'Center of Mass Y,' and the perimeter (diameter).
This type of processing would allow the plate to be rotated, have different patterns, etc. and you should still be able to get the information about the holes.
Hope this helps.
Regards,
Colin C.
Applications Engineering
Colin Christofferson
Community Web Marketing
Blog
Attachments:
ExampleHoleScript.scr ‏2 KB

Similar Messages

Maybe you are looking for