Component identification accuracy and stability comprehensive evaluation method and system, storage medium

By constructing standard images and performing offline recognition, the complexity and cost of evaluation of component recognition accuracy and stability of patch machine is solved, simple and accurate evaluation is achieved, and parameter fluctuations and noise interference in actual production are simulated. Improves the objectivity and comprehensiveness of the assessment.

CN118570593BActive Publication Date: 2024-11-15HEFEI ANXIN PRECISION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411048853.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2024-11-15
Estimated Expiration
2044-08-01

AI Technical Summary

Technical Problem

The prior art lacks a simple and effective method to objectively evaluate the accuracy and stability of component identification of patch machine. The traditional method is complex in operation, high in cost or relies on inaccurate data annotations, and it is difficult to simulate parameter fluctuations in actual production and Noise interference.

Method used

By constructing standard images, using component parameters and camera cell size to calculate parameter pixel values, construct standard images determined by multiple component centers and rotation angles, and perform offline identification, and statistically determine the difference between the identification results and the standard value to evaluate component recognition Accuracy and stability, considering parameter tolerance, noise interference and light source brightness variation.

Benefits of technology

It realizes simple, fast and accurate evaluation of the accuracy and stability of the identification of the patch machine component, reduces the cost of use, avoids the dependence of third-party measurement tools, provides simulated evaluation of various interference factors, and improves the objective evaluation of the evaluation. Sex and comprehensiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570593B_ABST
    Figure CN118570593B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of component recognition technology, and specifically discloses a method and system for comprehensive evaluation of component recognition accuracy and stability, and a storage medium. The evaluation method includes the following steps: using the parameter pixel value calculated from the component parameter, recognition feature parameter, and camera pixel size as the standard parameter, constructing a plurality of standard images with component centers and rotation angles determined, and using the actual component center and rotation angle of the standard image as the standard value; performing offline recognition on the standard image to obtain the recognition result of the component center and rotation angle in the image, and performing statistical analysis on the difference between the recognition result and the standard value. The solution evaluates the accuracy and stability of the component recognition module of the placement machine, does not require the aid of a third-party measurement tool, is simple and fast to operate, and has a low cost of use; compared with the database method, no data annotation is required, and the standard value is more accurate and reliable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of component identification, and in particular to a method and system for comprehensively evaluating component identification accuracy and stability, and a storage medium. Background Art

[0002] As an important tool for the automatic production of integrated circuit boards, the SMT machine plays an increasingly important role in the increasingly automated and integrated electronic industry. As one of the most important links in the production of SMT machines, the accuracy and stability of component positioning and identification directly affect the placement performance of the SMT machine and is one of the important indicators for measuring the use value of the SMT machine. Therefore, it is very important to evaluate the component recognition accuracy of the SMT machine.

[0003] There are two general methods for evaluating the accuracy and stability of component recognition in placement machines based on machine recognition:

[0004] The first method is to use a third-party physical mapping tool to measure the position and rotation angle of the component in the machine coordinate system during the placement and identification process, and then convert the placement machine image recognition results to the machine coordinate system. Finally, the difference between the third-party mapping results and the image recognition results is used to evaluate the accuracy and stability of the placement machine component recognition. This method has a complex operation process; because it requires the use of a third-party physical mapping tool, the implementation cost is high; in addition, because the image recognition results need to be converted to the machine coordinate system, the evaluation results introduce the placement machine mechanical motion error and conversion coefficient error, resulting in insufficient accuracy of the results;

[0005] The second method is to use a standard component image database as a test sample to conduct an offline evaluation of the accuracy and stability of component recognition of the SMT. Although this method is simple, it is difficult to create a standard component image database. There are generally two ways to create a standard component image database: (1) manual labeling. The standard results obtained in this way are subjective, and the accuracy that can be distinguished by the naked eye is limited, so the reliability of the standard data is not strong; (2) third-party recognition software labeling. Although the standard results labeled by third-party software can avoid human subjective errors, the errors of the third-party recognition software itself cannot be evaluated, and the reliability of the standard data is also not strong.

[0006] In summary, there is currently a lack of simple and effective means to objectively evaluate the component recognition accuracy and stability of placement machines. Summary of the invention

[0007] The purpose of the present invention is to overcome the problems existing in the prior art and provide a method and system for comprehensively evaluating component recognition accuracy and stability, and a storage medium, which can perform a simple, effective and objective evaluation of component recognition accuracy and stability.

[0008] In order to achieve the above object, the present invention provides a first aspect of a method for comprehensively evaluating component recognition accuracy and stability, comprising the following steps:

[0009] The parameter pixel values ​​calculated from the component parameters, the identification feature parameters and the camera pixel size are used as standard parameters to construct multiple standard images with the component centers and rotation angles determined, and the actual component centers and rotation angles of the standard images are used as standard values;

[0010] The standard image is recognized offline to obtain recognition results of the component center and rotation angle in the image, and the difference between the recognition result and the standard value is statistically analyzed to evaluate the accuracy and stability of component recognition.

[0011] Preferably, when the tolerance effect of component parameters is considered, a set of parameters is randomly generated within the tolerance range with each component parameter and identification feature parameter, and the parameter pixel values ​​are calculated using the randomly generated parameters and the camera pixel size as the standard parameters and the standard image is constructed to simulate the situation in which component parameters fluctuate around the standard values ​​in actual production, so as to evaluate the influence of component parameter differences on the accuracy and stability of component identification.

