A method and system for intelligent quality inspection of second-hand electronic products

By identifying feature areas and calculating the crack probability of pixel points in the screen grayscale image of second-hand electronic products, the accuracy problem of edge detection algorithms in identifying cracks in complex environments is solved, and more accurate screen quality inspection results are achieved.

CN118587181BActive Publication Date: 2025-04-18BAIRUAN QIANYI (XIAN) SOFTWARE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410717429.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2024-05-15
Filing Date
2024-06-04
Publication Date
2025-04-18
Estimated Expiration
2044-06-04

AI Technical Summary

Technical Problem

Existing edge detection algorithms are difficult to accurately identify cracked areas of second-hand electronic product screens in complex environments, resulting in inaccurate quality inspection results.

Method used

By obtaining the featured areas and their skeleton lines in the screen grayscale image, the probability that each pixel point belongs to the crack area, and combining morphological characteristics and bending changes, the featured crack areas and hidden crack areas are selected, and the screen quality inspection results are finally obtained based on the number of pixel points.

Benefits of technology

It improves the accuracy of identifying screen crack areas and ensures the accuracy and reliability of screen quality inspection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587181B_ABST
    Figure CN118587181B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and in particular to a second-hand electronic product intelligent quality inspection method and system, including: obtaining characteristic regions and skeleton lines; obtaining the probability that a pixel on the skeleton line belongs to a crack region according to the skeleton line; obtaining the probability of a crack region according to the morphology of the characteristic region, the probability that a pixel on the skeleton line belongs to a crack region, and the bending change of the skeleton line; obtaining a characteristic crack region by screening according to the probability of the crack region; obtaining the connection possibility of the characteristic crack region according to the similarity between the characteristic crack region and the skeleton line of the characteristic crack region; obtaining a hidden crack region according to the connection possibility of the characteristic crack region; and obtaining a screen quality inspection result according to the number of pixels in the characteristic crack region and the hidden crack region. The present invention evaluates the screen quality through the characteristic crack region and the hidden crack region to obtain a more accurate screen quality inspection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to an intelligent quality inspection method and system for second-hand electronic products. Background Art

[0002] In the second-hand market, the quality of second-hand electronic products is the main criterion for measuring their prices. When evaluating the quality of second-hand electronic products, it is necessary to inspect the appearance of second-hand electronic products. In order to make the inspection process more efficient, after the second-hand mobile phones are purchased and put into storage, the relevant information in the company's SAAS inventory management system is updated in a timely manner, and the mobile phones are distributed to different inspection locations according to their different values, and then the screen appearance of the second-hand electronic products is inspected. In the process of inspecting the screen appearance of second-hand electronic products, due to the large difference in grayscale values ​​between screen cracks and normal screens, edge detection algorithms are currently commonly used to detect defects on the screens of second-hand electronic products. However, in the actual defect detection process, due to the complex defect detection environment, the edge detection results fail to accurately identify the crack area. If the screen quality inspection results are directly obtained based on the edge detection results, the screen quality inspection results will be inaccurate. Summary of the invention

[0003] The present invention provides a second-hand electronic product intelligent quality inspection method and system to solve the existing problems.

[0004] The second-hand electronic product intelligent quality inspection method and system of the present invention adopts the following technical solutions:

[0005] The present invention proposes an intelligent quality inspection method for second-hand electronic products, which comprises the following steps:

[0006] Obtaining several characteristic regions and skeleton lines of each characteristic region in the screen grayscale image;

[0007] According to the difference in grayscale values ​​of the pixels on the skeleton line of each feature region and the positional relationship between each pixel on the skeleton line and the edge of the feature region, the probability that each pixel on the skeleton line of each feature region belongs to the crack region is obtained;

[0008] According to the shape of each characteristic region, the probability that the pixel points on the skeleton line of the characteristic region belong to the crack region and the bending change of the skeleton line of the characteristic region, the crack region probability of each characteristic region is obtained; according to the crack region probability of each characteristic region, all characteristic regions are screened to obtain several characteristic crack regions;

[0009] According to the positional relationship between any two characteristic crack regions and the similarity of the skeleton lines of the two characteristic crack regions, the connection possibility of the two characteristic crack regions is obtained; according to the connection possibility of the characteristic crack regions, a number of hidden crack regions are obtained;

[0010] The screen quality inspection result is obtained according to the number of pixels in the characteristic crack area and the hidden crack area.

[0011] Furthermore, the probability that each pixel point on the skeleton line of each feature region belongs to the crack region is obtained according to the difference in grayscale values ​​of the pixel points on the skeleton line of each feature region and the positional relationship between each pixel point on the skeleton line and the edge of the feature region, and the specific steps include the following:

[0012] Any pixel point on the skeleton line of any feature area is recorded as the target skeleton pixel point;

[0013] According to the positional relationship between the target skeleton pixel point and the edge of the feature area where the target skeleton pixel point is located, the feature width of the target skeleton pixel point is obtained;

