Intelligent detection method of electronic device casing based on machine vision
By subdividing the monitoring period into short periods, calculating the quantity difference, fitting the curve, and filtering the abnormal curve, the problem of lack of in-depth analysis after machine vision detection is solved, and the refined tracking of defect trends and providing improvement basis is achieved.
Patent Information
- Application Number
- CN202411664400.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2044-11-20
AI Technical Summary
The existing machine vision detection methods lack in-depth analysis after detecting defects in electronic equipment housings, making it difficult to provide a scientific basis for improving production quality.
By dividing the monitoring period into short periods, calculating the quantity difference value and fitting the curve, setting the quantity difference value level, filtering the abnormal curve, combining the influence coefficient and sorting position, determining the types of defects with poor improvement effects.
It realizes refined tracking and trend analysis of defect conditions, improves analysis efficiency and accuracy, and provides a basis for targeted improvement.
Smart Images

Figure CN119515852B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data analysis, and in particular to an intelligent detection method for electronic device casings based on machine vision. Background Art
[0002] The casings of electronic devices such as mobile phones and tablets are not just simple barriers that protect the devices from drops, scratches and external impacts, but are also important elements that enhance user experience and highlight personality, and are a key part of protecting the precision components inside.
[0003] Defect detection for finished mobile phone casings typically relies on manual inspection, with quality inspectors visually assessing the presence of flaws. However, this method is not only labor-intensive and time-consuming, but also highly reliant on the inspector's experience and judgment, lacking scientific consistency and prone to human error. With the rapid development of artificial intelligence and machine learning technologies, these technologies have demonstrated tremendous potential and advantages in many fields. Due to their high precision, automation, scalability, and stable detection results, they are widely used in device casing defect detection.
[0004] However, although machine vision inspection methods can quickly screen out defective shell products and eliminate them, subsequent processing often only stops at the level of reworking or directly eliminating these defective products, lacking further in-depth analysis, making it difficult to provide a scientific basis for improving production quality. Summary of the Invention
[0005] The purpose of the present invention is to provide an intelligent detection method for electronic device housings based on machine vision to solve the following technical problems:
[0006] Although machine vision inspection methods can quickly screen out defective shell products and eliminate them, subsequent processing often only involves reworking or directly eliminating these defective products, lacking further in-depth analysis, making it difficult to provide a scientific basis for quality improvement.
[0007] The purpose of the present invention can be achieved through the following technical solutions:
[0008] The intelligent detection method of electronic device housing based on machine vision includes the following steps:
[0009] S1: Divide a preset monitoring period into n sub-periods of equal length, where n is a first preset number, obtain inspection records of electronic device casings within the sub-periods, and determine the total number of electronic device casings with the same defect type;
[0010] S2: Calculate the quantity difference ΔCa=Ca-Cys, where Ca represents the total number of electronic equipment housings with the same defect type in the i-th sub-period. Cb' represents the total number of electronic equipment casings with the same defect type in the b-th sub-period in the previous monitoring period adjacent to the current monitoring period, generating coordinate points (a, ΔCa), and fitting the coordinate points to obtain a fitting curve f(t);
[0011] Determine a maximum quantity difference ΔCmax=max(ΔCJH), ΔCJH=(max(f1(t)), max(f2(t)), …, max(fm(t))), where fm(t) represents a fitting curve corresponding to the mth type of defect, set a quantity difference interval [0, ΔCmax], and set N quantity difference levels from low to high within the quantity difference interval at a preset quantity difference interval, where N is a second preset number;
[0012] S3: Taking the portion of the fitting curve within the single quantitative difference level as the target curve, determining the ratio of the definition domain of the target curve to the definition domain of the fitting curve, taking it as the target ratio, screening abnormal curves based on the target ratio, and determining that the defect type corresponding to the abnormal curve has a poor improvement effect.
[0013] As a further solution of the present invention: in step S3, the process of screening abnormal curves based on the target ratio more specifically includes:
[0014] Determine the influence coefficient YXi of the i-th quantity difference level = i*γ, where γ is a preset correction coefficient;
[0015] Sorting the target ratios according to size, where the larger the target ratio, the lower its position in the sorting, and determining the position of the target ratio in the sorting;
[0016] Calculating judgment scores Among them, Fi represents the ranking position of the target proportion in the ranking corresponding to the i-th quantity difference level. When the judgment score P≥Pys, the corresponding fitting curve is used as the abnormal curve, and Pys represents the preset judgment score threshold.
[0017] As a further solution of the present invention: in step S1, the process of determining the defect of the electronic device housing specifically includes:
[0018] Establishing a database, wherein the database stores images of electronic device housings with marked defect types;
[0019] A defect recognition model is established based on the deep learning model, the defect recognition model is trained and verified through the database, and the image of the electronic device casing is input into the trained defect recognition model to obtain the defect type of the electronic device casing.
[0020] As a further solution of the present invention, the process of determining the defect type of the electronic device housing further includes the following steps:
[0021] A preset number of electronic device housing images are randomly selected, and the defect types corresponding to the electronic device housing images are manually determined.
[0022] When the defect type determined manually is different from the defect type determined by the defect recognition model, the defect type determined manually and the corresponding electronic device casing image are input into the defect recognition model together, and deep learning training is performed again.
[0023] As a further solution of the present invention: the image of the electronic device housing is acquired at a preset position based on a camera device.
[0024] As a further solution of the present invention: the step S1 further includes the following steps:
[0025] When the quantity difference corresponding to a single sub-cycle is greater than or equal to the preset quantity difference threshold ΔCys, the subsequent steps are not executed, and it is determined that the improvement effect of the corresponding defect type is poor;
[0026] When the total quantity difference When , the subsequent steps are not executed, and it is judged that the improvement effect of the corresponding defect type is poor.
[0027] As a further solution of the present invention: the step S2 further includes the following steps:
[0028] determining the monotonicity of the fitted curve;
[0029] When the fitting curve increases monotonically, the subsequent steps are not performed, and it is determined that the improvement effect of the corresponding defect type is poor;
[0030] When the fitting curve increases monotonically, subsequent steps are not performed, and it is determined that the improvement effect of the corresponding defect type is good.
[0031] As a further solution of the present invention: when the fitting curve does not have monotonicity, perform the following steps:
[0032] When the proportion of the monotonically increasing portion of the fitting curve to the fitting curve is greater than or equal to 0.8, the subsequent steps are not performed, and it is determined that the improvement effect of the corresponding defect type is poor;
[0033] When the proportion of the monotonically decreasing portion of the fitting curve to the fitting curve is greater than or equal to 0.8, the subsequent steps are not performed, and it is determined that the improvement effect of the corresponding defect type is good.
[0034] Beneficial effects of the present invention: In this solution, by dividing the monitoring period into shorter time periods, the defect situation can be tracked in a refined manner, and the time distribution of defect occurrence can be reflected more clearly. This fine-grained monitoring makes it easy to identify the defect change trend that occurs within a specific time, and the defect data is statistically analyzed in sub-periods to provide detailed basic data for subsequent analysis; with data records in different time periods, the laws and trends of defect generation can be better understood; difference calculation can reveal the relative change trend of the number of defects, and help identify the increase or decrease of defects in the current sub-period. The quantity difference reflects the change in the total number of electronic equipment casings of the same defect type in the sub-period relative to the average situation of the previous monitoring period; through curve fitting, the fluctuation of the data is smoothed, which can eliminate the interference of some accidental fluctuations, making the data more coherent and referenceable, and the fitting curve can effectively Identifying the overall trend of the number of defects helps to grasp the changing rules of defects as a whole; using preset intervals to divide the difference levels, and standardizing the defect difference data through grading, helps to conduct subsequent comparative analysis under a unified framework, ensuring that defects of different categories are placed in the same difference range for comparison, reducing the complexity when comparing different defect types, and improving the efficiency and accuracy of the analysis; by calculating the target curve and the definition domain ratio, the performance of different defect types in different level difference intervals is determined, and the setting of the influence coefficient can help quantify the influence weights of different quantity difference levels, so that the defect types with high fluctuations (i.e., larger quantity differences) are expressed more accurately. The influence coefficient is combined with the sorting position to determine the improvement effect of different types of defects (using the judgment score as a measure), and prompts are given after determining the abnormal curve, so as to facilitate the allocation of resources for targeted improvements. The present invention compares the improvement effects of different defect types with each other, determines the defect types with poor improvement effects, and provides a basis for improving production quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The present invention will be further described below with reference to the accompanying drawings.
[0036] Figure 1 The present invention is a flow chart of an intelligent detection method for electronic device housing based on machine vision. DETAILED DESCRIPTION
[0037] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0038] See also Figure 1 As shown, the present invention is an intelligent detection method for electronic device housing based on machine vision, comprising the following steps:
[0039] S1: Divide a preset monitoring period into n sub-periods of equal length, where n is a first preset number, obtain inspection records of electronic device casings within the sub-periods, and determine the total number of electronic device casings with the same defect type;
[0040] S2: Calculate the quantity difference ΔCa=Ca-Cys, where Ca represents the total number of electronic equipment housings with the same defect type in the i-th sub-period. Cb' represents the total number of electronic equipment casings with the same defect type in the b-th sub-period in the previous monitoring period adjacent to the current monitoring period, generating coordinate points (a, ΔCa), and fitting the coordinate points to obtain a fitting curve f(t);
[0041] Determine a maximum quantity difference ΔCmax=max(ΔCJH), ΔCJH=(max(f1(t)), max(f2(t)), …, max(fm(t))), where fm(t) represents a fitting curve corresponding to the mth type of defect, set a quantity difference interval [0, ΔCmax], and set N quantity difference levels from low to high within the quantity difference interval at a preset quantity difference interval, where N is a second preset number;
[0042] S3: Taking the portion of the fitting curve within the single quantitative difference level as the target curve, determining the ratio of the definition domain of the target curve to the definition domain of the fitting curve, taking it as the target ratio, screening abnormal curves based on the target ratio, and determining that the defect type corresponding to the abnormal curve has a poor improvement effect.
[0043] It should be noted that by dividing the monitoring period into shorter time periods, the defect situation can be tracked in a refined manner, and the time distribution of defect occurrence can be reflected more clearly. This fine-grained monitoring makes it easy to identify the defect change trend that occurs within a specific time period, and the defect data is statistically analyzed in sub-periods to provide detailed basic data for subsequent analysis; with data records in different time periods, it is possible to better understand the laws and trends of defect generation; difference calculation can reveal the relative change trend of the number of defects, and help identify the increase or decrease of defects in the current sub-period. The quantity difference reflects the change in the total number of electronic equipment casings of the same defect type in the sub-period relative to the average situation of the previous monitoring period. The larger the quantity difference, the worse the improvement effect; through curve fitting, the fluctuation of the data is smoothed, which can eliminate the interference of some accidental fluctuations, making the data more coherent and referenceable, and the fitting curve It can effectively identify the overall trend of the number of defects and help to grasp the changing rules of defects as a whole; it uses preset intervals to divide the difference levels, and standardizes the defect difference data through grading, which helps to conduct subsequent comparative analysis under a unified framework, ensuring that defects of different categories are placed in the same difference range for comparison, reducing the complexity when comparing different defect types, and improving the efficiency and accuracy of the analysis; through the calculation of the target curve and the definition domain ratio, the performance of different defect types in different level difference intervals is determined. The setting of the influence coefficient can help quantify the influence weight of different quantity difference levels, so that the defect types with high fluctuations (that is, larger quantity differences) are expressed more accurately. The influence coefficient is combined with the sorting position to determine the improvement effect of different types of defects (using the judgment score as the measurement standard), and prompts are given after the abnormal curve is determined to facilitate the allocation of resources for targeted improvements.
[0044] In another preferred embodiment of the present invention, in step S3, the process of screening abnormal curves based on the target ratio more specifically includes:
[0045] Determine the influence coefficient YXi of the i-th quantity difference level = i*γ, where γ is a preset correction coefficient;
[0046] Sorting the target ratios according to size, where the larger the target ratio, the lower its position in the sorting, and determining the position of the target ratio in the sorting;
[0047] Calculating judgment scores Among them, Fi represents the ranking position of the target proportion in the ranking corresponding to the i-th quantity difference level. When the judgment score P≥Pys, the corresponding fitting curve is used as the abnormal curve, and Pys represents the preset judgment score threshold.
[0048] It is worth noting that the performance of different defect types in different level difference ranges can be determined by calculating the target curve and the domain ratio. The setting of the influence coefficient can help quantify the influence weights of different quantity difference levels, so that the types of defects with high fluctuations (i.e., larger quantity differences) can be expressed more accurately. The influence coefficient is combined with the ranking position to determine the improvement effect of different types of defects (using the judgment score as the measurement standard). After determining the abnormal curve, a prompt will be given to facilitate the allocation of resources for targeted improvements.
[0049] In another preferred embodiment of the present invention, in step S1, the process of determining the defect of the electronic device housing specifically includes:
[0050] Establishing a database, wherein the database stores images of electronic device housings with marked defect types;
[0051] A defect recognition model is established based on the deep learning model, the defect recognition model is trained and verified through the database, and the image of the electronic device casing is input into the trained defect recognition model to obtain the defect type of the electronic device casing.
[0052] It is understandable that the use of artificial intelligence technology can realize automatic detection and classification of defects, improve detection efficiency, reduce the time and cost of manual detection, and at the same time improve the accuracy and consistency of identification, avoid missed detections and misjudgments caused by human factors. Automated defect identification can quickly and accurately obtain a large amount of defect data, providing a reliable data foundation for subsequent refined tracking and analysis, and helping to better understand the laws and trends of defect generation.
[0053] In another preferred embodiment of the present invention, the process of determining the defect type of the electronic device housing further includes the following steps:
[0054] A preset number of electronic device housing images are randomly selected, and the defect types corresponding to the electronic device housing images are manually determined.
[0055] When the defect type determined manually is different from the defect type determined by the defect recognition model, the defect type determined manually and the corresponding electronic device casing image are input into the defect recognition model together, and deep learning training is performed again.
[0056] It should be noted that by adding random sampling and manual judgment steps in the process of determining the defect type of electronic equipment casing, the accuracy of the defect recognition model can be effectively verified and optimized; the high accuracy of manual judgment is used to correct the model's misjudgment and gradually improve the model's recognition performance. Through this dynamic update, the model can better adapt to the diverse defects in actual production and improve the accuracy and reliability of defect recognition; manual correction is used to make up for the shortcomings of the model, ensuring that the data output by the model is more accurate, and providing reliable data support for subsequent defect analysis.
[0057] In another preferred embodiment of the present invention, the image of the electronic device housing is acquired at a preset position based on a camera device.
[0058] In another preferred embodiment of the present invention, the step S1 further includes the following steps:
[0059] When the quantity difference corresponding to a single sub-cycle is greater than or equal to the preset quantity difference threshold ΔCys, the subsequent steps are not executed, and it is determined that the improvement effect of the corresponding defect type is poor;
[0060] When the total quantity difference When , the subsequent steps are not executed, and it is judged that the improvement effect of the corresponding defect type is poor.
[0061] It can be understood that by making threshold judgments on the quantity difference of each sub-cycle and the total quantity difference, it is possible to quickly identify the types of defects with poor improvement effects, avoid wasting resources on unnecessary analysis steps, and intervene in time when obvious abnormalities occur without waiting for the end of the entire monitoring cycle, thus avoiding unnecessary data processing.
[0062] In another preferred embodiment of the present invention, the step S2 further includes the following steps:
[0063] determining the monotonicity of the fitted curve;
[0064] When the fitting curve increases monotonically, the subsequent steps are not performed, and it is determined that the improvement effect of the corresponding defect type is poor;
[0065] When the fitting curve increases monotonically, subsequent steps are not performed, and it is determined that the improvement effect of the corresponding defect type is good.
[0066] It is worth noting that the monotonicity of the fitting curve can reflect the overall increase or decrease of the defect type during the monitoring period, thereby revealing the effectiveness of its improvement. If the fitting curve shows a monotonically increasing trend (i.e., the number of defects continues to increase), it means that the defect type has not been effectively controlled during the improvement process, but has continued to grow. At this time, the system will judge that the improvement effect of the defect type is poor and stop the subsequent analysis steps. It can directly determine the defect type with poor improvement effect, avoid unnecessary data processing and analysis, and save computing resources. On the contrary, if the fitting curve shows a monotonically decreasing trend (i.e., the number of defects continues to decrease), it means that the improvement measures for the defect type are effective, the number of defects is gradually decreasing, and a good improvement effect is shown.
[0067] In another preferred embodiment of the present invention, when the fitting curve does not have monotonicity, the following steps are performed:
[0068] When the proportion of the monotonically increasing portion of the fitting curve to the fitting curve is greater than or equal to 0.8, the subsequent steps are not performed, and it is determined that the improvement effect of the corresponding defect type is poor;
[0069] When the proportion of the monotonically decreasing portion of the fitting curve to the fitting curve is greater than or equal to 0.8, the subsequent steps are not performed, and it is determined that the improvement effect of the corresponding defect type is good.
[0070] It is worth noting that if the proportion of the monotonically increasing part in the fitting curve is greater than or equal to 0.8 (80%), this means that the number of defects is on an upward trend for most of the time during the monitoring period, indicating that the improvement effect of this defect type is poor; if the proportion of the monotonically decreasing part in the fitting curve is greater than or equal to 0.8 (80%), it means that the number of defects of this defect type is decreasing for most of the time during the monitoring period, indicating that the improvement measures are effective and the improvement effect is good; if the proportion of the monotonically increasing part of the fitting curve is less than 0.8 or the proportion of the monotonically decreasing part of the fitting curve is less than 0.8, then the subsequent steps can be performed normally.
[0071] The above is a detailed description of an embodiment of the present invention. However, the content described is only a preferred embodiment of the present invention and should not be considered to limit the scope of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. An intelligent detection method for electronic device housing based on machine vision, characterized in that: The following steps are involved: S1: Divide a preset monitoring period into n sub-periods of equal length, where n is a first preset number, obtain inspection records of electronic device casings within the sub-periods, and determine the total number of electronic device casings with the same defect type; S2: Calculate the quantity difference ΔC a =C a -Cys, C a represents the total number of electronic equipment casings with the same defect type in the sub-period described in a, , C b ' represents the total number of electronic equipment housings with the same defect type in the b-th sub-period of the previous monitoring period adjacent to the current monitoring period, generating the coordinate point (a, ΔC a ), fitting the coordinate points to obtain a fitting curve f(t); Determine the maximum number of differences ΔCmax = max(ΔCJH), ΔCJH = (max(f1(t)), max(f2(t)), …, max(f m (t)), f m (t) represents a fitting curve corresponding to the m-th type of defect, sets a quantity difference interval [0, ΔCmax], and sets N quantity difference levels from low to high at a preset quantity difference interval within the quantity difference interval, where N is a second preset number; S3: Taking the portion of the fitting curve within the single quantitative difference level as the target curve, determining the ratio of the definition domain of the target curve to the definition domain of the fitting curve, taking it as the target ratio, screening abnormal curves based on the target ratio, and determining that the defect type corresponding to the abnormal curve has a poor improvement effect.
2. The method for intelligent detection of electronic device housings based on machine vision according to claim 1, characterized in that: In step S3, the process of screening abnormal curves based on the target ratio more specifically includes: Determine the influence coefficient YX of the i-th quantity difference level i =i*γ, γ is the preset correction coefficient; Sorting the target ratios according to size, where the larger the target ratio, the lower its position in the sorting, and determining the position of the target ratio in the sorting; Calculating judgment scores , where F i It represents the ranking position of the target proportion in the ranking corresponding to the i-th quantity difference level. When the judgment score P≥Pys, the corresponding fitting curve is used as the abnormal curve. Pys represents the preset judgment score threshold.
3. The method for intelligent detection of electronic device housings based on machine vision according to claim 1, characterized in that: In step S1, the process of determining the defects of the electronic device housing specifically includes: Establishing a database, wherein the database stores images of electronic device housings with marked defect types; A defect recognition model is established based on the deep learning model, the defect recognition model is trained and verified through the database, and the image of the electronic device casing is input into the trained defect recognition model to obtain the defect type of the electronic device casing.
4. The method for intelligent detection of electronic device housings based on machine vision according to claim 3, characterized in that: The process of determining the defect type of the electronic equipment housing also includes the following steps: A preset number of electronic device housing images are randomly selected, and the defect types corresponding to the electronic device housing images are manually determined. When the defect type determined manually is different from the defect type determined by the defect recognition model, the defect type determined manually and the corresponding electronic device casing image are input into the defect recognition model together, and deep learning training is performed again.
5. The method for intelligent detection of electronic device housing based on machine vision according to claim 3, characterized in that: The image of the electronic device housing is acquired at a preset position based on the camera device.
6. The method for intelligent detection of electronic device housings based on machine vision according to claim 1, characterized in that: The step S1 further includes the following steps: When the quantity difference corresponding to a single sub-period is greater than or equal to the preset quantity difference threshold ΔCys, the subsequent steps are not executed, and it is determined that the improvement effect of the corresponding defect type is poor; When the total quantity difference When , the subsequent steps are not executed, and it is judged that the improvement effect of the corresponding defect type is poor.
7. The method for intelligent detection of electronic device housings based on machine vision according to claim 1, characterized in that: The step S2 further includes the following steps: determining the monotonicity of the fitted curve; When the fitting curve increases monotonically, the subsequent steps are not performed, and it is determined that the improvement effect of the corresponding defect type is poor; When the fitting curve decreases monotonically, the subsequent steps are not performed, and it is determined that the improvement effect of the corresponding defect type is good.
8. The method for intelligent detection of electronic device housings based on machine vision according to claim 7, characterized in that: When the fitting curve does not have monotonicity, perform the following steps: When the proportion of the monotonically increasing portion of the fitting curve to the fitting curve is greater than or equal to 0.8, the subsequent steps are not performed, and it is determined that the improvement effect of the corresponding defect type is poor; When the proportion of the monotonically decreasing portion of the fitting curve to the fitting curve is greater than or equal to 0.8, the subsequent steps are not performed, and it is determined that the improvement effect of the corresponding defect type is good.
Citation Information
Patent Citations
Glass screen fillet defect detection method, device and equipment and storage medium
CN114723755A
Anomaly recognition method and system based on electrochemical impedance detection and computer equipment
CN117949827A