A method for constructing a visual model of electroplating quality for injection molded parts

By constructing an acquisition platform and imaging device, performing 3D scanning and linear array camera imaging, and combining color difference matrix analysis, the problem of shadow effects in the visual model of electroplating quality was solved, achieving efficient and accurate electroplating quality detection.

CN123118912APending Publication Date: 2026-11-17SHENZHEN JIAXINDE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611356699.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-03
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing visual modeling techniques for electroplating quality cannot effectively eliminate the influence of shadows on the electroplated surface of injection molded parts, leading to errors in electroplating quality inspection.

Method used

By constructing an acquisition platform and shooting device, 3D scanning modeling and linear array camera shooting are performed to obtain 3D white mold and linear array surface images of injection molded parts. Combined with color difference matrix analysis, electroplated surface features are extracted and abnormal areas are marked.

Benefits of technology

It effectively eliminates the influence of shadows, improves the accuracy and convenience of electroplating quality inspection, and can directly display abnormal areas of electroplating quality in the 3D model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123118912A_ABST
    Figure CN123118912A_ABST
Patent Text Reader

Abstract

This invention discloses a method for constructing a visual model of electroplating quality for injection molded parts, relating to the field of visual model construction technology for electroplating quality. The method includes the following steps: constructing a 3D white model of the injection molded part; capturing images of the injection molded part using a line scan camera to obtain a single-sided surface image; mapping the single-sided surface image onto the surface of the 3D white model to obtain a 3D model; obtaining a defect-free injection molded part as a reference sample, performing feature analysis on the reference sample, and extracting the electroplating surface features of the reference sample; analyzing the surface commonalities of the reference samples based on the electroplating surface features of all reference samples; judging the electroplating quality of the injection molded part based on the surface commonalities, and marking areas of abnormal electroplating quality in the 3D model. This invention addresses the problem that existing electroplating quality visual model construction technologies cannot effectively eliminate the influence of shadows on the electroplated surface on electroplating quality detection, leading to errors in the judgment of electroplating quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of visual model construction technology for electroplating quality, specifically a method for constructing a visual model of electroplating quality for injection molded parts. Background Technology

[0002] Electroplating quality visual model construction technology refers to the use of machine vision and artificial intelligence methods to establish a method that can automatically, accurately, and quantitatively detect and evaluate the surface quality of electroplated injection molded parts.

[0003] Existing visual modeling technologies for electroplating quality typically only build models of injection-molded parts, then rely on manual inspection to determine if the electroplating quality is up to standard. Furthermore, the quality inspection data cannot be effectively mapped onto the model, making it difficult for workers to observe areas of substandard electroplating. Additionally, due to the inherent structure of the injection-molded parts and factors such as lighting, various shadows still exist on the surface after electroplating. These shadows easily affect the judgment of electroplating quality, and existing visual modeling technologies cannot effectively eliminate the influence of these shadows, leading to errors in the assessment of electroplating quality. Moreover, these existing technologies cannot effectively eliminate the influence of shadows on the electroplated surface on electroplating quality inspection, resulting in potential errors in the judgment of electroplating quality. Summary of the Invention

[0004] This invention aims to at least partially solve one of the technical problems in the prior art. By constructing an acquisition platform and an imaging device, the injection molded part is placed at the center of the acquisition platform and 3D scanned and modeled to obtain a 3D white model of the injection molded part. Then, the injection molded part is photographed using a line scan camera to obtain a line scan surface image of the injection molded part. The line scan surface images are combined according to the order of shooting to obtain a single-sided surface image. The single-sided surface image is then mapped onto the surface of the 3D white model to obtain a 3D model. A defect-free injection molded part is obtained as a reference sample. The pixel values ​​in the reference sample are converted into a color difference matrix. Then, feature analysis is performed on the color difference matrix to extract the electroplating surface features of the reference sample. Then, the surface commonalities of the reference samples are analyzed based on the electroplating surface features of all reference samples. Finally, the electroplating quality of the injection molded part is judged based on the surface commonalities. Areas with abnormal electroplating quality of the injection molded part are marked in the 3D model. This solves the problem that existing electroplating quality visual model construction technology still cannot effectively remove the influence of shadows on the electroplating surface on electroplating quality detection, which leads to errors in the judgment of electroplating quality.