[0014] According to the distribution of the target skeleton pixel point and the pixel points on the skeleton line where the target skeleton pixel point is located, a reference skeleton pixel point of the target skeleton pixel point is obtained;

[0015] The inversely proportional normalized value of the characteristic width of the target skeleton pixel is recorded as the characteristic region width index of the target skeleton pixel; the inversely proportional normalized value of the maximum absolute difference between the grayscale values ​​of all reference skeleton pixels and the target skeleton pixel is recorded as the grayscale similarity index of the target skeleton pixel; the normalized value of the grayscale value of the target skeleton pixel is recorded as the grayscale possibility index of the target skeleton pixel; the product of the characteristic region width index, the grayscale similarity index and the grayscale possibility index of the target skeleton pixel is recorded as the probability that the target skeleton pixel belongs to the crack area.

[0016] Furthermore, the step of obtaining the characteristic width of the target skeleton pixel point according to the positional relationship between the target skeleton pixel point and the edge of the characteristic region where the target skeleton pixel point is located comprises the following specific steps:

[0017] On the edge of the feature area where the target skeleton pixel point is located, the pixel point with the closest Euclidean distance to the target skeleton pixel point is recorded as the first pixel point of the target skeleton pixel point; obtain the straight line where the target skeleton pixel point and its first pixel point are located, and on the straight line, along the direction from the first pixel point of the target skeleton pixel point to the target skeleton pixel point, obtain all intersection points of the straight line and the edge of the feature area where the target skeleton pixel point is located, and record the intersection point with the closest Euclidean distance to the target skeleton pixel point as the second pixel point of the target skeleton pixel point; record the Euclidean distance between the first pixel point and the second pixel point of the target skeleton pixel point as the feature width of the target skeleton pixel point.

[0018] Furthermore, the step of obtaining a reference skeleton pixel point of a target skeleton pixel point according to the distribution of the target skeleton pixel point and the pixel points on the skeleton line where the target skeleton pixel point is located comprises the following specific steps:

[0019] On the skeleton line where the target skeleton pixel point is located, any pixel point adjacent to the target skeleton pixel point is recorded as a reference skeleton pixel point of the target skeleton pixel point.

[0020] Furthermore, the crack region probability of each feature region is obtained according to the morphology of each feature region, the probability that a pixel point on the skeleton line of the feature region belongs to the crack region, and the bending change of the skeleton line of the feature region, and the specific steps include the following:

[0021] According to the distribution of the target skeleton pixel point and the reference skeleton pixel point of the target skeleton pixel point, a characteristic angle of the target skeleton pixel point is obtained;

[0022] The ratio of the number of pixels on the skeleton line of any feature area to the minimum value of the characteristic width of all pixels on the skeleton line of the feature area is recorded as the crack morphology similarity of the feature area; the product of the inversely proportional normalized value of the variance of the probability that all pixels on the skeleton line of the feature area belong to the crack area and the mean value of the probability that all pixels on the skeleton line of the feature area belong to the crack area is recorded as the overall crack probability of the feature area; the mean value of the characteristic angles of all pixels on the skeleton line of the feature area is recorded as the bending change degree of the feature area; the product of the crack morphology similarity, the overall crack probability and the bending change degree of the feature area is recorded as the crack area probability of the feature area.

[0023] Furthermore, the step of obtaining the characteristic angle of the target skeleton pixel point according to the distribution of the target skeleton pixel point and the reference skeleton pixel point of the target skeleton pixel point comprises the following specific steps:

[0024] The line connecting the target skeleton pixel point and each of its reference skeleton pixels is recorded as the reference line of the target skeleton pixel point; the angle between every two reference lines of the target skeleton pixel point is obtained, and recorded as the reference angle of the target skeleton pixel point; the minimum value of all reference angles of the target skeleton pixel point is recorded as the characteristic angle of the target skeleton pixel point.

[0025] Furthermore, the method of obtaining the connection possibility of the two characteristic crack regions according to the positional relationship between any two characteristic crack regions and the similarity of the skeleton lines of the two characteristic crack regions comprises the following specific steps:

[0026] In the screen grayscale image, any two characteristic crack regions are recorded as the first characteristic crack region and the second characteristic crack region respectively;

[0027] Obtaining the first truncation line and the second truncation line and the characteristic curvatures of the first truncation line and the second truncation line according to the distribution of the first characteristic crack region and the second characteristic crack region and the skeleton lines of the first characteristic crack region and the second characteristic crack region;

[0028] According to the first truncation line and the second truncation line, respectively, the relative crack probabilities of the first characteristic crack area and the second characteristic crack area are obtained in sequence by using the method for obtaining the crack area probability of each characteristic area;

[0029] Obtaining a first boundary pixel point and a second boundary pixel point according to the distribution of pixel points in the first characteristic crack region and the second characteristic crack region;