[0012] Preferably, when considering the influence of different noise interferences, Gaussian noise, salt and pepper noise and mixed noise with different signal-to-noise ratios are added to the standard image data to simulate the noise interference in the image during actual generation, so as to evaluate the resistance of component recognition to noise.

[0013] Preferably, when considering the influence of changes in image brightness, parameter pixel values ​​calculated from component parameters, identification feature parameters and camera pixel size are used as standard parameters, and different component feature area grayscale values ​​are set according to changes in the grayscale values ​​of components and background in the image to be identified under different lighting in actual production. A plurality of standard images are constructed to simulate fluctuations in the brightness of the identification light source in actual production, so as to evaluate the influence of changes in the brightness of the light source on the accuracy and stability of component identification.

[0014] A second aspect of the present invention provides a component recognition accuracy and stability comprehensive evaluation system, comprising

[0015] Standard image construction module: used to construct standard images with multiple component centers and rotation angles determined by using component parameters, recognition feature parameters and parameter pixel values ​​calculated from camera pixel size as standard parameters, and use the actual component center and rotation angle of the standard image as standard values;

[0016] The offline recognition and evaluation module is used to perform offline recognition on the standard image, obtain recognition results of the component center and rotation angle in the image, and perform statistical analysis on the difference between the recognition result and the standard value to evaluate the accuracy and stability of component recognition.

[0017] A third aspect of the present invention provides a machine-readable storage medium having instructions stored thereon, the instructions being used to enable a machine to execute the above-mentioned component recognition accuracy and stability comprehensive evaluation method of the present invention.

[0018] Through the above technical scheme, a standard image is constructed with ideal parameters and camera pixel size as a test sample, and the determined component center and rotation angle are used as standard values ​​to evaluate the accuracy and stability of the component recognition module of the placement machine, without the need for third-party measurement tools, and the operation is simple and fast, and the use cost is low; relative to the database method, no data annotation is required, and the standard value is more accurate and reliable; in addition, the test sample data can simulate the random changes of component parameters within the tolerance range according to actual conditions, simulate different light source brightness, simulate different noise interference and other situations, and can make a comprehensive evaluation of the component recognition accuracy of the placement machine from multiple aspects. Therefore, the method proposed by the present invention has the advantages of simple and fast operation, objective and accurate evaluation, and comprehensive investigation. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings:

[0020] Figure 1 A QFP component image taken by the chip mounter disclosed in the present invention;

[0021] Figure 2 A schematic diagram of a flow chart of comprehensive evaluation of component recognition accuracy and stability of a placement machine disclosed in the present invention;

[0022] Figure 3 A standard image of a QFP component without any special circumstances constructed by the method described in the present invention disclosed in the present invention;

[0023] Figure 4 A standard image of a QFP component with parameter tolerances constructed by the method described in the present invention disclosed in the present invention;

[0024] Figure 5 A standard image of a QFP component with noise interference constructed by the method described in the present invention disclosed by the present invention;

[0025] Figure 6 The standard images of QFP components with different grayscale values ​​disclosed by the present invention and constructed by the method described in the present invention.

[0026] In the figure, 1, component body; 2, pin; 21, pin foot; 22, pin root. DETAILED DESCRIPTION

[0027] The specific implementation of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the embodiment of the present invention, and is not used to limit the embodiment of the present invention.

[0028] Taking QFP component recognition in the field of chip mounters as an example, the technical solution and specific implementation methods of the method for comprehensively evaluating the accuracy and stability of component recognition in chip mounters of the present invention are described in detail below. Figure 1 The figure shows a QFP component image taken by a placement machine. The QFP component can be divided into two parts: the body 1 and the pin 2. The pin 2 can be divided into a pin foot 21 and a pin root 22. Generally, the pin 2 is used as a feature area when identifying components, especially the pin foot 21.

[0029] When evaluating the accuracy and stability of component recognition in a placement machine, if a third-party physical mapping tool is used to measure the standard value, the operation is complicated, the implementation cost is high, and the use scenarios are limited; if a standard image database is used, the data needs to be annotated in advance. Whether it is manual or third-party software annotation, the reliability of the standard data cannot be guaranteed. Therefore, the embodiment of the present invention is based on Figure 1 Taking the QFP component shown as an example, this embodiment is described to solve the problem of how to achieve a simple, effective and objective evaluation of the component recognition accuracy and stability of a placement machine, so as to provide a comprehensive evaluation method for the component recognition accuracy and stability of a placement machine.

[0030] In order to quickly, accurately and effectively achieve objective evaluation of the accuracy and stability of component recognition of the SMT, the present invention proposes a method for comprehensive evaluation of accuracy and stability by constructing sample images. The basic idea is to use component parameters and camera pixel size to construct sample images with known center positions and rotation angles, and use a standard image library composed of constructed data to perform offline testing on the component recognition module of the SMT. When constructing standard image data, various factors that affect the accuracy and stability of component recognition of the SMT are fully considered, various situations are simulated, and the anti-interference ability and accuracy of the algorithm are evaluated from multiple aspects.

