Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I measure pin length

We have build a machine vision station and trying to sort pins by length as tall, short and medium. You can see the pins in the attached file. We tried line fitting algorithm, it calculates well but it is very slow. Can anyone suggest any better solutions to measure these pin lengths? 

Download All
0 Kudos
Message 1 of 5
(4,624 Views)

How about simple particle analysis? Threshold to binary, then particle filter followed by particle analysis. Max Feret Diameter particle measurement gives you the longest diameter which, depending if the differences between the lengths are very small or not, might be enough. If not, get particle Orientation and dynamically create a ROI for Gauge or alike.

 

Here's a snippet related to the former. Note that not all the stages here are necessary. In this case, second column of the array (Max Feret Diameter) would indicate the length.

 

pin_particle_analysis.png

0 Kudos
Message 2 of 5
(4,600 Views)

Perhaps even simpler, simply use area instead of Max Feret Diameter.

0 Kudos
Message 3 of 5
(4,580 Views)

Hi abilgi, You can also Equivalent Rect Long Side alone, since the pin is rectangular shape. for more on Particle measurement parameters, check the link.

 

http://zone.ni.com/reference/en-XX/help/372916L-01/nivisionconcepts/particle_measurements/

Thanks
uday
Message 4 of 5
(4,555 Views)
0 Kudos
Message 5 of 5
(4,513 Views)