[0030] The inversely proportional normalized value of the absolute value of the difference in relative crack probabilities between the first characteristic crack region and the second characteristic crack region is recorded as the relative crack possibility similarity between the first characteristic crack region and the second characteristic crack region; the inversely proportional normalized value of the absolute value of the difference in characteristic curvatures between the first truncation line and the second truncation line is recorded as the characteristic curvature similarity between the first truncation line and the second truncation line; the inversely proportional normalized value of the Euclidean distance from the first boundary pixel point to the second boundary pixel point is recorded as the proximity between the first characteristic crack region and the second characteristic crack region; the product of the relative crack possibility similarity, proximity, and characteristic curvature similarity between the first characteristic crack region and the second characteristic crack region is recorded as the connection possibility between the first characteristic crack region and the second characteristic crack region.

[0031] Furthermore, the first truncation line and the second truncation line and the characteristic curvature of the first truncation line and the second truncation line are obtained according to the distribution of the first characteristic crack region and the second characteristic crack region and the skeleton lines of the first characteristic crack region and the second characteristic crack region, and the specific steps include the following:

[0032] All endpoints of the skeleton lines of the first characteristic crack region and the second characteristic crack region are obtained respectively; the endpoint closest to the second characteristic crack region among all endpoints of the first characteristic crack region is recorded as the first endpoint, and the endpoint closest to the first characteristic crack region among all endpoints of the second characteristic crack region is recorded as the second endpoint; on the skeleton line of the first characteristic crack region, with the first endpoint as the starting point, a line with a length of W is intercepted along the skeleton line, which is recorded as the first truncation line; on the skeleton line of the second characteristic crack region, with the second endpoint as the starting point, a line with a length of W is intercepted along the skeleton line, which is recorded as the second truncation line; wherein W is a preset truncation length; the curvature of each pixel point on the first truncation line and the second truncation line is obtained respectively, and the average value of the curvature of all pixel points on the first truncation line and the second truncation line is recorded as the characteristic curvature of the first truncation line and the second truncation line respectively.

[0033] Furthermore, the step of obtaining the first boundary pixel point and the second boundary pixel point according to the distribution of the pixel points in the first characteristic crack region and the second characteristic crack region includes the following specific steps:

[0034] The pixel point with the closest Euclidean distance to the second characteristic crack area in the first characteristic crack area is recorded as the first boundary pixel point; the pixel point with the closest Euclidean distance to the first characteristic crack area in the second characteristic crack area is recorded as the second boundary pixel point.

[0035] The present invention also proposes a second-hand electronic product intelligent quality inspection system, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program stored in the memory to implement the steps of the aforementioned second-hand electronic product intelligent quality inspection method.

[0036] The technical solution of the present invention has the following beneficial effects: in order to solve the problem of inaccurate edge detection results under environmental influences, the present invention obtains the probability that each pixel on the skeleton line of each feature area belongs to the crack area according to the morphological features of the long extension of the crack area on the screen and the grayscale features of the crack pixel points, through the grayscale difference of the pixel points on the skeleton line of the feature area and the positional relationship between the pixel points on the skeleton line of the feature area and the edge of the feature area, thereby providing a data basis for the crack area probability of the subsequent feature area; according to the randomness of crack extension, through the bending change of the skeleton line of the feature area, combined with the probability that all the pixel points on the skeleton line of the feature area belong to the crack area, the crack area probability of the feature area is obtained, and then the feature area is screened to obtain the feature crack area, thereby realizing the identification of the more obvious crack area; for the identification of the inconspicuous crack area, according to the continuity feature of the crack, through the positional relationship between each two feature crack areas and the similarity of the skeleton lines of each two feature crack areas, the connection possibility of each two feature crack areas is obtained, thereby identifying the hidden crack area, and combining the feature crack area to obtain the complete crack area. The present invention evaluates the screen quality by the number of pixels in the characteristic crack area and the hidden crack area, thereby obtaining a more accurate screen quality inspection result. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0038] Figure 1 A flowchart of the steps of an intelligent quality inspection method for second-hand electronic products of the present invention;

[0039] Figure 2 This is a schematic diagram of a detection system device provided in this embodiment. DETAILED DESCRIPTION

[0040] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of a second-hand electronic product intelligent quality inspection method and system proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0041] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0042] The specific scheme of the intelligent quality inspection method and system for second-hand electronic products provided by the present invention is described in detail below with reference to the accompanying drawings.

[0043] See also Figure 1 , which shows a flowchart of a method for intelligent quality inspection of second-hand electronic products provided by an embodiment of the present invention, the method comprising the following steps:

[0044] Step S001: Acquire several characteristic regions in the screen grayscale image and the skeleton lines of each characteristic region.

[0045] It should be noted that the purpose of this embodiment is to detect crack defects on the screen appearance of a second-hand mobile phone, so it is necessary to collect screen images of the second-hand mobile phone.