[0031] Based on the above concept, the first aspect of the embodiment of the present invention provides a method for comprehensively evaluating component recognition accuracy and stability, referring to Figure 2 As shown, the process is:

[0032] S1. Construction of offline recognition environment for component recognition module of SMT machine;

[0033] The component recognition process of the placement machine is generally carried out online by using the camera system to obtain the image input and recognition module in real time for recognition. Therefore, it is necessary to add the input and output results of offline recognition to the component recognition module in the placement machine or extract the component recognition module to make a separate offline recognition software. After the offline recognition environment is built, the image to be detected can be manually input, and the recognition result obtained by the recognition module can be output, which is convenient for data statistics and result analysis.

[0034] S2, component parameters and camera pixel size parameters acquisition;

[0035] The pixel size of the component in the image can be calculated from the actual length of the component and the pixel size of the camera. In order to better simulate the component image actually taken by the placement machine, it is necessary to obtain the standard parameters of the component and the pixel size during imaging. For example, Figure 1 The QFP component shown has an overall standard length and width of 16mm*16mm, a standard pin length of 0.5mm, a standard pin width of 0.25mm, and a standard spacing value of 0.5mm between adjacent pins.

[0036] S3, standard image data generation: using the parameter pixel values ​​calculated from the component parameters, the recognition feature parameters and the camera pixel size as standard parameters, constructing multiple standard images with component centers and rotation angles determined, and using the actual component centers and rotation angles of the standard images as standard values;

[0037] After obtaining the standard size of the component and the camera pixel size, standard sample images with known component centers and rotation angles under different conditions can be created according to actual test needs.

[0038] Furthermore, standard image data without any special circumstances is generated for the recognition module recognition accuracy test. In step S3, the specific process of generating standard image data is as follows:

[0039] (1) Component parameter conversion. The length parameters such as the overall length, overall width, feature area length, feature area width, relative position of the feature area in the component (including relative coordinates in the X and Y directions), and spacing between feature areas are converted from millimeter values ​​to pixel values ​​using the camera pixel size through formula (1). The feature area here refers to the area used for identification, such as the component pin, component pad, component ball terminal, and component electrode. In this embodiment, the feature area refers to the pin foot: (1)

[0040] Where L is the component parameter expressed in millimeters; lIt is the component parameter expressed in pixel value after L conversion; ScaleX and ScaleY are the pixel sizes of the camera in the X and Y directions, in μm / Pixel; λ is the angle between the line segment represented by the parameter L to be converted and the X direction.

[0041] (2) Rotation angle setting. The rotation angle is generally randomly generated, and the generated angle range is generally (-45°, 45°). If there is a special need, it can also be set manually. For example, when the angle needs to be kept unchanged, when the test center or other conditions affect the recognition, the rotation angle is set to a specific value and remains unchanged in the same batch of data.

[0042] (3) Setting the standard image size. The standard image size can be set according to the actual output size of various recognition cameras of the placement machine, or it can be determined by the overall external rectangular size of the component plus an appropriate boundary expansion value. The boundary expansion value is generally selected as 2~5mm according to experience. The formula for calculating the standard image size using the expansion value is as follows.

[0043] W = | w*cos (θ) | + | h*sin(θ) | + 2*b1 (2)

[0044] H = | w*sin (θ) | + | h*cos(θ) | + 2*b2 (3)

[0045] Where W and H are the width and height of the standard image, respectively; w and h are the pixel values ​​of the width and height of the overall size of the component after being transformed by formula (1); b1 and b2 are the pixel values ​​of the horizontal and vertical directions of the boundary extension value after being calculated by formula (1); and θ is the rotation angle of the component.

[0046] In this embodiment, when simulating the flying camera to take images, the actual output image size is used to set the standard image size; when simulating the bottom mirror camera to take images, the size of the overall circumscribed rectangle plus an appropriate boundary extension value is used to determine it.

[0047] Component center setting. The component center is generally generated randomly. The generation condition is that when the component image is constructed with the generation center as the center, the component constructed can be fully displayed within the image range and has a certain boundary. Based on the above criteria, the calculation formulas (4) and (5) for the value range of the component center in the X and Y directions are designed. With the upper left corner of the image as the origin, the positive direction of the X axis is from left to right, and the positive direction of the Y axis is from top to bottom, an image coordinate system is established. In the image coordinate system, the value range of the component center is as follows:

[0048] (4)

[0049] (5)

[0050] Cx and Cy are the set component centers, b is the boundary value, and b is required to be smaller than the minimum value of b1 and b2. In this embodiment, 5 pixels are generally taken.

[0051] (5) Calculation of the size and center position of each feature region. First, use formula (1) to convert the length and width of the feature region to obtain the pixel-level size information of each feature region; then, in the image coordinate system, use the relative position relationship between the center of the feature region and the center of the component to calculate the center coordinates of each feature region on the constructed image.

[0052] (6) Standard image drawing. First, construct a background image with all zeros according to the standard image size calculated in step (3); then calculate the theoretical outer contour of each feature area in the image to be constructed according to the size and center position of each feature area calculated in step (5) and the rotation angle generated in step (2); then, according to the distance from each pixel point in the image to the theoretical outer contour of the feature area, classify each pixel point in the image into four categories: completely external points, local external points, local internal points, and completely internal points; finally, modify the pixel value of each pixel position in the background image as follows to complete the standard image drawing.

