“This is the 12th day of my participation in the First Challenge 2022. For details: First Challenge 2022”

Please follow my official account [Jizhi Vision] for more notes to share

Hi, I’m Jizhi Vision. This paper mainly talks about the two dimensional positioning operator in industrial quality inspection.

Industrial quality inspection is an early field of computer vision, and it is also the scene where traditional image processing algorithms are still widely used, which is different from security, automatic driving and other fields. Sometimes using traditional algorithms to solve problems will make you feel more pure and explicable than deep learning. Computer vision in the industrial field is also often called machine vision, including manipulator guidance positioning, code reading, industrial parts measurement, defect detection, OCR, 3D volume and other applications. Some good and famous machine vision algorithm platforms are visionPro (Cognex), HALCON (MVtec), VisionMaster (Haikang), MVP (Dahua) and so on.

The following topic is borrowed from visionPro. Visual positioning is the leading step of visual measurement, image processing and analysis. If the positioning is not done well, the subsequent processing often cannot be carried out effectively.

First, positioning common operators

  • Spot detection
  • Looking for a side
  • Looking for a round
  • Template matching
  • The template matching

Two, operator analysis

2.1 Spot detection

Blob detection, also known as BLOB analysis, can analyze the location of spots or holes in the image. Morphological operation can be configured to output the number of spots, spot centroid, minimum external moment, spot contour, connected domain label map and other information. There are similar operators in OpenCv: SIFT, SURF, LoG, I feel connected domain analysis operator CV: : connectedComponentsWithStats and spot detection is the most similar on the function, can be viewed as low distribution version blob analysis operator, It is still very convenient to use the vision software of Cognex visionPro for spot detection demonstration, adding CogBlobTool operator, the effect is as follows:

2.2 to find edges

The use of edge finding operator is based on calipers, which is mainly used for the positioning of straight lines and can output the position information of straight lines. Similar operators in OpenCv include CV ::HoughLines, but the realization principle of the two is not quite the same. Calipers use the principle of projection, while Hough transform is implemented by the idea of probability voting. In terms of usage, CV ::HoughLines cannot specify the desired position like edge finding operator, and the efficiency of edge finding operator is much higher, which is very important in practical use.

2.3 looking for round

The use of circle finder is also based on caliper operator, which is mainly used for locating the circle and can output the position information of the circle. Similar operators in OpenCv include CV ::HoughCircles. VisionPro is also used for circle finder demonstration, adding CogFindCirclesTool operator, Results the following

2.4 Template Matching

The function of template matching is to train the template according to the characteristics of the object, to match and locate the object within a certain range of Angle and scale, and output the information of the object’s centroid, rotation Angle, scale and so on. OpenCv has a similar operator: CV ::matchTemplate, which provides six matching algorithms, the last of which is the normalized correlation coefficient matching method (CV_TM_CCOEFF_NORMED), also known as NCC template matching. Template matching may have different names in other vision software, such as position correction in The Iv-Navigator vision sensor software from Keens, or positioning shapes in Microscan AutoVISION, but ultimately, Function roughly the same use visionPro vision software for template matching demonstration, add CogPMAlignTool operator, the effect is as follows

2.5 Template Comparison

Template comparison is generally used in pairs with template matching, which is widely used in the field of industrial defect detection. The role of template comparison is well understood, which is to find out the differences with the template. Also, in other visual software, template alignment may be called a different name, such as Keens, which is called outline alignment.

The above share the introduction of two-dimensional positioning operator in industrial quality inspection, I hope my share can be a little help to your study.


[Experience Sharing] Talk about two-dimensional Positioning operator in Industrial Quality Inspection