[0046] Specifically, a second-hand mobile phone detection system is constructed, the system is started, and the screen RGB image is automatically acquired using a preset camera device; wherein the detection system device schematic diagram of the second-hand mobile phone detection system is as follows Figure 2 As shown, in the schematic diagram of the detection system device, the camera device is located directly above the detection platform, the lens of the camera device is aimed at the center of the detection platform, the light irradiation direction is perpendicular to the surface of the detection platform, and the mobile phone to be tested is located at the center of the detection platform; the screen RGB image is grayed and median filtered to obtain a screen gray image; the screen gray image is edge detected using the Canny edge detection algorithm to obtain several edge lines in the screen gray image; the area surrounded by any closed edge line is recorded as a feature area; the skeleton line of each feature area is extracted using the skeleton extraction algorithm; graying, median filtering, Canny edge detection and skeleton extraction algorithm are well-known technologies, and the specific methods are not introduced here;

[0047] Step S002: According to the difference in grayscale values ​​of pixels on the skeleton line of each feature region and the positional relationship between each pixel on the skeleton line and the edge of the feature region, the probability that each pixel on the skeleton line of each feature region belongs to the crack region is obtained.

[0048] It should be noted that the mobile phone screen is made of glass. In the grayscale image of the screen, the grayscale value of the pixels in the normal screen area is low. When the mobile phone screen is cracked under the action of external force, the different physical structure causes the light to scatter at the crack. The grayscale value of the pixels in the crack area is higher than that of the pixels in the normal screen area. The crack area appears as a long strip, so the width of each crack area is narrow. When there are cracks on the screen surface of the second-hand mobile phone to be tested, some feature areas may be crack areas, so it is necessary to determine the crack area probability of each feature area.

[0049] Specifically, any pixel point on the skeleton line of any feature area is recorded as a target skeleton pixel point; on the edge of the feature area where the target skeleton pixel point is located, the pixel point with the closest Euclidean distance to the target skeleton pixel point is recorded as the first pixel point of the target skeleton pixel point; the straight line where the target skeleton pixel point and its first pixel point are located is obtained, and along the direction from the first pixel point of the target skeleton pixel point to the target skeleton pixel point on the straight line, all intersection points of the straight line and the edge of the feature area where the target skeleton pixel point is located are obtained, and the intersection point with the closest Euclidean distance to the target skeleton pixel point is recorded as the second pixel point of the target skeleton pixel point; the Euclidean distance between the first pixel point and the second pixel point of the target skeleton pixel point is recorded as the characteristic width of the target skeleton pixel point; on the skeleton line where the target skeleton pixel point is located, any pixel point adjacent to the target skeleton pixel point is recorded as the reference skeleton pixel point of the target skeleton pixel point;

[0050] The inverse normalized value of the characteristic width of the target skeleton pixel is recorded as the characteristic region width index of the target skeleton pixel; the inverse normalized value of the maximum absolute difference between the grayscale values ​​of all reference skeleton pixels and the target skeleton pixel is recorded as the grayscale similarity index of the target skeleton pixel; the normalized value of the grayscale value of the target skeleton pixel is recorded as the grayscale possibility index of the target skeleton pixel; the product of the characteristic region width index, grayscale similarity index and grayscale possibility index of the target skeleton pixel is recorded as the probability that the target skeleton pixel belongs to the crack region. The calculation formula for the probability that the specific target skeleton pixel belongs to the crack region is:

[0051] p=exp(-d)×exp(-|g ′ max |)×norm(g)

[0052] Where p is the probability that the target skeleton pixel belongs to the crack area; d is the characteristic width of the target skeleton pixel; g is the gray value of the target skeleton pixel; g ′ maxis the maximum difference in grayscale value between all reference skeleton pixels and the target skeleton pixel; exp() is an exponential function with a natural constant as the base; norm() is the linear normalization line number, and the normalization object is the grayscale value of all pixels on the skeleton lines of all feature areas; || is the absolute value function.

[0053] It should be noted that exp(-d) represents the characteristic region width index of the target skeleton pixel point. The larger its value is, the narrower the characteristic region width is at the location of the target skeleton pixel point, and the greater the probability that the target skeleton pixel point belongs to the crack region. ′ max |) represents the grayscale similarity index of the target skeleton pixel. The larger its value, the more similar the grayscale of the target skeleton pixel is to the adjacent pixel, and the greater the probability that the target skeleton pixel belongs to the crack area; norm(g) represents the grayscale possibility index of the target skeleton pixel. The larger its value, the closer the grayscale value of the target skeleton pixel is to the grayscale feature of the crack pixel, and the greater the probability that the target skeleton pixel belongs to the crack area.

[0054] According to the above method, the probability that each pixel point on the skeleton line of each feature area belongs to the crack area is obtained.

[0055] Step S003: Obtain the crack region probability of each feature region according to the shape of each feature region, the probability that a pixel point on the skeleton line of the feature region belongs to the crack region, and the bending change of the skeleton line of the feature region; screen all feature regions according to the crack region probability of each feature region to obtain a number of feature crack regions.

[0056] It should be noted that each pixel point on the skeleton line of the characteristic area belonging to the crack area has a high probability of belonging to the crack area; since the crack is caused by the broken glass of the mobile phone screen, the crack area as a whole presents an irregularly extended long strip extension, and the extension direction of the crack is relatively random. The extension directions of adjacent pixel points on the skeleton line of the characteristic area belonging to the crack area will be quite different, so the possibility of each characteristic area belonging to the crack area is judged on this basis.

