CN-122023352-A - Metal button electroplating uniformity evaluation method based on machine vision
Abstract
The application relates to the technical field of visual detection and provides a machine vision-based metal button electroplating uniformity evaluation method, which comprises the steps of collecting a metal button gray level map and a metal button depth map which are subjected to space alignment treatment, and obtaining a region to be confirmed; the method comprises the steps of calculating basic gradients, detail gradients and depth gradients of pixel points, carrying out first denoising and second denoising on a region to be confirmed to obtain a region to be confirmed with qualified denoising effect quality, calculating the denoising basic gradients and denoising detail gradients of the pixel points, establishing high-frequency texture feature vectors of the pixel points, determining defect types corresponding to the region to be confirmed, calculating the defect combination influence degree of metal buttons according to the number of the pixel points and the denoising detail gradients in the region to be confirmed of all defect types, and obtaining metal button electroplating uniformity evaluation results according to the defect combination influence degree. The application aims to improve the accuracy of the electroplating uniformity evaluation result of the metal button.
Inventors
- JIN RONGZHENG
- Tan Laiying
- LI GUOFEN
Assignees
- 惠州市恒兴隆科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260202
Claims (10)
- 1. The metal button electroplating uniformity evaluation method based on machine vision is characterized by comprising the following steps of: collecting a metal button gray level image and a depth image which are subjected to space alignment treatment, and acquiring a region to be confirmed in the depth image according to the difference between the depth values of all pixel points in the depth image; According to the gray value and the depth value of the pixel point in the area to be confirmed, respectively calculating the basic gradient, the detail gradient and the depth gradient of the pixel point, according to the depth gradient and the basic gradient of the pixel point in the area to be confirmed, selecting a guiding filter to perform first denoising on the area to be confirmed, acquiring a region to be confirmed with the quality of primary denoising effect reaching the standard, performing second denoising on the region to be confirmed with the quality of primary denoising effect reaching the standard, acquiring the region to be confirmed with the quality of secondary denoising effect reaching the standard according to the difference of the edge information of the detail gradient in the region to be confirmed before and after the second denoising, and calculating the denoising basic gradient and the denoising detail gradient of the pixel point; According to the depth gradient and the denoising basic gradient of the pixel point, the denoising detail gradient of all the pixel points in the local window of the pixel point and the positions of the edge pixel points, establishing high-frequency texture feature vectors of the pixel point, and according to the high-frequency texture feature vectors of all the pixel points in the region to be confirmed, determining the defect type corresponding to the region to be confirmed; and calculating the defect comprehensive influence degree of the metal buttons according to the number of pixel points and denoising detail gradients in the region to be confirmed of all defect types, and obtaining the electroplating uniformity evaluation result of the metal buttons according to the defect comprehensive influence degree.
- 2. The machine vision-based metal button electroplating uniformity evaluation method according to claim 1, wherein the specific acquisition method of the area to be confirmed in the depth map is as follows: Randomly generating the positions of seed points of a region growing algorithm, and dividing the pixel points with absolute values of differences from the depth values of the adjacent pixel points being smaller than or equal to preset adjacent depth differences into the same connected domain by using the region growing algorithm; Recording gradient values of depth values of pixel points in the depth map as gradient values of the pixel points; The average value of all the depth values which are greater than or equal to 25% quantiles of the depth values and less than or equal to 75% quantiles of the depth values in the depth map is recorded as the reference depth of the depth map, and the difference value between the depth value of the pixel point in the depth map and the reference depth of the depth map is recorded as the relative depth of the pixel point; Determining an inclined plane area to be confirmed, a concave LOGO area to be confirmed and an inner wall area of a button hole to be confirmed according to gradient values and relative depths of pixel points in the connected domain and the circularity of the connected domain; and marking the inclined plane area to be confirmed, the concave LOGO area to be confirmed and the inner wall area of the button hole to be confirmed as the areas to be confirmed.
- 3. The machine vision-based metal button electroplating uniformity evaluation method according to claim 1, wherein the specific calculation method of the basic gradient, the detail gradient and the depth gradient of the pixel point is as follows: The gradient value calculated by the Prewitt gradient operator on the gray value of the pixel point is marked as the basic gradient of the pixel point; the gradient value calculated by the Sobel operator on the gray value of the pixel point is recorded as the basic gradient of the pixel point; and (5) recording the gradient value calculated by the depth value of the pixel point as the depth gradient of the pixel point.
- 4. The machine vision-based metal button electroplating uniformity evaluation method according to claim 1, wherein the selecting the guided filter to perform the first denoising of the area to be confirmed according to the depth gradient and the basic gradient of the pixel point in the area to be confirmed comprises the following specific steps: the ratio of the number 1 to the depth gradient of the pixel point is recorded as the self-adaptive guiding weight of the pixel point; And taking the self-adaptive guide weight of the pixel point as the guide weight value of the guide filtering pixel point, and denoising the region to be confirmed for the first time by using the guide filtering.
- 5. The machine vision-based metal button electroplating uniformity evaluation method according to claim 4, wherein the method for determining the area to be confirmed, in which the quality of the primary denoising effect reaches the standard, is as follows: comparing the reduced percentage of the variance of the basic gradient of the pixel points contained in the region to be confirmed after the first denoising with the region to be confirmed before denoising, and marking the reduced percentage as a first denoising effect of the region to be confirmed; when the primary denoising effect of the area to be confirmed is greater than or equal to a preset primary denoising effect threshold value, judging that the primary denoising effect quality reaches the standard; When the primary denoising effect of the region to be confirmed is smaller than a preset primary denoising effect threshold value, taking 85% of the self-adaptive guiding weight of the pixel point as a new value of the self-adaptive guiding weight of the pixel point, denoising the region to be confirmed again, judging whether the primary denoising effect quality meets the standard, if not, reducing the self-adaptive guiding weight of the pixel point by taking 0.05 as a step length, denoising the region to be confirmed again, and judging whether the primary denoising effect quality meets the standard until the primary denoising effect quality meets the standard or the self-adaptive guiding weight of the pixel point is smaller than 0.1; when the self-adaptive guiding weight of the pixel point is smaller than 0.1, the side length of the filter kernel is increased by taking 2 as a step length, the region to be confirmed is denoised, and whether the quality of the primary denoising effect reaches the standard is judged until the quality of the primary denoising effect reaches the standard.
- 6. The method for evaluating the electroplating uniformity of the metal button based on machine vision according to claim 1, wherein the obtaining the region to be confirmed with the quality reaching the standard of the secondary denoising effect according to the difference of edge information of detail gradients in the region to be confirmed before and after the secondary denoising comprises the following specific steps: comparing the area to be confirmed after the second denoising with the percentage of the reduction of the number of the edge pixel points contained in the area to be confirmed before denoising, and marking the percentage as the secondary denoising effect of the area to be confirmed; When the secondary denoising effect of the area to be confirmed is greater than or equal to a preset secondary denoising effect threshold value, judging that the quality of the secondary denoising effect reaches the standard; And when the number of the pixel points contained in all the edge pixel connected domains is smaller than a first number threshold, carrying out secondary denoising on the area to be confirmed again by taking 95% of a preset fixed weight as a new value of a guiding weight, judging whether the quality of the secondary denoising effect is up to standard or not, if the quality is not up to standard, reducing the guiding weight by taking 0.02 as a step length, denoising the area to be confirmed again, judging whether the quality of the secondary denoising effect is up to standard or not until the quality of the secondary denoising effect is up to standard or not, and when the number of the pixel points contained in all the edge pixel connected domains is larger than or equal to the first number threshold, carrying out secondary denoising on the area to be confirmed again by taking 105% of the preset fixed weight as the new value of the guiding weight, judging whether the quality of the secondary denoising effect is up to standard or not, if the quality is not up to standard, increasing the guiding weight by taking 0.02 as the step length, and judging whether the quality of the secondary denoising effect is up to standard or not again.
- 7. The machine vision-based metal button electroplating uniformity evaluation method according to claim 1, wherein the method for obtaining the denoising basic gradient and the denoising detail gradient of the pixel point is as follows: and calculating the basic gradient and the detail gradient of each pixel point in the region to be confirmed, and marking the basic gradient and the detail gradient as the denoising basic gradient and the denoising detail gradient of the pixel point.
- 8. The machine vision-based metal button electroplating uniformity evaluation method according to claim 1, wherein the specific construction steps of the high-frequency texture feature vector of the pixel point are as follows: The average value of the denoising basic gradients of all the pixel points contained in the four adjacent pixel points is recorded as the adjacent denoising basic gradient of the pixel point, and the absolute value of the difference value between the denoising basic gradient of the pixel point and the adjacent denoising basic gradient is recorded as the denoising basic gradient difference of the pixel point; taking a pixel point as a center, marking the average value of denoising detail gradients of all the pixel points in a local window with a side length of a first preset length as an adjacent denoising detail gradient of the pixel point serving as the center, and marking the absolute value of the difference value between the denoising detail gradient of the pixel point and the adjacent denoising detail gradient as the gray level abnormal deviation of the pixel point; Carrying out connected domain analysis on all edge pixel points in a local window taking a pixel point as a center and taking the side length as a first preset length to obtain an edge connected domain, and marking the maximum value of the number of the edge pixel points contained in all the edge connected domain as the neighborhood same-direction edge number of the pixel point serving as the center; taking a pixel point as a center, and marking the minimum value of denoising detail gradients of all the pixel points in a local window with the side length of a first preset length as a local gray characteristic value of the pixel point serving as the center; and sequentially arranging the depth gradient coefficient, the gray level abnormal deviation, the neighborhood same-direction edge number and the local gray level characteristic value of the pixel point to obtain a high-frequency texture characteristic vector of the pixel point.
- 9. The machine vision-based metal button electroplating uniformity evaluation method according to claim 1, wherein the determination method of the defect type corresponding to the area to be confirmed is as follows: Processing high-frequency texture feature vectors of all pixel points in the area to be confirmed by adopting a random forest algorithm, and obtaining the defect type corresponding to the area to be confirmed; the defect types corresponding to the area to be confirmed comprise pseudo defects, yellowing defects, flow mark defects and black angle defects.
- 10. The machine vision-based metal button electroplating uniformity evaluation method according to claim 1, wherein the method for calculating the defect ensemble influence of the metal button is as follows: Marking the minimum value of the denoising detail gradients of all the pixel points in the region to be confirmed as a first minimum value, and marking the normalized value of the average value of the absolute values of the difference values of the denoising detail gradients of all the pixel points in the region to be confirmed of the same kind of defect type and the first minimum value as the gray level abnormality degree of the same kind of defect type; The ratio of the number of the pixels contained in the region to be confirmed of the same type of defect type to the total number of the pixels contained in all the regions to be confirmed is recorded as the defect density of the same type of defect type, and the ratio of the defect density of the same type of defect type to the maximum value of the defect densities of all types of defect type is recorded as the relative defect density of the same type of defect type; and (3) marking the positive correlation processing results of the gray level abnormality degree and the relative defect density of all the defect types of the same type as the defect comprehensive influence degree of the metal button.
Description
Metal button electroplating uniformity evaluation method based on machine vision Technical Field The application relates to the technical field of visual detection, in particular to a machine vision-based metal button electroplating uniformity evaluation method. Background The metal buttons are key accessories of clothes and bags, and the electroplating uniformity of the metal buttons directly determines the appearance texture, corrosion resistance and service life of the metal buttons. The metal button electroplating uniformity evaluation is realized based on machine vision, subjective deviation can be eliminated according to objective and consistent standard quantitative evaluation, and the evaluation time of a single button is greatly shortened. In the process of realizing metal button electroplating uniformity evaluation based on machine vision, areas such as carving LOGO characters, grooves, buttonholes and the like of a metal button can be influenced by local illumination blind areas formed by side walls, so that structural shadows, metal reflection and real defects are mixed up, recognition is difficult, and the metal button electroplating uniformity evaluation result is inaccurate. Disclosure of Invention The application provides a machine vision-based metal button electroplating uniformity evaluation method, which aims to solve the problem that an uneven structure of a metal button is affected by a local illumination blind area formed by a side wall, so that structural shadows, metal reflection and real defects are difficult to recognize, and the metal button electroplating uniformity evaluation result is inaccurate, and adopts the following specific technical scheme: One embodiment of the application provides a machine vision-based metal button electroplating uniformity evaluation method, which comprises the following steps: collecting a metal button gray level image and a depth image which are subjected to space alignment treatment, and acquiring a region to be confirmed in the depth image according to the difference between the depth values of all pixel points in the depth image; According to the gray value and the depth value of the pixel point in the area to be confirmed, respectively calculating the basic gradient, the detail gradient and the depth gradient of the pixel point, according to the depth gradient and the basic gradient of the pixel point in the area to be confirmed, selecting a guiding filter to perform first denoising on the area to be confirmed, acquiring a region to be confirmed with the quality of primary denoising effect reaching the standard, performing second denoising on the region to be confirmed with the quality of primary denoising effect reaching the standard, acquiring the region to be confirmed with the quality of secondary denoising effect reaching the standard according to the difference of the edge information of the detail gradient in the region to be confirmed before and after the second denoising, and calculating the denoising basic gradient and the denoising detail gradient of the pixel point; According to the depth gradient and the denoising basic gradient of the pixel point, the denoising detail gradient of all the pixel points in the local window of the pixel point and the positions of the edge pixel points, establishing high-frequency texture feature vectors of the pixel point, and according to the high-frequency texture feature vectors of all the pixel points in the region to be confirmed, determining the defect type corresponding to the region to be confirmed; and calculating the defect comprehensive influence degree of the metal buttons according to the number of pixel points and denoising detail gradients in the region to be confirmed of all defect types, and obtaining the electroplating uniformity evaluation result of the metal buttons according to the defect comprehensive influence degree. Further, the specific acquisition method of the region to be confirmed in the depth map comprises the following steps: Randomly generating the positions of seed points of a region growing algorithm, and dividing the pixel points with absolute values of differences from the depth values of the adjacent pixel points being smaller than or equal to preset adjacent depth differences into the same connected domain by using the region growing algorithm; Recording gradient values of depth values of pixel points in the depth map as gradient values of the pixel points; The average value of all the depth values which are greater than or equal to 25% quantiles of the depth values and less than or equal to 75% quantiles of the depth values in the depth map is recorded as the reference depth of the depth map, and the difference value between the depth value of the pixel point in the depth map and the reference depth of the depth map is recorded as the relative depth of the pixel point; Determining an inclined plane area to be confirmed, a concave LOGO area to be confirmed and an