[0005] To achieve the above objectives, this application provides a method for constructing a visual model of the electroplating quality of injection molded parts, comprising the following steps: A data acquisition platform and imaging device were constructed. The injection molded part was placed in the center of the acquisition platform and 3D scanning and modeling were performed on the injection molded part to obtain a 3D white model of the injection molded part. The injection molded part is photographed by a line scan camera to obtain a line scan surface image of the injection molded part. The line scan surface images are then combined based on the order in which they were photographed to obtain a single-sided surface image. The single-sided surface image is mapped onto the surface of the 3D white model to obtain the 3D model; Obtain a defect-free injection molded part as a reference sample, perform feature analysis on the reference sample, and extract the electroplated surface features of the reference sample. Analysis of the commonalities of the electroplated surface characteristics of all reference samples; The electroplating quality of injection molded parts is judged based on surface commonalities, and areas with abnormal electroplating quality are marked in the 3D model.

[0006] Furthermore, a data acquisition platform and imaging device are constructed. The injection molded part is placed at the center of the acquisition platform, and a 3D scanning model of the injection molded part is performed to obtain a 3D white model of the injection molded part. This includes the following sub-steps: The data acquisition platform uses pure black as the background color and has a ring light source installed on the top of the platform. The shooting device is a line scan camera and a conveyor belt. The line scan camera is fixed to the side of the acquisition platform and forms a first angle with the acquisition platform. The conveyor belt is used to move the injection molded part, and the moving direction of the conveyor belt is perpendicular to the lens direction of the line scan camera. The injection molded part is placed on the conveyor belt of the acquisition platform, and at the same time, the injection molded part is irradiated by the ring light source group; 3D scanning and modeling technology is used to scan the injection molded part to obtain a 3D white mold of the injection molded part.

[0007] Furthermore, the injection-molded part is photographed using a line-scan camera to obtain a line-scan surface image of the injection-molded part. The line-scan surface images are then combined based on the order in which they were photographed to obtain a single-sided surface image, including the following sub-steps: The injection-molded part is photographed using a line scan camera, resulting in a linear array surface image for each shot. During the shooting process, images are taken from left to right, and the linear array surface images are numbered and labeled PT according to the order in which they were captured. n , where n is a non-zero natural number and n is the index of PT; PT n+1 Placed in PT n On the right side, combined images of a single-sided surface are obtained. Each side of the injection molded part is photographed and analyzed independently to obtain different single-sided surface images. The single-sided surface images do not contain a pure black background color.

[0008] Further, mapping the single-sided surface image onto the surface of the 3D white model to obtain the 3D model includes the following sub-steps: Name the face corresponding to the single-sided surface image in the 3D white model as the target side face; Obtain the front view of the side of the target and name it the target view. Extract the outermost outline of the target view and name it the target outline. Extract the contour of the single-sided surface image and name it the single-sided contour. Overlay and fit the single-sided surface image with the target side, ensuring that the target contour overlaps with the single-sided contour. After fitting all the single-sided surface images to the corresponding target side, the 3D white model is converted from colorless to colored to obtain the 3D model.

[0009] Furthermore, a defect-free injection molded part is obtained as a reference sample. Feature analysis is performed on the reference sample, and the electroplated surface features of the reference sample are extracted, including the following sub-steps: Obtain a defect-free injection molded part as a reference sample, and convert the pixel values ​​in the reference sample into a color difference matrix; Feature analysis was performed on the color difference matrix to extract the electroplated surface features of the reference sample.

[0010] Furthermore, obtaining a defect-free injection molded part as a reference sample and converting the pixel values ​​in the reference sample into a color difference matrix includes the following sub-steps: Obtain a defect-free injection molded part as a reference sample, obtain a single-sided surface image of the reference sample, name it a reference surface image, and group the reference surface images belonging to the same side of the injection molded part into the same side reference group. When analyzing any side reference group, it is named the target reference group, the reference surface image in the target reference group is named the target reference image, and the pixels in the target reference image are numbered and represented by the symbol H(i,j), where i and j are both non-zero natural numbers and (i,j) is the index of H, H(i,j) represents the position in the i-th row and j-th column in the target reference image, and the gray value corresponding to H(i,j) is marked as G(i,j); In the target reference image, H(i-1,j-1), H(i-1,j), H(i-1,j+1), H(i,j-1), H(i,j+1), H(i+1,j-1), H(i+1,j+1), and H(i+1,j+1) are considered to be adjacent to H(i,j). Find the gray value that differs the most from G(i,j) among G(i-1,j-1), G(i-1,j+1), G(i,j-1), G(i,j+1), G(i+1,j-1), G(i+1,j+1), and G(i+1,j+1), and mark it as GF(i,j). Calculate |G(i,j)-GF(i,j)| and mark the calculation result as GR(i,j). Find the maximum values ​​of i and j, label them I and J respectively, construct an I×J matrix, and fill GR(i,j) into the i-th row and j-th column of the matrix to obtain the color difference matrix.