[0057] Specifically, the line connecting the target skeleton pixel point and each of its reference skeleton pixel points is recorded as the reference line connecting the target skeleton pixel point; the angle between every two reference lines connecting the target skeleton pixel point is obtained, and recorded as the reference angle of the target skeleton pixel point; the minimum value of all reference angles of the target skeleton pixel point is recorded as the characteristic angle of the target skeleton pixel point; it should be noted that if the target skeleton pixel point is the endpoint of the skeleton line, the characteristic angle of the target skeleton pixel point is 0 degrees; the number of pixels on the skeleton line of any feature area is equal to the characteristic width of all pixels on the skeleton line of the feature area The ratio of the minimum value of is recorded as the crack morphology similarity of the feature area; the product of the inverse normalized value of the variance of the probability that all pixels on the skeleton line of the feature area belong to the crack area and the mean value of the probability that all pixels on the skeleton line of the feature area belong to the crack area is recorded as the overall crack probability of the feature area; the mean value of the characteristic angles of all pixels on the skeleton line of the feature area is recorded as the bending change degree of the feature area; the product of the crack morphology similarity, the overall crack probability and the bending change degree of the feature area is recorded as the crack area probability of the feature area. The calculation formula for the crack area probability of the specific D-th feature area is:

[0058]

[0059] Where P D is the crack area probability of the Dth characteristic area; l D is the number of pixels on the skeleton line of the Dth feature area; d ′ D,min is the minimum value of the feature width of all pixels on the skeleton line of the Dth feature area; is the mean value of the probability that all pixels on the skeleton line of the Dth feature area belong to the crack area; S D is the variance of the probability that all pixels on the skeleton line of the Dth feature area belong to the crack area; α D,i is the characteristic angle of the ith pixel on the skeleton line of the Dth feature area; exp() is an exponential function with a natural constant as the base; norm() is a linear normalization function, and the normalization object is the

[0060] It should be noted that It indicates the crack morphology similarity of the Dth feature region. The larger its value is, the more likely the Dth feature region is to be a long strip extension, and the more likely the Dth feature region is to be a crack region. It indicates the overall crack probability of the Dth feature region. The larger its value is, the greater the probability that the pixel points on the skeleton line of the Dth feature region belong to the crack region, and the more likely the Dth feature region is to be a crack region. Indicates the degree of bending change of the skeleton line of the D-th feature area. The larger the value, the more random the extension direction of the skeleton line of the D-th feature area, and the more likely the D-th feature area is to be a crack area.

[0061] Further, for any characteristic region, if the crack region probability of the characteristic region is greater than or equal to a preset crack threshold Q, the characteristic region is recorded as a characteristic crack region; wherein Q=0.8, and this embodiment is described by taking this as an example.

[0062] Step S004: According to the positional relationship between any two characteristic crack regions and the similarity of the skeleton lines of the two characteristic crack regions, the connection possibility of the two characteristic crack regions is obtained; according to the connection possibility of the characteristic crack regions, a number of hidden crack regions are obtained.

[0063] It should be noted that in the screen grayscale image, since some cracks may be thinner, the grayscale values ​​of the pixels in these crack areas are not much different from the grayscale values ​​of the pixels on the normal screen. In the edge detection process, the edge information of these crack areas cannot be accurately extracted. However, cracks are generally extended from the screen stress points under the action of external forces, so the cracks are continuous. Therefore, based on the continuity of the cracks, the characteristic crack areas are further judged to determine a more real and complete crack area. If there is a thinner crack area between two characteristic crack areas with similar distances, the crack area probabilities of the two characteristic crack areas with similar distances are more similar, and the curvature of the pixel points on the skeleton lines near the thinner crack areas is also closer. Therefore, it is judged whether there is an undetected crack area between each two characteristic crack areas.

[0064] Specifically, in the screen grayscale image, any two characteristic crack areas are recorded as the first characteristic crack area and the second characteristic crack area respectively; all endpoints of the skeleton lines of the first characteristic crack area and the second characteristic crack area are obtained respectively; the endpoint closest to the second characteristic crack area among all endpoints of the first characteristic crack area is recorded as the first endpoint, and the endpoint closest to the first characteristic crack area among all endpoints of the second characteristic crack area is recorded as the second endpoint; on the skeleton line of the first characteristic crack area, with the first endpoint as the starting point, a line with a length of W is intercepted along the skeleton line, which is recorded as the first truncation line; on the skeleton line of the second characteristic crack area, with the second endpoint as the starting point, a line with a length of W is intercepted along the skeleton line, which is recorded as the second truncation line; wherein W is a preset truncation length, W=15, and this embodiment is described by taking this as an example; it should be noted that if the number of pixel points on the skeleton line of the first characteristic crack area or the skeleton line of the second characteristic crack area is less than W, the entire The skeleton lines are recorded as the first truncation line or the second truncation line; according to the method for obtaining the crack area probability of each characteristic area, the first truncation line is used as the skeleton line of the first characteristic crack area, and the obtained crack area probability is used as the relative crack possibility of the first characteristic crack area, and the second truncation line is used as the skeleton line of the second characteristic crack area, and the obtained crack area probability is used as the relative crack possibility of the second characteristic crack area; the curvature of each pixel point on the first truncation line and the second truncation line is obtained respectively, and the average of the curvatures of all pixel points on the first truncation line and the second truncation line is recorded as the characteristic curvature of the first truncation line and the second truncation line respectively; the method for obtaining the curvature on the line is a well-known technology, and the specific method is not introduced here; the pixel point with the closest Euclidean distance to the second characteristic crack area in the first characteristic crack area is recorded as the first boundary pixel point; the pixel point with the closest Euclidean distance to the first characteristic crack area in the second characteristic crack area is recorded as the second boundary pixel point;