[0053] a. Completely external point: the current pixel point is outside the theoretical outer contour of the feature area, and the distance to the theoretical outer contour is greater than 1 pixel, and the gray value of the current pixel position remains unchanged;

[0054] b. Local external point: The current pixel is inside the theoretical outer contour of the feature area, and the distance to the theoretical outer contour is less than 1 pixel. First, calculate the proportion α of the area of ​​the current pixel inside the theoretical contour to the entire pixel area, then calculate the difference Δ between the grayscale value of the feature area and the grayscale value of the background area, and finally take the grayscale value of the background area plus the product of the proportion α and the difference Δ as the grayscale value of the current pixel;

[0055] c. Local internal point: The current pixel is inside the theoretical outer contour of the feature area, and the distance to the theoretical outer contour is less than 1 pixel. First, calculate the proportion α of the area of ​​the current pixel inside the theoretical contour to the entire pixel area, then calculate the difference Δ between the grayscale value of the feature area and the grayscale value of the background area, and finally take the grayscale value of the background area plus the product of the proportion α and the difference Δ as the grayscale value of the current pixel;

[0056] d. Completely internal point: The current pixel is inside the theoretical outer contour of the feature region, and the distance to the theoretical outer contour is greater than 1 pixel. The gray value of the current pixel is set to the gray value of the feature region, which is generally set to 255 for an 8-bit grayscale image. The construction result is as follows: Figure 3As shown, a constructed standard image contains a QFP analog component with a known center position and rotation angle, and the edge of the component pin foot is digitized to be more consistent with the actual image digitization law.

[0057] In the embodiment of the present invention, standard image data without any special circumstances is constructed according to the test requirements. On this basis, standard image data with parameter tolerance, standard image data with different noise interferences and standard image data with different gray values ​​can also be constructed according to the requirements.

[0058] Therefore, in another embodiment of the present invention, when considering the tolerance effect of component parameters, standard image data with parameter tolerance is generated to evaluate the effect of component parameter differences on the accuracy and stability of component recognition, and step S3 further includes the following process:

[0059] S311. Within the tolerance range, a set of parameters is randomly generated with each component parameter and identification feature parameter, and the parameter pixel value is calculated as the standard parameter using the randomly generated parameters and the camera pixel size and the standard image is constructed to simulate the situation in which the component parameters fluctuate around the standard value in actual production.

[0060] Generate a new value within the corresponding parameter tolerance range for the dimensional parameters such as the overall length, overall width, feature area length, feature area width, and spacing between feature areas of the component to replace the original nominal value as the dimensional parameter for subsequent component drawing. The specific operation is to randomly generate a random coefficient ω within the parameter fluctuation range allowed by the tolerance according to the parameter tolerance actually marked for each dimensional parameter, and multiply the standard dimensional parameter by the random coefficient to form a new dimensional value as the replacement value of the current parameter. Exemplarily, in this embodiment, the standard outer dimension length of the component is 16.0mm, and the tolerance of the outer dimension is 10% when producing the example component. Then, a random coefficient ω0 is randomly generated between 0.9 and 1.1, and 16.0mm*ω0 is used instead of 16.0mm as the overall length of the component in the subsequent image creation process.

[0061] S312, component parameter conversion. The length parameters such as the overall length, overall width, feature area length, feature area width, relative position of the feature area in the component (including relative coordinates in the X and Y directions), and spacing between feature areas are converted from millimeter values ​​to pixel values ​​using the camera pixel size through formula (1). The feature area here refers to the area used for identification, such as the component pin, component pad, component ball terminal, and component electrode. In this embodiment, the feature area refers to the pin foot.

[0062] S313, rotation angle setting. The rotation angle is generally randomly generated, and the generated angle range is generally (-45°, 45°). If there is a special need, it can also be set manually. For example, when the angle needs to be kept unchanged, when the test center or other conditions affect the recognition, the rotation angle is set to a specific value and remains unchanged in the same batch of data.

[0063] S314, standard image size setting. The standard image size can be set according to the actual output size of various recognition cameras of the placement machine, or it can be determined by the overall external rectangular size of the component plus an appropriate boundary expansion value. The boundary expansion value is generally selected as 2~5mm according to experience. The formula for calculating the standard image size using the expansion value is as shown in formula (2) and formula (3).

[0064] In this embodiment, when simulating the flying camera to take images, the actual output image size is used to set the standard image size; when simulating the bottom mirror camera to take images, the size of the overall circumscribed rectangle plus an appropriate boundary extension value is used to determine it.

[0065] S315, component center setting. The component center is generally generated randomly. The generation condition is that when the component image is constructed with the generation center as the center, the component constructed can be fully displayed within the image range and has a certain boundary. Based on the above criteria, the calculation formulas (4) and (5) for the value range of the component center in the X and Y directions are designed. With the upper left corner of the image as the origin, the positive direction of the X axis is from left to right, and the positive direction of the Y axis is from top to bottom, an image coordinate system is established. In the image coordinate system, the value range of the component center is calculated according to formulas (4) and (5).