[0011] Further, feature analysis is performed on the color difference matrix to extract the electroplated surface features of the reference sample, including the following sub-steps: Analyze all GR(i,j) of all target reference images, perform cluster analysis on GR(i,j) to obtain different gray-level difference clusters, count the number of GR(i,j) in the gray-level difference clusters, name them as the cluster difference number, name the gray-level difference cluster with the largest cluster difference number as the normal cluster, and name the remaining gray-level difference clusters as the clusters to be identified. The minimum value of GR(i,j) in the cluster to be identified is obtained and named the deviation threshold. The values ​​in the color difference matrix that are less than the deviation threshold are replaced with 0, and the values ​​in the color difference matrix that are greater than or equal to the deviation threshold are replaced with 1, finally obtaining a binary matrix. Find consecutive adjacent digits 1. If consecutive adjacent digits 1 form a closed region, name the contour formed by consecutive adjacent digits 1 as the contour to be analyzed. Extract all the contours to be analyzed, and the contours to be analyzed are the electroplated surface features.

[0012] Furthermore, analyzing the surface commonalities of the reference samples based on the electroplated surface characteristics of all reference samples includes the following sub-steps: If any two contours to be analyzed in any two target reference images have the same H(i,j), then the corresponding two contours to be analyzed are merged to obtain a new contour to be analyzed. All profiles to be analyzed that have the same H(i,j) are merged, the profiles to be analyzed are updated, and the final profiles to be analyzed are named surface commonalities.

[0013] Furthermore, based on surface commonalities, the electroplating quality of the injection molded part is judged, and areas with abnormal electroplating quality are marked in the 3D model, including the following sub-steps: Extract the electroplated surface features of the injection molded part. If all the electroplated surface features are within the surface commonality, output a normal surface signal; otherwise, output an abnormal surface signal. If the output surface is normal, it indicates that there are no defects on the surface of the injection molded part; if the output surface is abnormal, it indicates that there are defects on the surface of the injection molded part. When defects exist on the surface of injection molded parts, the areas with abnormal electroplating quality are marked in the 3D model.

[0014] Furthermore, when defects exist on the surface of the injection molded part, marking the areas of abnormal electroplating quality in the 3D model includes the following sub-steps: Regions of electroplated surface features that are not part of the surface commonality are named abnormal regions. Obtain the location H(i,j) of the abnormal region in the single-sided surface image, and mark the corresponding H(i,j) in the single-sided surface image in red.

[0015] The beneficial effects of this invention are as follows: This invention constructs an acquisition platform and an imaging device, places the injection molded part at the center of the acquisition platform, and performs 3D scanning and modeling on the injection molded part to obtain a 3D white model of the injection molded part. Then, a line scan camera is used to photograph the injection molded part to obtain a line scan surface image of the injection molded part. Based on the order of shooting, the line scan surface images are combined to obtain a single-sided surface image. The single-sided surface image is then mapped onto the surface of the 3D white model to obtain a 3D model. The advantage is that the 3D model is associated with the single-sided surface image for subsequent analysis of electroplating quality without the need for repositioning. If there are abnormal electroplating quality issues, they can be directly displayed in the 3D model based on the position of the pixels, which improves the effectiveness and convenience of constructing a visual model for electroplating quality. This invention uses defect-free injection-molded parts as reference samples, converts the pixel values ​​in the reference samples into a color difference matrix, performs feature analysis on the color difference matrix to extract the electroplating surface features of the reference samples, analyzes the surface commonalities of all reference samples based on the electroplating surface features, and finally judges the electroplating quality of the injection-molded parts based on the surface commonalities. Areas with abnormal electroplating quality in the injection-molded parts are marked in a 3D model. The advantage lies in the fact that converting the color difference matrix effectively eliminates the influence of shadows on the electroplating surface on electroplating quality detection. Then, the changes in grayscale values ​​between pixels at different positions in the color difference matrix are used to analyze the electroplating surface features of the injection-molded parts. Under fixed shooting environment, fixed lighting, and fixed shooting angle conditions, the injection-molded parts should have the same electroplating surface features, i.e., surface commonalities. If differences exist, it indicates that the electroplating quality of the injection-molded parts is abnormal, thus improving the accuracy and effectiveness of electroplating quality detection. Attached Figure Description