[0065] The inverse normalized value of the absolute value of the difference between the relative crack possibilities of the first characteristic crack region and the second characteristic crack region is recorded as the relative crack possibility similarity of the first characteristic crack region and the second characteristic crack region; the inverse normalized value of the absolute value of the difference between the characteristic curvatures of the first truncation line and the second truncation line is recorded as the characteristic curvature similarity of the first truncation line and the second truncation line; the inverse normalized value of the Euclidean distance from the first boundary pixel to the second boundary pixel is recorded as the proximity of the first characteristic crack region and the second characteristic crack region; the product of the relative crack possibility similarity, proximity and characteristic curvature similarity of the first characteristic crack region and the second characteristic crack region is recorded as the connection possibility of the first characteristic crack region and the second characteristic crack region. The specific calculation formula for the connection possibility of the first characteristic crack region and the second characteristic crack region is:

[0066] E 1,2 =exp(-|P1 ′ -P2 ′ |)×exp(-|R1-R2|)×exp(-d ′ 1 ′ ,2 )

[0067] In the formula, E 1,2 P1 is the connection possibility between the first characteristic crack region and the second characteristic crack region; ′ is the relative crack probability of the first characteristic crack area; P2 ′ is the relative crack probability of the second characteristic crack area; R1 is the characteristic curvature of the first truncation line; R2 is the characteristic curvature of the second truncation line; d ′ 1 ′ ,2 is the Euclidean distance from the first boundary pixel to the second boundary pixel; exp() is an exponential function with a natural constant as the base; || is the absolute value function.

[0068] It should be noted that exp(-|P1 ′ -P2 ′ |) represents the relative crack possibility similarity between the first characteristic crack region and the second characteristic crack region. The larger its value, the more similar the relative crack possibility between the first characteristic crack region and the second characteristic crack region, and the greater the connection possibility between the first characteristic crack region and the second characteristic crack region; exp(-|R1-R2|) represents the characteristic curvature similarity between the first truncation line and the second truncation line. The larger its value, the higher the characteristic curvature similarity between the first truncation line and the second truncation line, and the greater the connection possibility between the first characteristic crack region and the second characteristic crack region; exp(-d ′ 1 ′ ,2 ) represents the degree of proximity between the first characteristic crack region and the second characteristic crack region. The larger its value is, the closer the first characteristic crack region and the second characteristic crack region are, and the greater the possibility of connection between the first characteristic crack region and the second characteristic crack region is.

[0069] Furthermore, if the connection possibility of the first characteristic crack region and the second characteristic crack region is greater than a preset connection threshold T, the first boundary pixel point and the second boundary pixel point are connected by a curvature of The curve is connected and the curve is recorded as the hidden crack area; wherein T=0.85, and this embodiment is described by taking this as an example; R1 is the characteristic curvature of the first truncation line; and R2 is the characteristic curvature of the second truncation line.

[0070] Step S005: Obtaining screen quality inspection results according to the number of pixels in the characteristic crack area and the hidden crack area.

[0071] It should be noted that after obtaining the complete crack area, the screen quality of the second-hand mobile phone needs to be evaluated based on the area of ​​the crack area.

[0072] Specifically, the total number U of pixels in all characteristic crack areas and all hidden crack areas is obtained. If U is greater than or equal to the preset crack judgment threshold K, there is a crack defect on the screen of the second-hand mobile phone; if U is less than the preset crack judgment threshold K, there is no crack defect on the screen of the second-hand mobile phone; wherein, K=70, and this embodiment is described by taking this as an example.

[0073] Furthermore, the results of crack assessment and other relevant information are integrated through the preset system to generate a quality inspection report in the Word document format. The generated quality inspection report is reviewed in the system to ensure the accuracy and completeness of the information. After the review is passed, the quality inspection report is uploaded to the system server, the relevant data records in the management system are updated, the feedback information of the quality inspection report is obtained, the standard of crack assessment is adjusted and the recognition algorithm is optimized, so as to achieve the purpose of improving the overall performance of the system; the second-hand mobile phones detected to have problems are sent to the maintenance department, which will be repaired and put on sale, and the mobile phones without problems will be directly put on sale, and the maintenance and sales records will be updated in the company's SAAS inventory management system.

