A patch material polarity identification method, system, device and storage medium
By preprocessing and compensating for recognition deviations in the polarity image data of the surface mount material, the problem of unclear polarity on the lower surface or the inability of the component camera to recognize it is solved, realizing accurate detection and automated correction of the surface mount material, and improving production efficiency and quality.
Patent Information
- Application Number
- CN202311434604.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-31
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-10-31
AI Technical Summary
In the surface mount technology (SMT) manufacturing process, incorrect material polarity can lead to production stoppages and product defects. This is especially true when the polarity of the lower surface is not obvious or the component cannot be identified by the camera. Therefore, accurately identifying the correct polarity of the material becomes a significant challenge.
By acquiring the material image information of the patch material, preprocessing it to obtain polarity image data, determining whether the polarity is correct, calculating the picking angle and performing recognition deviation compensation, analyzing the optimal rectangle and optimal circle, and adjusting the picking angle and position, accurate polarity detection and correction can be achieved.
It improves the accuracy and automation of surface mount material placement, reduces production defects, lowers costs, and is suitable for industrial automation and production process optimization.
Smart Images

Figure CN117670980B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of material feeding control, and in particular to a method, system, device and storage medium for polarity identification of patch materials. Background Technology
[0002] In the surface mount technology (SMT) manufacturing process, incorrect material polarity can easily lead to production stoppages and product defects, affecting production costs and wasting resources. Currently, the polarity of the SMT component is mainly identified by a component camera. However, for situations where the polarity of the lower surface is not obvious or the component camera cannot identify the polarity of the material, accurately identifying the correct polarity of the material has become a significant challenge in the current SMT manufacturing process. Summary of the Invention
[0003] To overcome the shortcomings of the prior art, the present invention provides a method, system, device and storage medium for polarity identification of patch materials.
[0004] The technical solution adopted by this invention to solve its technical problem is: Firstly, a method for identifying the polarity of a patch material includes: Acquire material image information of the patch material, and preprocess the material image information to obtain polarity image data of the patch material; Based on the polarity image data, determine whether the polarity of the patch material is correctly identified; If not, calculate the material picking angle of the polarity image data, and perform identification deviation compensation processing on the patch material according to the material picking angle; The patch material is mounted according to the compensated pick-up angle of the patch material.
[0005] By adopting the above technical solution, through the identification of the picking angle of polarity image data and the compensation for identification deviation, accurate polarity detection can be performed on materials with unclear polarity on the lower surface or whose polarity cannot be identified by the component camera. This reduces production defects caused by polarity mounting errors, improves the mounting accuracy of surface mount materials, and dynamically adjusts the picking angle and position of surface mount materials according to the picking angle of the surface mount materials after deviation compensation, thereby improving the automation and intelligence of surface mount materials in the production process.
[0006] In a preferred embodiment, this application can be further configured as follows: calculating the material-picking angle of the polarity image data and performing identification deviation compensation processing on the patch material based on the material-picking angle specifically includes: Perform optimal rectangle analysis on the polarity image data, and draw the optimal rectangle based on the optimal rectangle analysis results; Obtain the rectangular ROI image of the optimal rectangle, perform optimal circle analysis on the rectangular ROI image, and draw the optimal circle based on the optimal circle analysis results; Calculate the relative angle between the center of the optimal circle and the center of the optimal rectangle to obtain the material picking angle of the patch material; The pickup position and pickup angle of the patch material are adjusted according to the pickup angle, and recognition deviation compensation processing is performed based on the adjustment results of the pickup position and pickup angle.
[0007] By adopting the above technical solution, the polarity image is analyzed for optimal rectangle and optimal circle. The relative angle between the center of the optimal circle and the center of the optimal rectangle is used to calculate the current pick-up angle of the patch material. This helps to improve the accuracy of the pick-up angle calculation. The pick-up position and pick-up angle of the patch material are automatically adjusted according to the pick-up angle. Pick-up deviation compensation is performed based on the adjustment results of the pick-up position and pick-up angle, which helps to ensure the correct pick-up position that matches the current pick-up angle, thereby improving the pick-up accuracy of the patch material.
[0008] In a preferred embodiment, this application can be further configured such that: the optimal rectangle analysis of the polarity image data specifically includes: Edge detection is performed on the patch material based on the polarity image data to obtain the rectangular edge contour of the patch material; Calculate the perimeter of the rectangle's edge contour, and perform rectangle fitting based on the perimeter. Based on the fitting results, polygon approximation processing is performed on the rectangular edge contours, and the minimum bounding rectangle of each rectangular edge contour is obtained based on the processing results. When the aspect ratio of the minimum bounding rectangle meets the preset rectangle conditions, the minimum bounding rectangle is defined as the optimal rectangle; The preset rectangular condition is as follows: (1) in, This represents the ideal aspect ratio of the rectangle containing the current material. , This represents the actual aspect ratio of the smallest bounding rectangle. .
[0009] By adopting the above technical solution, a rectangle fitting is performed by combining the edge contour of the patch material and the corresponding material contour perimeter parameters, and a polygon approximation process is performed according to the contour perimeter parameters to obtain the minimum bounding rectangle, thereby improving the accuracy of the minimum bounding rectangle extraction. When the minimum bounding rectangle meets the preset rectangle conditions, the optimal rectangle is selected, thereby improving the accuracy of the rectangular contour drawing of the patch material.
[0010] In a preferred embodiment, this application can be further configured such that: the step of performing edge detection on the patch material based on the polarity image data to obtain the rectangular edge contour of the patch material specifically includes: The gradient magnitude and gradient direction of each pixel in the polarity image data are calculated. The gradient magnitude of the pixel is calculated using formula (2), which is shown below: (2) in, This represents the gradient magnitude of a pixel. , These represent the pixel points in... shaft and Gradient calculation results along the axial direction; The gradient direction of the pixel is calculated using formula (3), which is shown below: (3) Non-maximum suppression is performed on each pixel along the gradient direction to select the maximum threshold of the pixel along the gradient direction. Based on the maximum threshold of the pixel, the strong edge pixels and the adjacent weak edge pixels in the gradient direction are connected to form an edge closure connection to obtain a rectangular edge contour.
[0011] By adopting the above technical solution, combining the gradient magnitude and gradient direction of each pixel in the polarity image data, the deviation angle of material polarity is calculated accurately to each pixel. Through non-maximum suppression processing in the gradient direction, the local maximum value in the gradient direction is selected, which helps to eliminate low pixel points below the local maximum value. Furthermore, by connecting the strong edge pixels in the gradient direction with the adjacent weak edge pixels, the rectangular edge contour is obtained, further improving the edge detection accuracy of the optimal rectangle.
[0012] In a preferred embodiment, this application can be further configured such that: the optimal circle analysis of the rectangular ROI image specifically includes: Calculate the ideal radius of the feature circle in the rectangular ROI image; Obtain the feature circle data of the rectangular ROI image, and calculate the actual radius corresponding to the feature circle data; When the actual radius meets the preset characteristic circle conditions, the current characteristic circle is defined as the optimal circle; The preset feature circle condition is represented by formula (9), which is shown below: (9) in, Indicates the actual radius of the characteristic circle. Indicates the ideal radius of the characteristic circle. By adopting the above technical solution, combining the rectangular ROI image data of the optimal rectangle, the ideal radius of the corresponding feature circle is calculated as a reference index for the extraction of the optimal circle. Combined with the actual radius of the feature circle, it is determined whether the actual radius of each feature circle meets the preset feature circle conditions. The feature circles that meet the conditions are then extracted as the optimal circle, thereby improving the accuracy of the optimal circle extraction.
[0013] In a preferred embodiment, this application may be further configured to include, prior to performing optimal circle analysis on the rectangular ROI image: The rectangular ROI image is preprocessed with grayscale and then processed with a discrete Gaussian kernel using formula (4) to obtain the discrete Gaussian kernel data of the rectangular ROI image; formula (4) is shown below: (4) Where represents the weight of the Gaussian kernel at position (i,j) after pixel discretization. This represents the standard deviation of the Gaussian kernel.
[0014] Based on the discrete Gaussian kernel data, the edge pixels of the rectangular ROI image are filled with boundary filler. Then, the filled edge pixels are subjected to discrete convolution processing using formula (5), as shown in formula (5) below: (5) in, It is the blurred value obtained after convolution. Represents the rectangular ROI image Pixel value at the location; Hough circle detection is performed on the edge pixels after discrete convolution. The distance between the edge pixel and the center of the circle is calculated based on the detected center and formula (6). Formula (6) is as follows: (6) Where d represents the distance between the edge point and the center of the circle. , These represent the coordinates of the edge points. , These represent the coordinates of the center of the circle.
[0015] By adopting the above technical solution, in the process of acquiring the rectangular ROI image, the grayscale processed rectangular ROI image data is processed by a discrete Gaussian kernel, and the filled edge pixels are processed by discrete convolution with the discrete Gaussian kernel as a reference. The convolved edge pixels are then subjected to Hough circle detection to obtain the distance between the edge pixels and the center of the circle, which helps to select the optimal circle based on the distance between the center of the circle and the edge pixels.
[0016] In a preferred embodiment, this application can be further configured such that: calculating the relative angle between the center of the optimal circle and the center of the optimal rectangle to obtain the material picking angle of the patch material specifically includes: The relative angle between the center of the optimal circle and the center of the optimal rectangle is calculated using formula (7), as shown below: (7) in, This represents the relative angle between the center of the optimal circle and the center of the optimal rectangle. This represents the difference between the ordinate of the center of the optimal circle and the ordinate of the center of the rectangle. , This represents the difference between the x-coordinate of the center of the optimal circle and the x-coordinate of the center of the rectangle. ,in, , The coordinates of the optimal circle are . , This represents the coordinates of the center of the rectangle.
[0017] By adopting the above technical solution, the relative angle between the center of the optimal circle and the center of the optimal rectangle is calculated, which helps to determine the actual deviation angle of the patch material based on the calculated relative angle, thereby improving the accuracy of material picking and correction.
[0018] The beneficial effects of this invention are: 1. High accuracy: It can accurately detect materials with unclear polarity on the lower surface or whose polarity cannot be identified by the component camera, reducing production defects caused by polarity mounting errors; 2. High degree of intelligence and automation: By calculating between the optimal circle and the optimal rectangle, the correct pick-up angle of the chip material is obtained, thereby automatically controlling the robot to correct the pick-up angle and position, realizing fully automated and intelligent material feeding polarity detection and correction placement, improving the efficiency and quality of the chip production process, reducing costs and reducing resource waste; 3. Wide range of applications: It is not only applicable to the surface mount technology (SMT) manufacturing industry, but also plays a positive role in promoting industrial automation and production process optimization. Attached Figure Description
[0019] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0020] Figure 1 This is a schematic diagram of the patch material assembly device in this embodiment; Figure 2 This is a flowchart illustrating the implementation of a polarity identification method for patch materials in this embodiment. Figure 3 This is a schematic diagram illustrating the material determination method for identifying the polarity of patch materials in this embodiment.
[0021] Explanation of reference numerals in the attached diagram: 1. Placement head, 2. Material to be tested (polarity to be determined), 3. Tray, 4. Nozzle, and 5. Mark camera. Detailed Implementation
[0022] The following will clearly and completely describe the concept, specific structure, and technical effects of the present invention in conjunction with embodiments and accompanying drawings, so as to fully understand the purpose, features, and effects of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of them. Other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are all within the scope of protection of the present invention. Furthermore, all connections / linkages involved in the patent do not simply refer to direct contact between components, but rather to the ability to form a better connection structure by adding or reducing connecting accessories according to specific implementation conditions. The various technical features in this invention can be combined interactively without contradicting each other.
[0023] In this embodiment, before the pick-and-place machine starts production, the system of the present invention is updated onto the pick-and-place machine, and settings and calibrations are performed on the system. The pick-and-place material device in this embodiment is as follows: Figure 1 As shown, it includes a placement head 1, a material to be tested (polarity to be determined) 2, a tray 3, a nozzle 4, and a Mark camera 5.
[0024] In one embodiment, such as Figure 2 As shown, this application discloses a method for polarity identification of patch materials, which specifically includes the following steps: S1: Obtain the material image information of the patch material and preprocess the material image information to obtain the polarity image data of the patch material.
[0025] Specifically, in this embodiment, a high-sensitivity area array camera, such as a Mark camera, is used to acquire images of the polarized upper surface of the patch material to obtain material image information. The image is then converted into a grayscale image, such as by thresholding or binarization. The number of pixels at each grayscale level in the image is counted, and the total number of pixels, the inter-class variance corresponding to the total number of pixels, the optimal threshold, etc., are initialized to obtain the polarized image data of the patch material.
[0026] It should be noted that, for each pixel during the grayscale conversion process, the image pixels are divided into foreground and background categories. The threshold can be calculated by the number of pixels and weights corresponding to the foreground and background categories, or by the average grayscale value of the foreground and background categories, or by calculating the inter-class variance, the maximum inter-class variance, and the corresponding optimal threshold.
[0027] S2: Based on the polarity image data, determine whether the polarity of the patch material has been correctly identified.
[0028] Specifically, material identification is performed by combining polarity image data. A schematic diagram of the material identification process is shown below. Figure 3 As shown, it is determined whether the material needs to be polarized. If not, the material is picked up at 0° normally. If polarity identification is required, such as for materials with unclear surface polarity or materials whose polarity cannot be identified by the component camera, the polarity is determined by the preset Mark camera. If the polarity is correctly identified, the material is picked up at 0° normally. If the polarity is not correctly identified, the material is automatically verified in step S30 to obtain the corresponding picking angle for the correct polarity.
[0029] S3: If not, calculate the material picking angle of the polarity image data, and perform identification deviation compensation processing on the patch material according to the material picking angle.
[0030] Specifically, when the polarity is incorrectly identified, the material-picking angle of the polarity image data is calculated. Based on the picking angle, the robotic arm is automatically controlled to rotate to the picking angle before picking up the material. This includes the following steps: S31: Perform optimal rectangle analysis on the polarity image data, and draw the optimal rectangle based on the results of the optimal rectangle analysis.
[0031] Specifically, in this embodiment, the optimal rectangle analysis of polarity image data using the Canny algorithm includes the following steps: S311: Perform edge detection on the patch material based on the polarity image data to obtain the rectangular edge contour of the patch material.
[0032] Specifically, the polar image data is smoothed using a Gaussian filter to reduce noise, and edge contour detection is performed through the following steps: S3111: Calculate the gradient magnitude and gradient direction of each pixel in the polarity image data. The gradient magnitude of the pixel is calculated using formula (2), which is shown below: (2) in, This represents the gradient magnitude of a pixel. , These represent the pixel points in... shaft and The gradient calculation results along the axial direction.
[0033] The gradient direction of a pixel is calculated using formula (3), which is shown below: (3) S3112: Perform non-maximum suppression processing on each pixel in the gradient direction and select the maximum threshold of the pixel in the gradient direction.
[0034] Specifically, for each pixel in the gradient magnitude image, an extremum determination is performed. This involves checking if each pixel represents the local maximum threshold along the gradient direction. If so, it is retained; otherwise, the corresponding pixel is set to 0. If the gradient magnitude of the current pixel... Gradient direction If the gradient magnitude of two adjacent pixels is smaller, then the current pixel is set to 0.
[0035] S3113: Based on the maximum threshold of the pixel, perform edge closure connection on the strong edge pixels and the adjacent weak edge pixels in the gradient direction to obtain the rectangular edge contour.
[0036] Specifically, in this embodiment, the determination of strong and weak edges is performed by a dual threshold method. For example, the binarization threshold calculated during the grayscale conversion process is used as the standard to divide the pixels in the gradient magnitude image into strong edges and weak edges. Pixels above the high threshold are marked as strong edge points, pixels below the low threshold are filtered out, and pixels between the high and low thresholds are marked as weak edge points. Then, strong edge points and adjacent weak edge pixels are connected to form a closed rectangular edge contour.
[0037] S312: Calculate the perimeter of the rectangle's edge contour and perform rectangle fitting based on the perimeter.
[0038] Specifically, based on the closed rectangular edge contour, the perimeter of each rectangular edge contour is calculated, and each rectangular edge contour is fitted to form a rectangle that conforms to the shape of the patch material according to the contour perimeter.
[0039] S313: Perform polygon approximation processing on the rectangular edge contours based on the fitting results, and obtain the minimum bounding rectangle of each rectangular edge contour based on the processing results.
[0040] Specifically, the polygon approximation algorithm and fitting results are used to approximate the rectangle's edge contour. The approximation polygon is observed. If the approximated polygon has 4 sides, it is considered a rectangle. The smallest bounding rectangle with the smallest area is selected from the multiple rectangles obtained after approximation and saved to the preset vector Rects.
[0041] S314: When the aspect ratio of the minimum bounding rectangle meets the preset rectangle conditions, the minimum bounding rectangle is defined as the optimal rectangle.
[0042] The preset rectangle condition is as follows: (1) in, This represents the ideal aspect ratio of the rectangle containing the current material. , This represents the actual aspect ratio of the smallest bounding rectangle. .
[0043] Specifically, iterate through all rectangle vectors in the vector `Rects` and calculate the actual aspect ratio of each rectangle vector. If the aspect ratio of the smallest bounding rectangle meets the preset rectangle condition, then calculate the area of the current rectangle. Define the initial value of the maximum rectangular area of the patch material. If the area of the current rectangle is greater than the area of the largest rectangle, then the area of the current rectangle is assigned to the area of the largest rectangle. Mark the current smallest bounding rectangle as the optimal rectangle. And draw the outline of the optimal rectangle.
[0044] S32: Obtain the rectangular ROI image of the optimal rectangle, perform optimal circle analysis on the rectangular ROI image, and draw the optimal circle based on the optimal circle analysis results.
[0045] Specifically, the component information in the host computer controlling the surface mount technology (SMT) production includes the length and width values of the SMT material image. In this embodiment, the ROI range is 1.2 times the length and width values. Therefore, these 1.2 times the length and width values (w and h, in mm) need to be converted into pixel values, such as ROI_X=1.2. w / mag_x、ROI_Y=1.2 h and mag_y (unit: pixels) are converted and then used to crop the ROI region. Here, mag_x represents the pixel precision in the horizontal direction, and mag_y represents the pixel precision in the vertical direction. Optimal circle analysis is then performed on the rectangular ROI image, specifically including: S321: Calculate the ideal radius of the feature circle of the rectangular ROI image.
[0046] Specifically, the component information in the host computer program controlling the surface mount production process includes the ideal radius r (unit: mm) of the corresponding feature circle image, which needs to be converted to pixels r / mag_x (unit: px), where mag_x represents the pixel precision in the horizontal direction. After conversion to pixel units, the ideal radius of the feature circle is obtained. .
[0047] S322: Obtain the feature circle data of the rectangular ROI image and calculate the actual radius corresponding to the feature circle data.
[0048] Iterate through all circles in the vector Circles to obtain the feature circle data of the rectangular ROI image, including the actual radius of the feature circle. and convert it to pixels. / mag_x (unit: pixels), where mag_x represents the pixel precision in the horizontal direction, and after conversion to pixels, it yields the ideal radius of the feature circle. .
[0049] S323: When the actual radius meets the preset characteristic circle conditions, the current characteristic circle is defined as the optimal circle.
[0050] The preset feature circle condition is expressed by formula (9), which is shown below: (9) in, Indicates the actual radius of the characteristic circle. This represents the ideal radius of the characteristic circle.
[0051] When the actual radius of the feature circle meets the preset feature circle conditions, calculate the area of the current feature circle. Define the largest circular area that conforms to the characteristic circle. If the area of the current feature circle is greater than the area of the largest circle, then... Assign the area of the current feature circle to the area of the largest circle. The current feature circle is marked as the optimal circle, and the outline of the optimal circle is drawn.
[0052] In this embodiment, a non-maximum suppression algorithm is also used for feature circle deduplication. The circle with the highest accumulated value is found in the accumulator space and marked as the unique feature circle. Specifically, all detected circles are sorted according to their accumulated values, and the circle with the highest accumulated value is selected as the starting point and added to the final circle set. The remaining circles are traversed and compared with the selected circles. If the current circle overlaps with any selected circle, it is removed; otherwise, it is added to the final circle set. This process continues until all circles have been traversed. By using the non-maximum suppression algorithm, only the circles with the highest accumulated value and no overlap are selected as the final feature circle set, thus achieving feature circle deduplication.
[0053] In one embodiment, prior to performing optimal circle analysis on the rectangular ROI image, the method further includes: The rectangular ROI image is preprocessed with grayscale image, a square Gaussian kernel that meets the requirements of the patch material size is selected, and the standard deviation of the corresponding Gaussian kernel is calculated. Then, discrete Gaussian kernel processing is performed using formula (4) to obtain the discrete Gaussian kernel data of the rectangular ROI image. Formula (4) is shown below: (4) Where represents the weight of the Gaussian kernel at position (i,j) after pixel discretization. This represents the standard deviation of the Gaussian kernel.
[0054] Based on the discrete Gaussian kernel data, the edge pixels of the rectangular ROI image are filled with boundary data. For example, the reflection value or copy value of the edge pixels of the image are used to fill the boundary pixels. Combined with formula (5), the filled edge pixels are subjected to discrete convolution processing. For example, the convolution of the Gaussian kernel with the surrounding pixels can be expressed by formula (5), which is shown below: (5) in, It is the blurred value obtained after convolution. Represents the rectangular ROI image The pixel value at the location.
[0055] Specifically, for each pixel in the image, a weighted average is performed on the surrounding pixels and the corresponding discrete Gaussian kernel. Combined with rational convolution, the discrete Gaussian kernel is multiplied element-wise with the corresponding pixel region of the image, and the results are summed. It should be noted that element-wise multiplication can be performed by iterating through each pixel position of the image using a double loop.
[0056] In this embodiment, the above steps are repeated according to the required degree of blurring, and the blurred image is subjected to Gaussian blurring again until the pixel values that meet the requirements are obtained.
[0057] Hough circle detection is performed on the edge pixels after discrete convolution. The distance between the edge pixel and the center of the circle is calculated based on the detected center and formula (6). Formula (6) is as follows: (6) Where d represents the distance between the edge point and the center of the circle. , These represent the coordinates of the edge points. , These represent the coordinates of the center of the circle.
[0058] In this embodiment, the radius range of the root feature circle is created in a two-dimensional array in the Hough accumulator space. The pixels in the edge image are traversed through the two-dimensional array. For each edge point, the corresponding circle center position and radius are calculated. The corresponding circle center and radius are accumulated in the accumulator space. The image coordinates are transformed into accumulator space coordinates through formula (8), which is shown below: (8) Where a and b are the spatial coordinates of the accumulator, r is the radius of the feature circle, and theta represents the angle of the image coordinates.
[0059] By finding the positions in the accumulator space where the accumulated value is higher than the set threshold, marking them as possible center points and extracting the corresponding circle radius parameters, the distance d between the edge point and the center point is calculated using formula (6).
[0060] Save the center of each circle and its corresponding feature parameters to the vector Circles, including the center coordinates, radius, average gray value, and area of the circle.
[0061] S33: Calculate the relative angle between the center of the optimal circle and the center of the optimal rectangle to obtain the material picking angle of the patch material; Specifically, the calculation of the material taking angle includes the following steps: The relative angle between the center of the optimal circle and the center of the optimal rectangle is calculated using formula (7), as shown below: (7) in, This represents the relative angle between the center of the optimal circle and the center of the optimal rectangle. This represents the difference between the ordinate of the center of the optimal circle and the ordinate of the center of the rectangle. , This represents the difference between the x-coordinate of the center of the optimal circle and the x-coordinate of the center of the rectangle. ,in, , The coordinates of the optimal circle are . , This represents the coordinates of the center of the rectangle.
[0062] After calculating the material picking angle, draw the corresponding angle auxiliary line and represent the corresponding picking angle to facilitate material picking and correction.
[0063] S34: Adjust the pickup position and pickup angle of the patch material according to the pickup angle, and perform recognition deviation compensation processing based on the adjustment results of the pickup position and pickup angle.
[0064] Specifically, the preset material handling device adjusts the pick-up position and pick-up angle of the patch material according to the pick-up angle. After adjusting the pick-up position coordinates and corresponding pick-up angle of the material, the corresponding parameters in the original pick-up program are updated to compensate for the identification deviation, so as to achieve fast and accurate pick-up and placement.
[0065] S4: Install the patch material according to the compensated pick-up angle.
[0066] Specifically, by controlling the robotic arm to pick up the corresponding polarity components onto the surface mount material according to the compensated pick-up angle and position of the surface mount material.
[0067] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.
[0068] In one embodiment, a polarity identification system for patch materials is provided. This system corresponds one-to-one with the polarity identification method for patch materials described in the above embodiments, and is applied to the aforementioned polarity identification method. The patch material polarity identification system includes an image acquisition module, an image processing module, an operation interface module, and a material processing module. Detailed descriptions of each functional module are as follows: The image acquisition module is used to acquire material polarity image data.
[0069] The image processing module is used to perform polarity recognition processing on the polarity image data of the patch material using a preset image processing model.
[0070] The user interface module is used to display material images and corresponding material polarity information.
[0071] The material handling module is used to automatically adjust the material picking position and picking angle based on the material polarity identification results, and to perform material placement.
[0072] Specific limitations regarding the polarity identification system for surface mount materials can be found in the above description of the polarity identification method for surface mount materials, and will not be repeated here. Each module in the aforementioned polarity identification system for surface mount materials can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0073] In one embodiment, a computer device is provided, which may be a server. The computer device includes a processor, memory, a network interface, and a database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores intermediate data generated during the polarity identification process of patch materials. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for polarity identification of patch materials.
[0074] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method for identifying the polarity of a patch material.
[0075] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.
Claims
1. A method for identifying the polarity of a patch material, characterized in that, include: Acquire material image information of the patch material, and preprocess the material image information to obtain polarity image data of the patch material; Based on the polarity image data, determine whether the polarity of the patch material is correctly identified; If not, calculate the material picking angle of the polarity image data, and perform identification deviation compensation processing on the patch material according to the material picking angle; The patch material is mounted according to the compensated pick-up angle of the patch material; The calculation of the sampling angle of the polarity image data, and the subsequent recognition deviation compensation processing of the patch material based on the sampling angle, specifically includes: Perform optimal rectangle analysis on the polarity image data, and draw the optimal rectangle based on the optimal rectangle analysis results; Obtain the rectangular ROI image of the optimal rectangle, perform optimal circle analysis on the rectangular ROI image, and draw the optimal circle based on the optimal circle analysis results; Calculate the relative angle between the center of the optimal circle and the center of the optimal rectangle to obtain the material picking angle of the patch material; The pickup position and pickup angle of the patch material are adjusted according to the pickup angle, and recognition deviation compensation processing is performed based on the adjustment results of the pickup position and pickup angle. The optimal rectangle analysis of the polarity image data specifically includes: Edge detection is performed on the patch material based on the polarity image data to obtain the rectangular edge contour of the patch material; Calculate the perimeter of the rectangle's edge contour, and perform rectangle fitting based on the perimeter. Based on the fitting results, polygon approximation processing is performed on the rectangular edge contours, and the minimum bounding rectangle of each rectangular edge contour is obtained based on the processing results. When the aspect ratio of the minimum bounding rectangle meets the preset rectangle conditions, the minimum bounding rectangle is defined as the optimal rectangle; The optimal circle analysis of the rectangular ROI image specifically includes: Calculate the ideal radius of the feature circle in the rectangular ROI image; Obtain the feature circle data of the rectangular ROI image, and calculate the actual radius corresponding to the feature circle data; When the actual radius meets the preset characteristic circle conditions, the current characteristic circle is defined as the optimal circle.
2. The method for polarity identification of patch materials according to claim 1, characterized in that, The preset rectangular condition is: (1) in, This represents the aspect ratio of the ideal rectangle for the current material. , This represents the actual aspect ratio of the smallest bounding rectangle. .
3. The method for polarity identification of patch materials according to claim 2, characterized in that, The step of performing edge detection on the patch material based on the polarity image data to obtain the rectangular edge contour of the patch material specifically includes: The gradient magnitude and gradient direction of each pixel in the polarity image data are calculated. The gradient magnitude of the pixel is calculated using formula (2), which is shown below: (2) in, This represents the gradient magnitude of a pixel. , These represent the pixel points in... shaft and Gradient calculation results along the axial direction; The gradient direction of the pixel is calculated using formula (3), which is shown below: (3) Non-maximum suppression is performed on each pixel along the gradient direction to select the maximum threshold of the pixel along the gradient direction. Based on the maximum threshold of the pixel, the strong edge pixels and the adjacent weak edge pixels in the gradient direction are connected to form an edge closure connection to obtain a rectangular edge contour.
4. The method for polarity identification of patch materials according to claim 1, characterized in that, The preset feature circle condition is expressed by formula (9), which is shown below: (9) in, Indicates the actual radius of the characteristic circle. This represents the ideal radius of the characteristic circle.
5. The method for polarity identification of patch materials according to claim 4, characterized in that, Before performing optimal circle analysis on the rectangular ROI image, the method further includes: The rectangular ROI image is preprocessed with grayscale and then processed with a discrete Gaussian kernel using formula (4) to obtain the discrete Gaussian kernel data of the rectangular ROI image; formula (4) is shown below: (4) Where represents the weight of the Gaussian kernel at position (i,j) after pixel discretization. This represents the standard deviation of the Gaussian kernel; Based on the discrete Gaussian kernel data, the edge pixels of the rectangular ROI image are filled with boundary filler. Then, the filled edge pixels are subjected to discrete convolution processing using formula (5), which is shown below: (5) in, It is the blurred value obtained after convolution. Represents the rectangular ROI image Pixel value at the location; Hough circle detection is performed on the edge pixels after discrete convolution. The distance between the edge pixel and the center of the circle is calculated based on the detected center and formula (6). Formula (6) is as follows: (6) Where d represents the distance between the edge point and the center of the circle. , These represent the coordinates of the edge points. , These represent the coordinates of the center of the circle.
6. The method for polarity identification of patch material according to claim 1, characterized in that, The calculation of the relative angle between the center of the optimal circle and the center of the optimal rectangle to obtain the material picking angle of the patch material specifically includes: The relative angle between the center of the optimal circle and the center of the optimal rectangle is calculated using formula (7), as shown below: (7) in, This represents the relative angle between the center of the optimal circle and the center of the optimal rectangle. This represents the difference between the ordinate of the center of the optimal circle and the ordinate of the center of the rectangle. , This represents the difference between the x-coordinate of the center of the optimal circle and the x-coordinate of the center of the rectangle. ,in, , Let these be the coordinates of the center of the optimal circle. , This represents the coordinates of the center of the rectangle.
7. A polarity identification system for patch materials, characterized in that, The polarity recognition system is applied to the polarity recognition method according to any one of claims 1-6, comprising: The image acquisition module is used to acquire material polarity image data; The image processing module is used to perform polarity recognition processing on the polarity image data of the patch material using a preset image processing model; The user interface module is used to display material images and corresponding material polarity information; The material handling module is used to automatically adjust the material picking position and picking angle based on the material polarity identification results, and to perform material placement.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the polarity identification method for patch material as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the polarity identification method for patch materials as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Round Mark point positioning method based on connected region filtering
CN103729632A