[0016] Figure 1This is a flowchart illustrating the steps of the method of the present invention; Figure 2 This is a schematic diagram illustrating how a single-sided surface image is obtained by combining linear array surface images according to the present invention. Figure 3 This is a schematic diagram of a single-sided surface image of the present invention; Figure 4 This is a schematic diagram of the target view of the present invention; Figure 5 This is a schematic diagram of the front view of the target side in a 3D model of the present invention; Figure 6 This is a schematic diagram of the color difference matrix of the present invention; Figure 7 This is a schematic diagram of the binarized matrix of the present invention; Figure 8 This is a schematic diagram of the profile to be analyzed in this invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] Example 1, please refer to Figure 1 As shown, this application provides a method for constructing a visual model of the electroplating quality of injection molded parts, including the following steps: Step S1 involves constructing a data acquisition platform and imaging device, placing the injection molded part at the center of the platform, and performing 3D scanning and modeling of the injection molded part to obtain a 3D white model of the injection molded part. Step S1 includes the following sub-steps: Step S101: The acquisition platform uses pure black as the background color, and a ring light source group is installed on the top of the acquisition platform. Step S102: The shooting device is a line scan camera and a conveyor belt. The line scan camera is fixed to the side of the acquisition platform and forms a first angle with the acquisition platform. The conveyor belt is used to move the injection molded part, and the moving direction of the conveyor belt is perpendicular to the lens direction of the line scan camera. Step S103: Place the injection molded part on the conveyor belt of the acquisition platform, and simultaneously irradiate the injection molded part through the ring light source group; Step S104: The injection molded part is 3D scanned using 3D scanning and modeling technology to obtain a 3D white mold of the injection molded part; In practice, the ring light source group ensures that each surface of the injection molded part receives the same illumination effect. The first included angle is set by the tester. Different first included angles are used depending on the structure of the injection molded part, so that the shooting angle of the line scan camera does not include the ring light source group and the line scan camera being mapped onto the surface of the injection molded part. 3D scanning and modeling technology is existing technology and will not be described in detail in this embodiment. The 3D white model is the uncolored 3D model. The moving direction of the conveyor belt is perpendicular to the lens direction of the line scan camera, so that the distance between the surface photographed by the line scan camera and the line scan camera remains constant when the injection molded part moves.

[0019] Step S2 involves capturing images of the injection-molded part using a line-scan camera to obtain a line-scan surface image of the injection-molded part, and then combining the line-scan surface images based on the order in which they were captured to obtain a single-sided surface image. Step S2 includes the following sub-steps: Please see Figures 2 to 3 As shown, in step S201, the injection-molded part is photographed using a line scan camera. Each photograph yields a line scan surface image. During the photographing process, images are taken from left to right. The line scan surface images are numbered and labeled as PT according to the order in which they were photographed. n , where n is a non-zero natural number and n is the index of PT; Step S202, PT n+1 Placed in PT n On the right side, combined to obtain a single-sided surface image, each side of the injection molded part is photographed and analyzed independently to obtain different single-sided surface images. The single-sided surface image does not contain a pure black background color. In practice, assuming five linear array surface images are captured, PT1 to PT5 are labeled, such as... Figure 2 As shown, Figure 2 There are 5 linear array surface images in total, numbered PT1 to PT5 from left to right. Combining them will yield the desired result. Figure 2 The single-sided surface image on the right represents a side view of the injection-molded part at the currently captured side. Injection-molded parts are typically considered to have six faces, therefore six single-sided surface images are required. Since a pure black background is used, and the injection-molded part is usually not black after electroplating, there is a clear difference between the pure black background and the pure black background. Therefore, the pure black background can be directly removed, retaining only the surface portion of the injection-molded part. This embodiment only lists five linear array surface images because there are too many complete linear array surface images to demonstrate in detail. For example, a certain part might have a total of 104 linear array surface images obtained after being captured, and the combined single-sided surface image would look like this: Figure 3 As shown.

[0020] Step S3: Map the single-sided surface image onto the surface of the 3D white model to obtain the 3D model; Step S3 includes the following sub-steps: Step S301: Name the face corresponding to the single-sided surface image in the 3D white model as the target side face; Please see Figure 4 As shown, in step S302, obtain the front view of the side of the target and name it the target view; extract the outermost contour of the target view and name it the target contour. Please see Figure 5 As shown, in step S303, the contour of the single-sided surface image is extracted and named the single-sided contour. The single-sided surface image is overlapped and fitted with the target side, and the target contour is ensured to overlap with the single-sided contour. After all the single-sided surface images are fitted to the corresponding target side, the 3D white model is converted from colorless to colored to obtain the 3D model. In practice Figure 4 That is, the target view. Figure 4 The outermost contour is the target contour. Since the background color is removed from the single-sided surface image, only the surface image of the injection molded part is retained. Therefore, the contour of the injection molded part in the single-sided surface image is usually the same as the contour of the injection molded part in the target view. That is, the target contour is the same as the single-sided contour. Overlaying the target contour and the single-sided contour allows for coloring the 3D white model, resulting in the 3D model. Figure 3 and Figure 4 By overlapping the elements, you can obtain the front view of the target's side in the 3D model, such as... Figure 5 As shown, if perfect overlap is not possible, ensure that the target contour and the single-sided contour overlap as much as possible.