[0066] S316, calculate the size and center position of each feature region. First, use formula (1) to convert the length and width of the feature region to obtain the pixel-level size information of each feature region; then, in the image coordinate system, use the relative position relationship between the center of the feature region and the center of the component to calculate the center coordinate of each feature region on the constructed image.

[0067] S317, standard image drawing. First, according to the standard image size calculated in step S314, construct a background image with all zeros; then, according to the size and center position of each feature area calculated in step S316 and the rotation angle generated in step S313, calculate the theoretical outer contour of each feature area in the image to be constructed; then, according to the distance from each pixel point in the image to the theoretical outer contour of the feature area, divide each pixel point in the image into four categories: completely external points, local external points, local internal points and completely internal points; finally, modify the pixel value of each pixel position in the background image as follows to complete the standard image drawing.

[0068] a. Completely external point: the current pixel point is outside the theoretical outer contour of the feature area, and the distance to the theoretical outer contour is greater than 1 pixel, and the gray value of the current pixel position remains unchanged;

[0069] b. Local external point: The current pixel is inside the theoretical outer contour of the feature area, and the distance to the theoretical outer contour is less than 1 pixel. First, calculate the proportion α of the area of ​​the current pixel inside the theoretical contour to the entire pixel area, then calculate the difference Δ between the grayscale value of the feature area and the grayscale value of the background area, and finally take the grayscale value of the background area plus the product of the proportion α and the difference Δ as the grayscale value of the current pixel;

[0070] c. Local internal point: The current pixel is inside the theoretical outer contour of the feature area, and the distance to the theoretical outer contour is less than 1 pixel. First, calculate the proportion α of the area of ​​the current pixel inside the theoretical contour to the entire pixel area, then calculate the difference Δ between the grayscale value of the feature area and the grayscale value of the background area, and finally take the grayscale value of the background area plus the product of the proportion α and the difference Δ as the grayscale value of the current pixel;

[0071] d. Completely internal point: The current pixel is inside the theoretical outer contour of the feature region, and the distance to the theoretical outer contour is greater than 1 pixel. The gray value of the current pixel is set to the gray value of the feature region, which is generally set to 255 for an 8-bit grayscale image. The construction result is as follows: Figure 4 As shown in the figure, the constructed standard image contains a QFP simulation component with a known center position and rotation angle, and the length and width of different pin feet are different, simulating the size fluctuation in actual production. It can be seen from the comparison that the length and width of different pin feet fluctuate. Figure 3 There are obvious changes.

[0072] In another embodiment of the present invention, when considering the influence of different noise interferences, the process included in step S3 is the same as steps S311-S317, except that after a set of standard image data without any special circumstances is generated according to step S311, Gaussian noise, salt and pepper noise and mixed noise with different signal-to-noise ratios are added to each image to generate multiple images containing one or more noises, which are used to simulate the noise interference of the image in the actual generation, so as to evaluate the resistance of component recognition to noise. The construction result is as follows: Figure 5 As shown, the constructed standard image contains a QFP simulation component with a known center position and rotation angle, and there is obvious Gaussian noise and salt and pepper noise in the image, simulating the situation where there is noise interference in the output image in actual production.

[0073] In another embodiment of the present invention, when considering the influence of the change of light source brightness on component recognition during imaging, standard image data with different grayscale values ​​are generated for robustness testing of the recognition module to the change of light source brightness. Step S3 includes the following process:

[0074] (1) Component parameter conversion. The length parameters such as the overall length, overall width, feature area length, feature area width, relative position of the feature area in the component (including relative coordinates in the X and Y directions), and spacing between feature areas are converted from millimeter values ​​to pixel values ​​using the camera pixel size through formula (1). The feature area here refers to the area used for identification, such as the component pin, component pad, component ball terminal, and component electrode. In this embodiment, the feature area refers to the pin foot.

[0075] (2) Rotation angle setting. The rotation angle is generally randomly generated, and the generated angle range is generally (-45°, 45°). If there is a special need, it can also be set manually. For example, when the angle needs to be kept unchanged, when the test center or other conditions affect the recognition, the rotation angle is set to a specific value and remains unchanged in the same batch of data.

[0076] (3) Setting the standard image size. The standard image size can be set according to the actual output size of various recognition cameras of the placement machine, or it can be determined by adding the overall external rectangular size of the component to an appropriate boundary expansion value. The boundary expansion value is generally selected as 2~5mm according to experience. The formula for calculating the standard image size using the expansion value is shown in Formula (2) and Formula (3).

[0077] In this embodiment, when simulating the flying camera to take images, the actual output image size is used to set the standard image size; when simulating the bottom mirror camera to take images, the size of the overall circumscribed rectangle plus an appropriate boundary extension value is used to determine it.

[0078] (4) Component center setting. The component center is generally generated randomly. The generation condition is that when the component image is constructed with the generation center as the center, the component constructed can be fully displayed within the image range and has a certain boundary. Based on the above criteria, the calculation formulas (4) and (5) for the value range of the component center in the X and Y directions are designed. With the upper left corner of the image as the origin, the positive direction of the X axis is from left to right, and the positive direction of the Y axis is from top to bottom, an image coordinate system is established. In the image coordinate system, the value range of the component center is as shown in formulas (4) and (5).

