Pins Inspection

NI Vision Assistant

Pins Inspection

Application Type Inspection; Gauging
Image Characteristics Monochrome; Good Contrast
Machine Vision Tool(s) Edge Detection; Caliper

The pins inspection example examines if the connector pins on a Berg stick are vertical and straight. The inspection requires finding the edge of each pin at three different locations, and computing the angle formed by these points to determine the orientation of the pin.

Edge Detection (All Edges) Simple Edge Detection—Finds the edge points of the pins. The edge detection process looks for edges (sharp transitions in pixel values) along a search path. The search path is defined as the horizontal line drawn across the image close to the top of the pins.

The simple edge tool is used to detect the edges because the pins are well contrasted from the background in the image, and there is no noise in the image. Based on the line profile obtained along the search line, a threshold value of 100 is used to detect the edges.

The pixel coordinates of the left and right edges of each pin along the search line in the image are returned at the end of this step.

Edge Detection (All Edges) Simple Edge Detection—Finds edges on the pins along a horizontal search line that passes midway through each pin. The pixel coordinates of the left and right edges of each pin along the horizontal search line are returned at the end of this step.

Edge Detection (All Edges) Simple Edge Detection—Finds edges on the pins along a horizontal search line that passes close to the bottom of each pin. The pixel coordinates of the left and right edges of each pin along the horizontal search line are returned at the end of this step.

Caliper—Finds the angle of each pin. The right edge locations of each pin, obtained from the previous steps, are used to compute the angle of the pin.