[0021] Step S4: Obtain a defect-free injection molded part as a reference sample, perform feature analysis on the reference sample, and extract the electroplated surface features of the reference sample; Step S4 includes the following sub-steps: Step S401: Obtain a defect-free injection molded part as a reference sample, and convert the pixel values ​​in the reference sample into a color difference matrix; Step S401 includes the following sub-steps: Step S4011: Obtain a defect-free injection molded part as a reference sample, obtain a single-sided surface image of the reference sample, name it as a reference surface image, and group the reference surface images belonging to the same side of the injection molded part into the same side reference group. In step S4012, when analyzing any side reference group, it is named the target reference group, the reference surface image in the target reference group is named the target reference image, and the pixels in the target reference image are numbered and represented by the symbol H(i,j), where i and j are both non-zero natural numbers and (i,j) is the index of H, and H(i,j) represents the position in the i-th row and j-th column in the target reference image. The gray value corresponding to H(i,j) is marked as G(i,j). In step S4013, in the target reference image, H(i-1,j-1), H(i-1,j), H(i-1,j+1), H(i,j-1), H(i,j+1), H(i+1,j-1), H(i+1,j) and H(i+1,j+1) are considered to be adjacent to H(i,j). Find the gray value that differs the most from G(i,j) among G(i-1,j-1), G(i-1,j+1), G(i,j-1), G(i,j+1), G(i+1,j-1), G(i+1,j) and G(i+1,j+1), and mark it as GF(i,j). Calculate |G(i,j)-GF(i,j)| and mark the calculation result as GR(i,j). Please see Figure 6 As shown, in step S4014, the maximum values ​​of i and j are obtained and labeled as I and J respectively. An I×J matrix is ​​constructed, and GR(i,j) is filled into the i-th row and j-th column of the matrix to obtain the color difference matrix. In practice, the reference samples are provided by the manufacturer. Because each surface of the injection molded part has a different structure and its light and shadow effects vary, each surface needs to be analyzed independently; that is, different side reference groups are defined. Figure 3 Taking the side reference group as the target reference group as an example, then Figure 3The target reference image consists of H(i-1,j-1), H(i-1,j), H(i-1,j+1), H(i,j-1), H(i,j+1), H(i+1,j-1), H(i+1,j+1), and H(i+1,j+1), each with at least one vertex overlapping with H(i,j). Therefore, they are considered adjacent. Since the surface color of the injection-molded part is usually the same after electroplating, the difference in grayscale values ​​between adjacent pixels should be small, with a larger difference only at the contour. If there is a defect at H(i,j), the difference in grayscale value between it and its adjacent pixels will definitely be large. Therefore, G(i-1,j-1), G(i-1,j), G(i-1,j+1), G(i,j-1), G(i,j+1), G(i+1,j-1), and G(i+1,j) are directly selected. The gray value in G(i+1,j+1) that differs most from G(i,j) is taken as GF(i,j) and GR(i,j) is calculated. For example, G(26,38), G(26,39), G(26,40), G(27,38), G(27,40), G(28,38), G(28,39), and G(28,40) are 224, 230, 228, 218, 222, 225, 225, and 205 respectively, while G(28,39) is 223. Among them, 205 has the largest difference from 223, that is, GF(28,39) is 205. The calculated GR(28,39) is 18. I and J are 436 and 424 respectively. Then, a 436×424 matrix is ​​constructed, and GR(i,j) is filled into the i-th row and j-th column of the matrix to obtain the color difference matrix as follows. Figure 6 As shown, due to the large amount of data, it is impossible to display it all. Figure 6 The image only shows a small portion of the color difference matrix data as an example.