[0079] (5) Calculation of the size and center position of each feature region. First, use formula (1) to convert the length and width of the feature region to obtain the pixel-level size information of each feature region; then, in the image coordinate system, use the relative position relationship between the center of the feature region and the center of the component to calculate the center coordinates of each feature region on the constructed image.

[0080] (6) Setting the grayscale value of the pixel in the feature area. Generally speaking, the brightness of the light source used by the placement machine changes linearly in levels. The higher the level, the brighter the light source, and the higher the pixel grayscale value of the feature area in the image. Therefore, the grayscale value is evenly divided into different levels according to the order of the light source brightness level. Taking the 8-level light source used in this embodiment as an example, it is divided into nine levels from 0 to 8. For a grayscale image represented by 8 bits, the maximum grayscale value is 255. Therefore, the grayscale values ​​of the feature area of ​​the image element corresponding to the 0~8-level light source brightness are: 0, 32, 64, 96, 128, 160, 192, 224, 255 respectively.

[0081] (7) Standard image drawing. First, construct a background image with all zeros according to the standard image size calculated in step (3); then calculate the theoretical outer contour of each feature area in the image to be constructed according to the size and center position of each feature area calculated in step (5) and the rotation angle generated in step (2); then, according to the distance from each pixel point in the image to the theoretical outer contour of the feature area, classify each pixel point in the image into four categories: completely external points, local external points, local internal points, and completely internal points; finally, modify the pixel value of each pixel position in the background image as follows to complete the standard image drawing.

[0082] a. Completely external point: the current pixel point is outside the theoretical outer contour of the feature area, and the distance to the theoretical outer contour is greater than 1 pixel, and the gray value of the current pixel position remains unchanged;

[0083] b. Local external point: The current pixel is inside the theoretical outer contour of the feature area, and the distance to the theoretical outer contour is less than 1 pixel. First, calculate the proportion α of the area of ​​the current pixel inside the theoretical contour to the entire pixel area, then calculate the difference Δ between the grayscale value of the feature area and the grayscale value of the background area, and finally take the grayscale value of the background area plus the product of the proportion α and the difference Δ as the grayscale value of the current pixel;

[0084] c. Local internal point: The current pixel is inside the theoretical outer contour of the feature area, and the distance to the theoretical outer contour is less than 1 pixel. First, calculate the proportion α of the area of ​​the current pixel inside the theoretical contour to the entire pixel area, then calculate the difference Δ between the grayscale value of the feature area and the grayscale value of the background area, and finally take the grayscale value of the background area plus the product of the proportion α and the difference Δ as the grayscale value of the current pixel;

[0085] d. Completely internal point: The current pixel is inside the theoretical outer contour of the feature region, and the distance to the theoretical outer contour is greater than 1 pixel. Set the gray value of the current pixel to the characteristic gray value set in step (6). The construction result is as follows: Figure 6As shown, the constructed standard image contains a QFP simulation component with a known center position and rotation angle, and the grayscale values ​​of the feature areas in different images vary significantly, simulating the changes in the brightness level of the light source in actual production.

[0086] Step S4, component standard sample image recognition: offline recognition is performed on the standard image to obtain recognition results of the component center and rotation angle in the image;

[0087] The different types of standard image data sets constructed in step S3 are input into the offline recognition module constructed in step S1 in batches to perform sample image recognition, and the recognition results corresponding to each image are output.

[0088] Step S5: Statistically analyze the difference between the recognition result and the standard value.

[0089] The result of the recognition output in step S4 is taken as the real recognition result, and the component center and rotation angle set when generating the image in step S3 are taken as the standard values. For each set of standard images, the center coordinate X0, center coordinate Y0 and rotation angle R0 of the standard values ​​are respectively subtracted from the center coordinate X, center coordinate Y and rotation angle R of the recognition result to obtain the difference data dX, dY and dR. The maximum, minimum, average and standard deviation of dX, dY and dR in each set of standard images are counted. As shown in the following table:

[0090] Table 1 Statistics of standard image recognition results and standard value deviation results without any special circumstances

[0091]

[0092] Table 2 Statistics of standard image recognition results with parameter tolerance and standard value deviation results

[0093]

[0094] Table 3 Statistics of standard image recognition results and standard value deviation results under different noise interferences

[0095]

[0096] Table 4 Statistics of standard image recognition results and standard value deviation results for different gray values

[0097]

[0098] Step S6, evaluating the component recognition accuracy and stability of the placement machine according to the statistical results;

[0099] According to the comparison between the maximum and minimum values ​​of dX, dY and dR in each group of standard images counted in step S5 and the set maximum allowable deviation of recognition error, it is determined whether the recognition accuracy of the tested placement machine recognition module can meet the accuracy requirement; according to the comparison between the mean and standard deviation of dX, dY and dR in each group of standard images counted in step S5 and the set allowable standard deviation of recognition fluctuation, it is determined whether the recognition stability of the tested placement machine recognition module can meet the stability requirement.