[0074] It should be noted that this embodiment uses the exp(-x) model to present the inverse proportional relationship and normalization processing, x is the input of the model, and the implementer can set the inverse proportional function and normalization function according to the actual situation.

[0075] At this point, this embodiment is completed.

[0076] The present invention also provides a second-hand electronic product intelligent quality inspection system, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program stored in the memory to implement the steps of the aforementioned second-hand electronic product intelligent quality inspection method.

[0077] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A second-hand electronic product intelligent quality inspection method, characterized in that: The method comprises the following steps: Obtaining several characteristic regions and skeleton lines of each characteristic region in the screen grayscale image; According to the difference in grayscale values ​​of the pixels on the skeleton line of each feature region and the positional relationship between each pixel on the skeleton line and the edge of the feature region, the probability that each pixel on the skeleton line of each feature region belongs to the crack region is obtained; According to the shape of each characteristic region, the probability that the pixel points on the skeleton line of the characteristic region belong to the crack region and the bending change of the skeleton line of the characteristic region, the crack region probability of each characteristic region is obtained; according to the crack region probability of each characteristic region, all characteristic regions are screened to obtain several characteristic crack regions; According to the positional relationship between any two characteristic crack regions and the similarity of the skeleton lines of the two characteristic crack regions, the connection possibility of the two characteristic crack regions is obtained; according to the connection possibility of the characteristic crack regions, a number of hidden crack regions are obtained; The screen quality inspection result is obtained according to the number of pixels in the characteristic crack area and the hidden crack area; The method of obtaining the probability that each pixel point on the skeleton line of each feature region belongs to the crack region according to the difference in the grayscale values ​​of the pixel points on the skeleton line of each feature region and the positional relationship between each pixel point on the skeleton line and the edge of the feature region where the pixel point is located comprises the following specific steps: Any pixel point on the skeleton line of any feature area is recorded as the target skeleton pixel point; According to the positional relationship between the target skeleton pixel point and the edge of the feature area where the target skeleton pixel point is located, the feature width of the target skeleton pixel point is obtained; According to the distribution of the target skeleton pixel point and the pixel points on the skeleton line where the target skeleton pixel point is located, a reference skeleton pixel point of the target skeleton pixel point is obtained; The inversely proportional normalized value of the characteristic width of the target skeleton pixel is recorded as the characteristic region width index of the target skeleton pixel; the inversely proportional normalized value of the maximum absolute difference between the grayscale values ​​of all reference skeleton pixels and the target skeleton pixel is recorded as the grayscale similarity index of the target skeleton pixel; the normalized value of the grayscale value of the target skeleton pixel is recorded as the grayscale possibility index of the target skeleton pixel; the product of the characteristic region width index, the grayscale similarity index and the grayscale possibility index of the target skeleton pixel is recorded as the probability that the target skeleton pixel belongs to the crack area.

2. According to claim 1, a second-hand electronic product intelligent quality inspection method is characterized in that: The step of obtaining the characteristic width of the target skeleton pixel point according to the positional relationship between the target skeleton pixel point and the edge of the characteristic region where the target skeleton pixel point is located comprises the following specific steps: On the edge of the feature area where the target skeleton pixel point is located, the pixel point with the closest Euclidean distance to the target skeleton pixel point is recorded as the first pixel point of the target skeleton pixel point; obtain the straight line where the target skeleton pixel point and its first pixel point are located, and on the straight line, along the direction from the first pixel point of the target skeleton pixel point to the target skeleton pixel point, obtain all intersection points of the straight line and the edge of the feature area where the target skeleton pixel point is located, and record the intersection point with the closest Euclidean distance to the target skeleton pixel point as the second pixel point of the target skeleton pixel point; record the Euclidean distance between the first pixel point and the second pixel point of the target skeleton pixel point as the feature width of the target skeleton pixel point.

3. According to claim 1, a second-hand electronic product intelligent quality inspection method is characterized in that: The step of obtaining a reference skeleton pixel point of a target skeleton pixel point according to the distribution of the target skeleton pixel point and the pixel points on the skeleton line where the target skeleton pixel point is located comprises the following specific steps: On the skeleton line where the target skeleton pixel point is located, any pixel point adjacent to the target skeleton pixel point is recorded as a reference skeleton pixel point of the target skeleton pixel point.

4. According to claim 1, a second-hand electronic product intelligent quality inspection method is characterized in that: The crack region probability of each feature region is obtained according to the shape of each feature region, the probability that the pixel points on the skeleton line of the feature region belong to the crack region, and the bending change of the skeleton line of the feature region, and the specific steps include the following: According to the distribution of the target skeleton pixel point and the reference skeleton pixel point of the target skeleton pixel point, a characteristic angle of the target skeleton pixel point is obtained; The ratio of the number of pixels on the skeleton line of any feature area to the minimum value of the characteristic width of all pixels on the skeleton line of the feature area is recorded as the crack morphology similarity of the feature area; the product of the inversely proportional normalized value of the variance of the probability that all pixels on the skeleton line of the feature area belong to the crack area and the mean value of the probability that all pixels on the skeleton line of the feature area belong to the crack area is recorded as the overall crack probability of the feature area; the mean value of the characteristic angles of all pixels on the skeleton line of the feature area is recorded as the bending change degree of the feature area; the product of the crack morphology similarity, the overall crack probability and the bending change degree of the feature area is recorded as the crack area probability of the feature area.