[0022] Step S402: Perform feature analysis on the color difference matrix and extract the electroplating surface features of the reference sample; Step S402 includes the following sub-steps: Step S4021: Analyze all GR(i,j) of all target reference images, perform cluster analysis on GR(i,j) to obtain different gray-level difference clusters, count the number of GR(i,j) in the gray-level difference clusters, name them as the cluster difference number, name the gray-level difference cluster with the largest cluster difference number as the normal cluster, and name the remaining gray-level difference clusters as the clusters to be identified. Please see Figure 7 As shown, in step S4022, the minimum value of GR(i,j) in the cluster to be identified is obtained and named the deviation threshold. The values ​​in the color difference matrix that are less than the deviation threshold are replaced with 0, and the values ​​in the color difference matrix that are greater than or equal to the deviation threshold are replaced with 1, and finally a binary matrix is ​​obtained. Please see Figure 8As shown, in step S4023, find consecutive adjacent numbers 1. If consecutive adjacent numbers 1 form a closed area, name the contour formed by consecutive adjacent numbers 1 as the contour to be analyzed. Extract all the contours to be analyzed. The contours to be analyzed are the features of the electroplated surface. In practice, the grayscale value difference between normal surfaces is small, while the grayscale value difference between abnormal surfaces and normal surfaces is large, making them clearly distinct. Cluster analysis can classify them into different clusters. Normal surfaces typically account for the largest proportion, meaning the grayscale difference cluster with the largest number of cluster differences belongs to the pixels corresponding to normal surfaces, and therefore requires no further analysis. The remaining grayscale difference clusters may be deviations caused by light and shadow on the injection molded part surface or by electroplating defects, thus requiring further analysis. For example, if there are 3 clusters to be identified, and the deviation threshold is found to be 15, then values ​​less than 15 in the color difference matrix are replaced with 0, and values ​​greater than or equal to 15 are replaced with 1, resulting in a final binarized matrix as shown below. Figure 7 As shown, finding consecutive adjacent digits of 1 yields the outline to be analyzed. Figure 8 As shown, Figure 8 The black area in the diagram represents the contour to be analyzed.

[0023] Step S5: Analyze the surface commonalities of the reference samples based on the electroplated surface characteristics of all reference samples; Step S5 includes the following sub-steps: Step S501: If any two contours to be analyzed in any two target reference images have the same H(i,j), then the corresponding two contours to be analyzed are merged to obtain a new contour to be analyzed. Step S502: Merge all the contours to be analyzed that have the same H(i,j), update the contours to be analyzed, and name the final contours to be analyzed as surface commonality. In practice, the shadows on the surface of the injection molded part and the contours generated by the contours are usually in roughly the same position, but there may be slight deviations. Therefore, if any two contours to be analyzed in any two target reference images have the same H(i,j), the corresponding two contours to be analyzed are merged to obtain a new contour to be analyzed. The surface commonality to be analyzed is the commonality of the surface of the injection molded part after considering the influence of shadows and contours. It will not affect the detection of electroplating quality because the surface commonality is the contour of the shadow part, not the entire shadow part, and the contour part is relatively thin, so it is difficult to affect the analysis results.

[0024] Step S6: Based on surface commonalities, the electroplating quality of the injection molded part is judged, and areas with abnormal electroplating quality are marked in the 3D model; Step S6 includes the following sub-steps: Step S601: Extract the electroplated surface features of the injection molded part. If all the electroplated surface features are within the surface commonality, output a normal surface signal; otherwise, output an abnormal surface signal. Step S602: If a normal surface signal is output, the surface of the injection molded part is marked as having no defects; if an abnormal surface signal is output, the surface of the injection molded part is marked as having defects. In practice, if all the features of the electroplated surface are within the common surface characteristics, it means that the electroplated surface features are due to a large deviation in grayscale values ​​caused by shadows or contours, rather than a defect in the electroplating.

[0025] Step S603: When there are defects on the surface of the injection molded part, mark the area of ​​abnormal electroplating quality of the injection molded part in the 3D model; Step S603 includes the following sub-steps: Step S6031: The regions of electroplated surface features that are not within the surface commonality are named abnormal regions; Step S6032: Obtain the location H(i,j) of the abnormal region in the single-sided surface image, and mark the corresponding H(i,j) in the single-sided surface image as red; In practice, for example, if there is an abnormal area at H(168,413), the pixel corresponding to H(168,413) in the single-sided surface image will be marked in red, so that the user can clearly observe the defect location of the surface electroplating.

[0026] Example 2: This application provides an electronic device, which may include a processor, a communication interface, a memory, and a communication bus. The processor, communication interface, and memory communicate with each other via the communication bus. The memory stores computer-readable instructions. The processor can call the instructions in the memory. When the computer-readable instructions are executed by the processor, steps such as those in a method for constructing a visual model of the electroplating quality of injection molded parts are performed to achieve the following functions: constructing a 3D white model of the injection molded part; taking a picture of the injection molded part using a line scan camera to obtain a single-sided surface image; mapping the single-sided surface image onto the surface of the 3D white model to obtain a 3D model; obtaining a defect-free injection molded part as a reference sample; performing feature analysis on the reference sample to extract the electroplating surface features of the reference sample; analyzing the surface commonalities of the reference samples based on the electroplating surface features of all reference samples; judging the electroplating quality of the injection molded part based on the surface commonalities; and marking areas of abnormal electroplating quality in the injection molded part in the 3D model.