[0100] The above-set maximum allowable deviation of the recognition error can be calculated in two forms. The first is the recognition accuracy set when the machine is designed. For the embodiment of the present invention, the recognition result of the QFP-100 (16mm*16mm) component is required to have a center coordinate deviation of ±30.00μm in the X and Y directions and an angle deviation of ±0.15°; the second is calculated according to the maximum allowable side overhang and minimum pin solder joint length specified in the IPC-SM-782 and IPC-A-610D standards. The maximum allowable offset of the mounting theory is calculated according to the maximum pin side overhang not exceeding 25% of the pin width and the minimum pin solder joint length not less than 75% of the pin length. The theoretical maximum allowable deviation of the recognition result is obtained by subtracting the 10μm mechanical motion deviation from the calculated maximum allowable deviation of the mounting theory. For this embodiment, the center coordinate deviation of the recognition result calculated for the QFP-100 (16mm*16mm) component is within ±34.19μm in the X and Y directions, and the angle deviation is within ±0.18°.

[0101] It is worth mentioning that the above-mentioned component recognition accuracy and stability comprehensive evaluation scheme is applicable to scenarios including but not limited to the field of placement machines.

[0102] Based on the same inventive concept, a second aspect of an embodiment of the present invention provides a component recognition accuracy and stability comprehensive evaluation system, comprising:

[0103] Standard image construction module: used to construct standard images with multiple component centers and rotation angles determined by using component parameters, recognition feature parameters and parameter pixel values ​​calculated from camera pixel size as standard parameters, and use the actual component center and rotation angle of the standard image as standard values;

[0104] The offline recognition and evaluation module is used to perform offline recognition on the standard image, obtain recognition results of the component center and rotation angle in the image, and perform statistical analysis on the difference between the recognition result and the standard value to evaluate the accuracy of component recognition.

[0105] Based on the same inventive concept, a third aspect of an embodiment of the present invention provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to enable a machine to execute the above-mentioned component recognition accuracy and stability comprehensive evaluation method of the present invention.

[0106] In summary, in order to solve the problem that the accuracy and stability of component recognition of the SMT machine cannot be simply and effectively objectively evaluated, the present invention uses the above technical solution to construct a standard image with ideal parameters and camera-related dimensions as a test sample, and uses the determined component center and rotation angle as standard values ​​to evaluate the accuracy and stability of the component recognition module of the SMT machine, without the need for third-party measurement tools, and is simple and fast to operate, with low cost; relative to the database method, no data annotation is required, and the standard value is more accurate and reliable; in addition, the test sample data can simulate the random changes of component parameters within the tolerance range according to actual conditions, simulate different light source brightness, simulate different noise interference and other situations, and can make a comprehensive evaluation of the accuracy of component recognition of the SMT machine from multiple aspects. Therefore, the method proposed by the present invention has the advantages of simple and fast operation, objective and accurate evaluation and comprehensive investigation.

[0107] Although the embodiments of the present invention have been shown and described with respect to the existing methods, it will be understood by those skilled in the art that various changes, modifications, substitutions and variations may be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents, and all should be included in the scope of protection of the present invention.

[0108] The preferred embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited thereto. Within the technical concept of the present invention, the technical solution of the present invention can be subjected to a variety of simple modifications, including the combination of various specific technical features in any suitable manner. In order to avoid unnecessary repetition, the present invention will not further describe various possible combinations. However, these simple modifications and combinations should also be regarded as the contents disclosed by the present invention and belong to the protection scope of the present invention.

Claims

1. A method for comprehensive evaluation of component recognition accuracy and stability, characterized in that: The following steps are involved: The parameter pixel values ​​calculated from the component parameters, the identification feature parameters and the camera pixel size are used as standard parameters to construct multiple standard images with the component centers and rotation angles determined, and the actual component centers and rotation angles of the standard images are used as standard values; The process includes: converting component parameters and feature parameters from length values ​​to pixel values ​​in combination with the camera pixel size, setting the component rotation angle, and determining the standard image size based on the rotation angle and component parameters; generating the component center, and the value range of the component center is as follows: in Cx、Cy is the set center of the component, b is the boundary value, W.H. are the width and height of the standard image, respectively. w、h The pixel values ​​after the width and height transformation of the overall size of the component are respectively; the relative position relationship between the feature area and the center of the component is determined according to the recognition feature parameters, and the center coordinates of each feature area are calculated; the background image is drawn according to the standard image size, the theoretical outer contour of the feature area is calculated according to the center coordinates, rotation angle and outer dimensions of the feature area, and the standard image is drawn to complete the construction; The standard image is recognized offline to obtain recognition results of the component center and rotation angle in the image, and the difference between the recognition result and the standard value is statistically analyzed to evaluate the accuracy and stability of component recognition.

2. The evaluation method according to claim 1, characterized in that: The calculation formula for converting the component parameters and feature parameters from length values ​​to pixel values ​​in combination with the camera pixel size is as follows: Where L is the component parameter expressed in millimeters, l is the component parameter expressed in pixel value after L conversion, ScaleX, ScaleY is the pixel size of the camera in the X and Y directions, in μm / Pixel, and λ is the angle between the line segment represented by the parameter to be converted L and the X direction.

3. The evaluation method according to claim 2, characterized in that: The calculation formula for determining the standard image size according to the rotation angle and component parameters is as follows: W = | w*cos (θ) | + | h*sin(θ) | + 2*b1 H = | w*sin (θ) | + | h*cos(θ) | + 2*b2 Among them, b1 and b2 are the pixel values ​​in the horizontal and vertical directions after the boundary extension value is converted, and θ is the component rotation angle.