5. According to claim 4, a second-hand electronic product intelligent quality inspection method is characterized in that: The step of obtaining the characteristic angle of the target skeleton pixel point according to the distribution of the target skeleton pixel point and the reference skeleton pixel point of the target skeleton pixel point comprises the following specific steps: The line connecting the target skeleton pixel point and each of its reference skeleton pixels is recorded as the reference line of the target skeleton pixel point; the angle between every two reference lines of the target skeleton pixel point is obtained, and recorded as the reference angle of the target skeleton pixel point; the minimum value of all reference angles of the target skeleton pixel point is recorded as the characteristic angle of the target skeleton pixel point.

6. According to claim 1, a second-hand electronic product intelligent quality inspection method is characterized in that: The method of obtaining the connection possibility of the two characteristic crack regions according to the positional relationship between any two characteristic crack regions and the similarity of the skeleton lines of the two characteristic crack regions comprises the following specific steps: In the screen grayscale image, any two characteristic crack regions are recorded as the first characteristic crack region and the second characteristic crack region respectively; Obtaining the first truncation line and the second truncation line and the characteristic curvatures of the first truncation line and the second truncation line according to the distribution of the first characteristic crack region and the second characteristic crack region and the skeleton lines of the first characteristic crack region and the second characteristic crack region; According to the first truncation line and the second truncation line, respectively, the relative crack probabilities of the first characteristic crack area and the second characteristic crack area are obtained in sequence by using the method for obtaining the crack area probability of each characteristic area; Obtaining a first boundary pixel point and a second boundary pixel point according to the distribution of pixel points in the first characteristic crack region and the second characteristic crack region; The inversely proportional normalized value of the absolute value of the difference in relative crack probabilities between the first characteristic crack region and the second characteristic crack region is recorded as the relative crack possibility similarity between the first characteristic crack region and the second characteristic crack region; the inversely proportional normalized value of the absolute value of the difference in characteristic curvatures between the first truncation line and the second truncation line is recorded as the characteristic curvature similarity between the first truncation line and the second truncation line; the inversely proportional normalized value of the Euclidean distance from the first boundary pixel point to the second boundary pixel point is recorded as the proximity between the first characteristic crack region and the second characteristic crack region; the product of the relative crack possibility similarity, proximity, and characteristic curvature similarity between the first characteristic crack region and the second characteristic crack region is recorded as the connection possibility between the first characteristic crack region and the second characteristic crack region.

7. The intelligent quality inspection method for second-hand electronic products according to claim 6, characterized in that: The method of obtaining the first truncation line and the second truncation line and the characteristic curvature of the first truncation line and the second truncation line according to the distribution of the first characteristic crack region and the second characteristic crack region and the skeleton lines of the first characteristic crack region and the second characteristic crack region comprises the following specific steps: All endpoints of the skeleton lines of the first characteristic crack region and the second characteristic crack region are obtained respectively; the endpoint closest to the second characteristic crack region among all endpoints of the first characteristic crack region is recorded as the first endpoint, and the endpoint closest to the first characteristic crack region among all endpoints of the second characteristic crack region is recorded as the second endpoint; on the skeleton line of the first characteristic crack region, with the first endpoint as the starting point, a line with a length of W is intercepted along the skeleton line, which is recorded as the first truncation line; on the skeleton line of the second characteristic crack region, with the second endpoint as the starting point, a line with a length of W is intercepted along the skeleton line, which is recorded as the second truncation line; wherein W is a preset truncation length; the curvature of each pixel point on the first truncation line and the second truncation line is obtained respectively, and the average value of the curvature of all pixel points on the first truncation line and the second truncation line is recorded as the characteristic curvature of the first truncation line and the second truncation line respectively.

8. The intelligent quality inspection method for second-hand electronic products according to claim 6, characterized in that: The method of obtaining the first boundary pixel point and the second boundary pixel point according to the distribution of the pixel points in the first characteristic crack region and the second characteristic crack region comprises the following specific steps: The pixel point with the closest Euclidean distance to the second characteristic crack area in the first characteristic crack area is recorded as the first boundary pixel point; the pixel point with the closest Euclidean distance to the first characteristic crack area in the second characteristic crack area is recorded as the second boundary pixel point.

9. A second-hand electronic product intelligent quality inspection system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the computer program is executed by the processor, the steps of the intelligent quality inspection method for second-hand electronic products as described in any one of claims 1-8 are implemented.

Citation Information

Patent Citations

  • Mobile phone screen defect intelligent detection method based on computer vision

    CN117078672A