[0027] Furthermore, when the logical instructions in the aforementioned memory can be implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0028] Example 3: This application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute a method for constructing a visual model of the electroplating quality of injection molded parts provided by the above methods. The method includes: constructing a 3D white model of the injection molded part; taking a picture of the injection molded part using a line scan camera to obtain a single-sided surface image; mapping the single-sided surface image onto the surface of the 3D white model to obtain a 3D model; obtaining a defect-free injection molded part as a reference sample; performing feature analysis on the reference sample to extract the electroplating surface features of the reference sample; analyzing the surface commonalities of the reference samples based on the electroplating surface features of all reference samples; judging the electroplating quality of the injection molded part based on the surface commonalities; and marking the areas of abnormal electroplating quality of the injection molded part in the 3D model.

[0029] Example 4: This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it performs the steps of the above-described method for constructing a visual model of the electroplating quality of injection molded parts to achieve the following functions: constructing a 3D white model of the injection molded part; taking a picture of the injection molded part using a line scan camera to obtain a single-sided surface image; mapping the single-sided surface image onto the surface of the 3D white model to obtain a 3D model; obtaining a defect-free injection molded part as a reference sample, performing feature analysis on the reference sample, and extracting the electroplating surface features of the reference sample; analyzing the surface commonalities of the reference samples based on the electroplating surface features of all reference samples; judging the electroplating quality of the injection molded part based on the surface commonalities, and marking the areas of abnormal electroplating quality of the injection molded part in the 3D model.

[0030] Based on the above description of the embodiments, the embodiments of the present invention can be provided as methods, systems, or computer program products. Based on this understanding, the above technical solutions, in essence or in terms of their contribution to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or certain parts of the embodiments.

[0031] In the embodiments provided in this application, it should be understood that the disclosed system or method can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules or units is only a logical functional division, and there may be other division methods in actual implementation. Furthermore, multiple modules or units may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces. The indirect coupling or communication connection between systems, modules, and units may be electrical, mechanical, or other forms.

[0032] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for constructing a visual model of the electroplating quality of injection molded parts, characterized in that, Includes the following steps: A data acquisition platform and imaging device were constructed. The injection molded part was placed in the center of the acquisition platform and 3D scanning and modeling were performed on the injection molded part to obtain a 3D white model of the injection molded part. The injection molded part is photographed by a line scan camera to obtain a line scan surface image of the injection molded part. The line scan surface images are then combined based on the order in which they were photographed to obtain a single-sided surface image. The single-sided surface image is mapped onto the surface of the 3D white model to obtain the 3D model; Obtain a defect-free injection molded part as a reference sample, perform feature analysis on the reference sample, and extract the electroplated surface features of the reference sample. Analysis of the commonalities of the electroplated surface characteristics of all reference samples; The electroplating quality of injection molded parts is judged based on surface commonalities, and areas with abnormal electroplating quality are marked in the 3D model.

2. The method according to claim 1, wherein, The process of constructing a data acquisition platform and imaging device, placing the injection molded part at the center of the platform, and performing 3D scanning and modeling of the injection molded part to obtain a 3D white model of the injection molded part includes the following sub-steps: The data acquisition platform uses pure black as the background color and has a ring light source installed on the top of the platform. The shooting device is a line scan camera and a conveyor belt. The line scan camera is fixed to the side of the acquisition platform and forms a first angle with the acquisition platform. The conveyor belt is used to move the injection molded part, and the moving direction of the conveyor belt is perpendicular to the lens direction of the line scan camera. The injection molded part is placed on the conveyor belt of the acquisition platform, and at the same time, the injection molded part is irradiated by the ring light source group; 3D scanning and modeling technology is used to scan the injection molded part to obtain a 3D white mold of the injection molded part.

3. The method according to claim 2, wherein, The injection molded part is photographed using a line scan camera to obtain a line scan surface image of the injection molded part. The line scan surface images are then combined based on the order in which they were photographed to obtain a single-sided surface image. The process includes the following sub-steps: The injection molding part is photographed by a linear array camera, and each time of photographing obtains a linear array surface image. In the photographing process, the linear array surface images are numbered in the order from left to right, and the linear array surface images are marked as PT n wherein n is a non-zero natural number and n is the serial number of PT. The PT n+1 is placed on the right side of the PT n , and the combination obtains a single-sided surface image. Each side of the injection molded part is independently photographed and analyzed to obtain different single-sided surface images that do not contain a black background color.

4. The method according to claim 3, wherein, Mapping a single-sided surface image onto the surface of a 3D white model to obtain a 3D model includes the following sub-steps: Name the face corresponding to the single-sided surface image in the 3D white model as the target side face; Obtain the front view of the side of the target and name it the target view. Extract the outermost outline of the target view and name it the target outline. Extract the contour of the single-sided surface image and name it the single-sided contour. Overlay and fit the single-sided surface image with the target side, ensuring that the target contour overlaps with the single-sided contour. After fitting all the single-sided surface images to the corresponding target side, the 3D white model is converted from colorless to colored to obtain the 3D model.