4. The evaluation method according to claim 1, characterized in that: The process of drawing a standard image is as follows: According to the distance from the image pixel to the theoretical outer contour of each feature area, the pixel points in the image are divided into: completely external points, local external points, local internal points and completely internal points. The pixel values ​​of the pixel points in the standard image are modified according to the following rules to complete the standard image drawing: The completely external point is a point where the current pixel is outside the theoretical contour and the distance to the theoretical contour is greater than 1 pixel, and the gray value of the current pixel remains unchanged; The local external point is the current pixel point outside the theoretical contour and the distance to the theoretical contour is less than 1 pixel. First, the proportion α of the area of ​​the current pixel point inside the theoretical contour to the entire pixel point area is calculated, and then the difference Δ between the gray value of the feature area and the gray value of the background area is calculated. Finally, the gray value of the background area plus the product of the proportion α and the difference Δ is taken as the gray value of the current pixel point; The local internal point is the current pixel point inside the theoretical contour and the distance to the theoretical contour is less than 1 pixel. First, the proportion α of the area of ​​the current pixel point inside the theoretical contour to the area of ​​the entire pixel point is calculated, and then the difference Δ between the gray value of the feature area and the gray value of the background area is calculated. Finally, the gray value of the current pixel point is taken as the product of the gray value of the background area plus the proportion α and the difference Δ. The completely internal point is a point where the current pixel is inside the theoretical contour and the distance to the theoretical contour is greater than 1 pixel, and the grayscale value of the current pixel is set as the grayscale value of the feature area.

5. The evaluation method according to claim 1, characterized in that: The offline recognition of the standard image to obtain the recognition results of the component center and the rotation angle in the image, and the statistical analysis of the difference between the recognition result and the standard value includes the following process: Subtract the center coordinates (X, Y) and rotation angle R of the recognition result from the center coordinates (X0, Y0) and rotation angle R0 of the standard value to obtain difference data dX, dY and dR; Count the maximum, minimum and standard deviation of dX, dY and dR in multiple images respectively; Whether the accuracy and stability of the current recognition module can meet the requirements is determined by whether the maximum and minimum values ​​exceed the set limits and whether the standard deviation is less than the theoretical threshold.

6. The evaluation method according to claim 5, characterized in that: The number of the multiple images is greater than or equal to 50.

7. The evaluation method according to claim 6, characterized in that: The offline identification is achieved by adding an offline identification input and output interface to the component identification module in the placement machine or by making the component identification module into a separate offline identification software.

8. The evaluation method according to any one of claims 1 to 7, characterized in that: When considering the tolerance effect of component parameters, within the tolerance range, a set of parameters is randomly generated with each component parameter and identification feature parameter, and the parameter pixel values ​​are calculated using the randomly generated parameters and the camera pixel size as the standard parameters and the standard image is constructed to simulate the situation in which component parameters fluctuate around the standard values ​​in actual production, so as to evaluate the influence of component parameter differences on the accuracy and stability of component recognition.

9. The evaluation method according to any one of claims 1 to 7, characterized in that: When considering the influence of different noise interferences, Gaussian noise, salt and pepper noise and mixed noise with different signal-to-noise ratios are added to the standard image data to simulate the noise interference in the image during actual generation, so as to evaluate the resistance of component recognition to noise.

10. The evaluation method according to any one of claims 1 to 7, characterized in that: When considering the influence of changes in image brightness, the parameter pixel values ​​calculated from the component parameters, recognition feature parameters and camera pixel size are used as standard parameters. Different component feature area grayscale values ​​are set according to the changes in the grayscale values ​​of the component and background in the image to be identified under different lighting in actual production. Multiple standard images are constructed to simulate the brightness fluctuations of the identification light source in actual production, so as to evaluate the influence of changes in light source brightness on the accuracy and stability of component recognition.

11. A component recognition accuracy and stability comprehensive evaluation system, characterized in that: include Standard image construction module: used to construct standard images with multiple component centers and rotation angles determined by using component parameters, recognition feature parameters and parameter pixel values ​​calculated from camera pixel size as standard parameters, and use the actual component center and rotation angle of the standard image as standard values; The process includes: converting component parameters and feature parameters from length values ​​to pixel values ​​in combination with the camera pixel size, setting the component rotation angle, and determining the standard image size based on the rotation angle and component parameters; generating the component center, and the value range of the component center is as follows: in Cx、Cy is the set center of the component, b is the boundary value, W.H. are the width and height of the standard image, respectively. w、h The pixel values ​​after the width and height transformation of the overall size of the component are respectively; the relative position relationship between the feature area and the center of the component is determined according to the recognition feature parameters, and the center coordinates of each feature area are calculated; the background image is drawn according to the standard image size, the theoretical outer contour of the feature area is calculated according to the center coordinates, rotation angle and outer dimensions of the feature area, and the standard image is drawn to complete the construction; The offline recognition and evaluation module is used to perform offline recognition on the standard image, obtain recognition results of the component center and rotation angle in the image, and perform statistical analysis on the difference between the recognition result and the standard value to evaluate the accuracy and stability of component recognition.

12. A machine-readable storage medium having instructions stored thereon, the instructions being used to enable a machine to execute the component recognition accuracy and stability comprehensive evaluation method as described in any one of claims 1 to 10 of the present invention.