5. The method according to claim 4, wherein, Obtain a defect-free injection molded part as a reference sample, perform feature analysis on the reference sample, and extract the electroplated surface features of the reference sample, including the following sub-steps: Obtain a defect-free injection molded part as a reference sample, and convert the pixel values ​​in the reference sample into a color difference matrix; Feature analysis was performed on the color difference matrix to extract the electroplated surface features of the reference sample.

6. The method according to claim 5, wherein, Obtaining a defect-free injection molded part as a reference sample, and converting the pixel values ​​in the reference sample into a color difference matrix includes the following sub-steps: Obtain a defect-free injection molded part as a reference sample, obtain a single-sided surface image of the reference sample, name it a reference surface image, and group the reference surface images belonging to the same side of the injection molded part into the same side reference group. When analyzing any side reference group, it is named the target reference group, the reference surface image in the target reference group is named the target reference image, and the pixels in the target reference image are numbered and represented by the symbol H(i,j), where i and j are both non-zero natural numbers and (i,j) is the index of H, H(i,j) represents the position in the i-th row and j-th column in the target reference image, and the gray value corresponding to H(i,j) is marked as G(i,j); In the target reference image, H(i-1,j-1), H(i-1,j), H(i-1,j+1), H(i,j-1), H(i,j+1), H(i+1,j-1), H(i+1,j+1), and H(i+1,j+1) are considered to be adjacent to H(i,j). Find the gray value that differs the most from G(i,j) among G(i-1,j-1), G(i-1,j+1), G(i,j-1), G(i,j+1), G(i+1,j-1), G(i+1,j+1), and G(i+1,j+1), and mark it as GF(i,j). Calculate |G(i,j)-GF(i,j)| and mark the calculation result as GR(i,j). Find the maximum values ​​of i and j, label them I and J respectively, construct an I×J matrix, and fill GR(i,j) into the i-th row and j-th column of the matrix to obtain the color difference matrix.

7. The method of claim 6, wherein the method further comprises: The feature analysis of the color difference matrix and the extraction of electroplated surface features of the reference sample include the following sub-steps: Analyze all GR(i,j) of all target reference images, perform cluster analysis on GR(i,j) to obtain different gray-level difference clusters, count the number of GR(i,j) in the gray-level difference clusters, name them as the cluster difference number, name the gray-level difference cluster with the largest cluster difference number as the normal cluster, and name the remaining gray-level difference clusters as the clusters to be identified. The minimum value of GR(i,j) in the cluster to be identified is obtained and named the deviation threshold. The values ​​in the color difference matrix that are less than the deviation threshold are replaced with 0, and the values ​​in the color difference matrix that are greater than or equal to the deviation threshold are replaced with 1, finally obtaining a binary matrix. Find consecutive adjacent digits 1. If consecutive adjacent digits 1 form a closed region, name the contour formed by consecutive adjacent digits 1 as the contour to be analyzed. Extract all the contours to be analyzed, and the contours to be analyzed are the electroplated surface features.

8. The method of claim 7, wherein the method further comprises: The analysis of the commonalities of the electroplated surface characteristics of all reference samples includes the following sub-steps: If any two contours to be analyzed in any two target reference images have the same H(i,j), then the corresponding two contours to be analyzed are merged to obtain a new contour to be analyzed. All profiles to be analyzed that have the same H(i,j) are merged, the profiles to be analyzed are updated, and the final profiles to be analyzed are named surface commonalities.

9. The method of claim 8, wherein the method further comprises: Judging the electroplating quality of injection molded parts based on surface commonalities, and marking areas with abnormal electroplating quality in the 3D model, includes the following sub-steps: Extract the electroplated surface features of the injection molded part. If all the electroplated surface features are within the surface commonality, output a normal surface signal; otherwise, output an abnormal surface signal. If the output surface normal signal indicates that there are no defects on the surface of the injection molded part, the output surface abnormal signal indicates that there are defects on the surface of the injection molded part. When defects exist on the surface of injection molded parts, the areas with abnormal electroplating quality are marked in the 3D model.

10. The method of claim 9, wherein the method further comprises: When defects exist on the surface of an injection molded part, marking the areas of abnormal electroplating quality in the 3D model includes the following sub-steps: Regions of electroplated surface features that are not part of the surface commonality are named abnormal regions. Obtain the location H(i,j) of the abnormal region in the single-sided surface image, and mark the corresponding H(i,j) in the single-sided surface image in red.