Defect detection method and device for steering wheel hand plate of new energy automobile

By constructing a grayscale symbiosis matrix on the steering wheel handboard and correcting the edge line strength, the accuracy of traditional detection methods when distinguishing textures and scratches is solved, and the accuracy of defect detection of new energy vehicle steering wheel handboards is improved.

CN118967694AInactive Publication Date: 2024-11-15DALIAN KEXUN PRECISION MOLD CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411456789.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2024-11-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When traditional edge detection algorithms detect surface scratches on the steering wheel handboard of new energy vehicles, they cannot effectively distinguish textures and scratches, resulting in reduced detection accuracy.

Method used

By obtaining the grayscale image of the steering wheel handboard, dividing it into several reference areas, building a grayscale symbiosis matrix, filtering the main pixel point pairs, calculating the degree of abnormality and cohesion, correcting the edge line intensity information, and then detecting scratches.

Benefits of technology

It significantly improves the accuracy of abnormal detection, enhances the sensitivity to local abnormal changes, and improves the accuracy of steering wheel handboard defect detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118967694A_ABST
    Figure CN118967694A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to a defect detection method and device for a steering wheel hand plate of a new energy automobile, and the method comprises the steps: obtaining a target region in a steering wheel hand plate grayscale image; according to the gray level co-occurrence matrix of the target area and the corresponding frequency number of each main pixel point pair in the gray level co-occurrence matrix of the target area, the final abnormal degree of each reference area is obtained; further calculating the corrected intensity information of each edge line in each reference area; and according to the corrected strength information of each edge line in each reference area, obtaining the hand plate scratch of the steering wheel. According to the method, the independent index of each edge line is obtained through the characteristics that the edges of the scratches are relatively regular and relatively independent on the whole, and gradient intensity correction of different degrees is performed on different edge lines in combination with the overall texture abnormity of the areas where the edge lines are located; and the suitability of edge detection in the process of detecting the scratches of the steering wheel with the complex textures is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a defect detection method and device for a steering wheel prototype of a new energy vehicle. Background Art

[0002] With the rapid development of new energy vehicles, the quality requirements for auto parts are getting higher and higher. As one of the key components of automotive interior, the appearance quality of the steering wheel is directly related to the quality of the whole vehicle. A smooth and flawless steering wheel handboard can improve the overall grade of the interior of the car; in addition, a comfortable, smooth and ergonomic feel can improve driving comfort and enhance user experience. The steering wheel handboard is used to check whether the appearance and structure of the product are reasonable and verify the feasibility of the product. Its surface usually contains various details and textures to simulate the appearance and feel of the actual steering wheel. In order to ensure the quality of the final product of the steering wheel, it is necessary to conduct strict quality inspection on the steering wheel handboard, especially for the detection of surface scratches and other defects. When detecting surface scratch defects on the steering wheel handboard, the traditional edge detection algorithm has complex texture on the surface of the steering wheel handboard, and the gradient information of the image is complicated and disordered. At the same time, the gradient performance of the scratch is uncertain relative to the gradient information of the surface texture of the steering wheel handboard. Therefore, when using the traditional gradient information to screen the edge information, it is not possible to obtain a good effect, and it is not possible to distinguish between texture and scratches well, which reduces the accuracy of the defect detection of the steering wheel handboard. Summary of the invention

[0003] The present invention provides a defect detection method and device for a steering wheel hand plate of a new energy vehicle to solve the existing problems.

[0004] The defect detection method and device for the steering wheel hand plate of a new energy vehicle of the present invention adopts the following technical scheme: An embodiment of the present invention provides a defect detection method for a steering wheel hand plate of a new energy vehicle, the method comprising the following steps: Get the target area in the grayscale image of the steering wheel hand plate; The target area is divided into several reference areas, and a gray level co-occurrence matrix of the target area and each reference area is constructed; each frequency in the gray level co-occurrence matrix corresponds to several identical pixel pairs in the corresponding area; according to the gray level co-occurrence matrix of each reference area, several main pixel pairs are screened out from all pixel pairs in each reference area; according to the gray level co-occurrence matrix of the target area and the corresponding frequency of each main pixel pair in each reference area in the gray level co-occurrence matrix of the target area, the final abnormality degree of each reference area is obtained; Obtain several edge lines in each reference area, and obtain the degree of integration of each edge line in each reference area in the horizontal direction according to the frequency of pixel pairs formed by each pixel point on each edge line in each reference area and its adjacent pixel points in the gray level co-occurrence matrix of each reference area; obtain the corrected intensity information of each edge line in each reference area according to the final abnormality degree of each reference area, the gray level co-occurrence matrix of the target area, and the degree of integration of each edge line in the horizontal direction of each edge line in each reference area; According to the corrected intensity information of each edge line in each reference area, the scratches on the steering wheel hand plate are obtained.

[0005] Furthermore, the target region is divided into a plurality of reference regions, and a gray level co-occurrence matrix of the target region and each reference region is constructed, including the following specific steps: The minimum circumscribed rectangle of the target area is equally divided into several rectangular blocks, and the area containing the target area in each rectangular block is recorded as the reference area; Set the direction to horizontal and the step size to , construct the gray level co-occurrence matrix of the target area and each reference area, where is the preset quantity threshold.

[0006] Furthermore, the method of selecting a plurality of main pixel pairs from all pixel pairs in each reference region according to the gray level co-occurrence matrix of each reference region includes the following specific steps: In the gray level co-occurrence matrix of each reference region, the pixel pairs corresponding to the frequencies greater than the median of all frequencies in each reference region are recorded as the main pixels.

[0007] Further, the final abnormality degree of each reference area is obtained according to the gray level co-occurrence matrix of the target area and the corresponding frequency of each main pixel pair in each reference area in the gray level co-occurrence matrix of the target area, and the specific steps include the following: According to the minimum distance from the centroid of each reference area to the contour of the target area, the gray level co-occurrence matrix of the target area, and the corresponding frequency of each main pixel pair in each reference area in the gray level co-occurrence matrix of the target area, the abnormality degree of each reference area in the horizontal direction is obtained; According to the method of obtaining the abnormality degree of each reference area in the horizontal direction, the abnormality degree of each reference area in the vertical direction is obtained; The average of the abnormality degree of each reference area in the horizontal direction and the abnormality degree of each reference area in the vertical direction is recorded as the final abnormality degree of each reference area.

[0008] Furthermore, according to the minimum distance from the centroid of each reference area to the contour of the target area, the gray level co-occurrence matrix of the target area, and the corresponding frequency of each main pixel pair in each reference area in the gray level co-occurrence matrix of the target area, the specific calculation formula for the abnormality degree of each reference area in the horizontal direction is obtained as follows: in, Indicates The abnormality of the reference area in the horizontal direction; Indicates The number of main pixel pairs in the reference area; Indicates In the reference area The corresponding frequencies of the main pixel pairs in the gray-level co-occurrence matrix of the target area; Indicates The minimum distance between the centroid of the reference area and the outline of the target area; is an exponential function with a natural constant as base, Represents the maximum frequency in the gray-level co-occurrence matrix of the target area; represents the hyperbolic tangent function.

[0009] Furthermore, the step of obtaining the horizontal sociability of each edge line in each reference region according to the frequency of the pixel pairs formed by each pixel point and its adjacent pixel points in the gray level co-occurrence matrix of each reference region comprises the following specific steps: Calculate the The product of the normalized value of the minimum distance between the centroid of the reference area and the contour of the target area and the maximum frequency in the gray level co-occurrence matrix of the target area is The first The ratio of the frequency of the reference pixel pairs of the edge line in the horizontal direction in the gray level co-occurrence matrix of the target area to the product is recorded as The first The degree of integration of the edge lines in the horizontal direction.

[0010] Furthermore, the method of obtaining the corrected intensity information of each edge line in each reference area according to the final abnormality degree of each reference area, the gray level co-occurrence matrix of the target area and the horizontal integration degree of each edge line in each reference area includes the following specific steps: According to The first The method for obtaining the degree of sociality of the edge lines in the horizontal direction is to obtain the The first The degree of vertical integration of the edge lines; The first In the reference area The mean of the gradient amplitudes of all pixels on the edge line is recorded as The first The original edge strength information of each edge line; Use the least square method to perform linear fitting on each edge line of each reference area to obtain a fitting straight line for each edge line and a residual error for each edge line; According to the final abnormality degree of each reference area, the original edge strength information of each edge line in each reference area, the residual of each edge line, the degree of conformity of each edge line in each reference area in the horizontal direction and the degree of conformity in the vertical direction, the corrected strength information of each edge line in each reference area is obtained.

[0011] Furthermore, according to the final abnormality degree of each reference area, the original edge strength information of each edge line in each reference area, the residual of each edge line, the horizontal conformity degree of each edge line in each reference area, and the vertical conformity degree, the specific calculation formula for obtaining the corrected strength information of each edge line in each reference area is: in, Indicates The first The corrected intensity information of the edge line, Indicates The first The original edge strength information of the edge line, Indicates The final abnormality level of the reference area, Indicates The first The residual of the edge line, Indicates The first The degree of integration of the edge lines in the horizontal direction, Indicates The first The degree of vertical integration of the edge lines, is an exponential function with a natural constant as base, represents the linear normalization function.

[0012] Furthermore, obtaining the scratches on the steering wheel hand plate according to the corrected strength information of each edge line in each reference area includes the following specific steps: The edge line whose corrected intensity information is greater than the preset judgment threshold is recorded as a steering wheel handplate scratch.

[0013] The present invention also proposes a defect detection device for a steering wheel hand plate of a new energy vehicle, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the computer program stored in the memory to implement the steps of the aforementioned defect detection method for a steering wheel hand plate of a new energy vehicle.

[0014] The beneficial effects of the technical solution of the present invention are: The target area in the grayscale image of the steering wheel handplate is obtained and equally divided into several reference areas, and the main pixel pairs in each reference area and the corresponding frequency of each main pixel pair in the grayscale co-occurrence matrix of the target area are obtained; thereby, the final abnormality degree of each reference area is obtained; based on dividing the target area into several reference areas, the accuracy of abnormality detection is significantly improved, which helps to quickly locate potential faults or wear areas. Several edge lines in each reference area are obtained, and according to each pixel point on each edge line in each reference area, the reference pixel pairs in the horizontal direction and the reference pixel pairs in the vertical direction of each edge line in each reference area are obtained; according to the final abnormality degree of each reference area, the grayscale co-occurrence matrix of the target area, and the corresponding frequencies of the reference pixel pairs in the horizontal direction and the reference pixel pairs in the vertical direction of each edge line in each reference area in the grayscale co-occurrence matrix of the target area, the corrected intensity information of each edge line in each reference area is obtained; according to the characteristics that the edges of the scratches are relatively regular and relatively independent on the whole, the independent index of each edge line is obtained, which effectively ensures the comprehensive capture of the subtle structural features in the image, enhances the sensitivity to local abnormal changes in the image analysis process, and further improves the accuracy of steering wheel hand plate defect detection. According to the corrected intensity information of each edge line in each reference area, the scratches on the steering wheel hand plate are obtained. At this point, the present invention uses the characteristics of the relatively regular edges of scratches and the overall independence of scratches, and combines the overall texture anomalies of the area where the edge lines are located to perform gradient strength corrections to different edge lines to varying degrees, thereby enhancing the adaptability of edge detection in detecting scratches on steering wheels with complex textures and improving the accuracy of steering wheel handplate defect detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] 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.

[0016] Figure 1 The present invention is a flowchart of the steps of the defect detection method for the steering wheel prototype of a new energy vehicle. DETAILED DESCRIPTION

[0017] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the defect detection method and equipment for the steering wheel hand plate of a new energy vehicle proposed by the present invention, its specific implementation method, structure, characteristics and effects are described in detail as follows 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.

[0018] 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.

[0019] The following is a detailed description of the defect detection method and device for a steering wheel hand plate of a new energy vehicle provided by the present invention in conjunction with the accompanying drawings.

[0020] See also Figure 1 , which shows a flow chart of the steps of a defect detection method for a steering wheel hand plate of a new energy vehicle provided by an embodiment of the present invention, the method comprising the following steps: Step S001: Acquire the target area in the grayscale image of the steering wheel hand plate.

[0021] The steering wheel handboard image is collected by an industrial camera, and the collected steering wheel handboard image is grayscaled to obtain a steering wheel handboard grayscale image.

[0022] The Otsu method is used to operate the grayscale image of the steering wheel handboard to obtain the segmentation threshold.

[0023] In the grayscale image of the steering wheel handboard, the area composed of pixels whose grayscale values ​​are less than the segmentation threshold is recorded as the target area.

[0024] It should be noted that in this example, a black steering wheel hand plate image is collected on a white background plate. When performing scratch defect detection on the steering wheel hand plate, since the steering wheel has an arc and is round, in order to minimize the impact caused by the uneven distribution of its surface brightness, a surface light source is used for illumination. Among them, grayscale and Otsu method are both well-known technologies, and the specific methods are not introduced here.

[0025] Step S002: Divide the target area into several reference areas, construct the gray level co-occurrence matrix of the target area and each reference area; each frequency in the gray level co-occurrence matrix corresponds to several identical pixel pairs in the corresponding area; according to the gray level co-occurrence matrix of each reference area, select several main pixel pairs from all pixel pairs in each reference area; according to the gray level co-occurrence matrix of the target area and the corresponding frequency of each main pixel pair in each reference area in the gray level co-occurrence matrix of the target area, obtain the final abnormality degree of each reference area.

[0026] The texture information on the surface of the car steering wheel is similar in overall performance. Therefore, the greater the difference between the local texture performance and the overall texture performance of the image, the more abnormal the gradient performance is in the current local area. The greater the degree of abnormality in the area, the more likely it is that there are scratches in the area.

[0027] In addition, due to the curvature of the steering wheel surface, different curvatures lead to different brightness performance in different areas, so the grayscale performance in different curvature areas is different. These grayscale performance differences will be reflected in the texture information of the image, so there are reasonable texture performance differences.

[0028] The minimum circumscribed rectangle of the target area is equally divided into several rectangular blocks, and the area containing the target area in each rectangular block is recorded as the reference area.

[0029] Set the direction to horizontal and the step size to , construct the gray level co-occurrence matrix of the target area and each reference area. Each frequency in the gray level co-occurrence matrix corresponds to a number of identical pixel pairs in the corresponding area.

[0030] It should be noted that: in this embodiment, each rectangular block is a 7*7 area, and the preset number threshold is 1, and this is used as an example for description. The grayscale co-occurrence matrix of the target area is the texture information expression matrix of the steering wheel handboard as a whole. The grayscale co-occurrence matrix is ​​a well-known technology, and the specific method is not introduced here. The rows and columns of the grayscale co-occurrence matrix of the reference area correspond to different grayscale values ​​in the reference area, and the grayscale values ​​corresponding to the same row and column are the same. The value of each element in the grayscale co-occurrence matrix is ​​the number of times the grayscale value corresponding to the row and column appears adjacently in the horizontal direction in the reference area, that is, the adjacent grayscale values ​​correspond to two pixel points. The pixel point pairs formed by two pixel points. Each element in the grayscale co-occurrence matrix represents the frequency of two adjacent pixel pairs with specific grayscale levels in the image at a specific direction and distance.

[0031] In the gray level co-occurrence matrix of each reference region, the pixel pairs corresponding to the frequencies greater than the median of all frequencies in each reference region are recorded as the main pixel pairs.

[0032] Get the frequency of each main pixel pair in the gray level co-occurrence matrix of the target area.

[0033] It should be noted that the larger the corresponding frequency of all main pixel pairs in each reference area in the grayscale co-occurrence matrix of the target area, the more similar the texture performance of the reference area is to the texture performance of the target area, and the smaller the abnormality of the texture performance of the reference area is.

[0034] Then, considering that there is a curvature on the surface of the steering wheel handboard, different curvatures lead to different brightness performance in different areas, so the grayscale performance of different curvature areas is different. These grayscale performance differences will be reflected in the texture information of the grayscale image of the steering wheel handboard, so there are reasonable texture performance differences. It can also be seen that the curvature of most areas in the target area changes little, and the overall grayscale performance difference is not large. For the area at the edge of the target area, due to the large curvature change, the surface grayscale performance is small, so the texture performance is weaker. At the same time, the more concentrated the frequency in the grayscale co-occurrence matrix of the reference area, the stronger the texture performance.

[0035] In each reference region, the minimum distance from the centroid of each reference region to the contour of the target region is obtained.

[0036] First For example, the reference area The calculation formula of the abnormal degree of a reference area in the horizontal direction is: in, Indicates The abnormality of the reference area in the horizontal direction; Indicates In the reference area The corresponding frequencies of the main pixel pairs in the gray-level co-occurrence matrix of the target area; Indicates The number of main pixel pairs in the reference area, Indicates The minimum distance between the centroid of the reference area and the outline of the target area; is an exponential function with a natural constant as the base. To present the inverse proportional relationship and normalization processing, the implementer can set the inverse proportional function and normalization function according to the actual situation. Represents the maximum frequency in the gray-level co-occurrence matrix of the target area; represents the hyperbolic tangent function.

[0037] What needs to be explained is: Indicates The minimum distance between the centroid of the reference area and the contour of the target area. The smaller the minimum distance, the The greater the change in the curvature of a reference area, the smaller the grayscale expression inside it, the weaker the internal texture expression, and therefore the smaller its expression in the grayscale co-occurrence matrix with the target area. Then the greater the allowable deviation of the corresponding frequency of the main pixel points inside it in the grayscale co-occurrence matrix of the target area. Indicates that according to The maximum reference frequency after the position of the reference area is corrected; Indicates The gray level co-occurrence matrix of the reference area The comparison between the corresponding frequency of the first main pixel pair in the gray level co-occurrence matrix of the target area and the reference maximum frequency, the larger the ratio, the In the reference area The more frequently the main pixel pairs appear in the whole, the more similar the texture performance of the reference area is to the texture performance of the whole, and the smaller the abnormality is. Indicates The greater the abnormality, the more inconsistent the texture performance of the area is with the overall texture performance, and the greater the abnormality. Represents the hyperbolic tangent function, which is used to normalize data values ​​to between 0 and 1.

[0038] According to the above method, this embodiment can obtain the abnormality degree of each reference area in the horizontal direction.

[0039] The horizontal direction in the construction process of the gray-level co-occurrence matrix is ​​replaced by the vertical direction.

[0040] According to the method for obtaining the abnormality degree of each reference area in the horizontal direction, the abnormality degree of each reference area in the vertical direction is obtained.

[0041] The average of the abnormality degree of each reference area in the horizontal direction and the abnormality degree of each reference area in the vertical direction is recorded as the final abnormality degree of each reference area.

[0042] Step S003: Obtain several edge lines in each reference area, and obtain the degree of integration of each edge line in each reference area in the horizontal direction according to the frequency of pixel pairs formed by each pixel point on each edge line in each reference area and its adjacent pixel points in the gray level co-occurrence matrix of each reference area; obtain the corrected intensity information of each edge line in each reference area according to the final abnormality degree of each reference area, the gray level co-occurrence matrix of the target area and the degree of integration of each edge line in the horizontal direction.

[0043] Use the Canny edge detection algorithm to obtain several edges in each reference area.

[0044] The Harris corner detection algorithm is used to obtain the intersection points of different edges in each reference area, and the edges are disconnected at the intersection points to obtain different edge lines.

[0045] It should be noted that: for local areas, it is also necessary to combine the differences between edges to make corrections to varying degrees. Since the textures on the steering wheel handplate are intertwined and connected to each other, these edge lines need to be segmented first. The more regular the edge line is and the greater the difference from the overall edge line shape, the more likely it is a scratch line and the greater the degree of correction; the more independent the texture information on the edge line is in the grayscale co-occurrence matrix, the more likely it is a scratch area and the greater the degree of correction. Among them, the Canny edge detection algorithm and the Harris corner detection algorithm are both well-known technologies, and the specific methods are not introduced here.

[0046] In the In the gray level co-occurrence matrix of the reference area, In the reference area On the edge line, each pixel point is horizontally matched with its left and right adjacent pixel points, and the pixel point pair with the largest corresponding frequency is recorded as the In the reference area The reference pixel pairs of the edge lines in the horizontal direction.

[0047] First For example, the reference area The first The calculation formula for the horizontal sociability of edge lines is: in, Indicates The first The degree of integration of the edge lines in the horizontal direction, Indicates The first The corresponding frequencies of the reference pixel pairs of edge lines in the horizontal direction in the gray-level co-occurrence matrix of the target area; Indicates The minimum distance between the centroid of the reference area and the outline of the target area. Represents the maximum frequency in the gray-level co-occurrence matrix of the target area; represents the hyperbolic tangent function; The horizontal direction in the process of acquiring the above reference pixel pairs is replaced by the vertical direction.

[0048] According to The first The method for obtaining the degree of sociality of the edge lines in the horizontal direction is to obtain the The first The degree of vertical integration of the edge lines.

[0049] Use the canny edge operator to get the In the reference area The gradient amplitude of each pixel on the edge line is In the reference area The mean of the gradient amplitudes of all pixels on the edge line is recorded as The first The original edge strength information of each edge line.

[0050] The least square method is used to perform linear fitting on each edge line of each reference area to obtain a fitting straight line for each edge line and a residual error for each edge line.

[0051] It should be noted that the smaller the residual of each edge line is, the more regular the edge line is and the more likely it is a scratch. In the reference area There are multiple reference pixel pairs of an edge line in the horizontal direction, and one of them is selected for analysis. Among them, the least square method and the canny edge operator are both well-known technologies, and the specific methods are not introduced here.

[0052] First For example, the reference area The first The calculation formula of the corrected intensity information of each edge line is: in, Indicates The first The corrected intensity information of the edge line, Indicates The first The original edge strength information of each edge line. Indicates The final abnormality level of the reference area, Indicates The first The residual of the edge line, Indicates The first The degree of integration of the edge lines in the horizontal direction, Indicates The first The degree of vertical integration of the edge lines, is an exponential function with a natural constant as the base. To present the inverse proportional relationship and normalization processing, the implementer can set the inverse proportional function and normalization function according to the actual situation. represents the linear normalization function.

[0053] What needs to be explained is: Indicates The final abnormality degree of the reference area. The larger the value, the more inconsistent the texture performance of the area is with the overall texture performance, and the greater the degree of correction of the edge line in the area. Indicates The first The degree of integration of the edge lines in the horizontal direction. The larger the value, the more similar the texture performance of the current edge line is to the overall performance. Indicates The first The comprehensive integration degree of the edge lines. The smaller the value, the more independent the performance of the edge line, the more likely it is a scratch area, and the greater the degree of correction; Indicates The first The residual of the edge line, that is, The first The smaller the value, the more regular the edge line is. The more regular the edge line is, the more likely it is a scratch and the greater the degree of correction; Indicates area Inner edge line The original edge strength information is calculated as the average value of the gradient information of each point on the edge line; Indicates The first The corrected strength information of an edge line. The larger the value, the more likely the edge line is a scratch.

[0054] Step S004: Obtain the scratches on the steering wheel hand plate according to the corrected strength information of each edge line in each reference area.

[0055] A judgment threshold is preset, and the edge line whose corrected intensity information is greater than the preset judgment threshold is recorded as a steering wheel hand plate scratch.

[0056] It should be noted that: the preset judgment threshold in this embodiment is 0.9, and this is taken as an example for description.

[0057] So far, the present invention is completed.

[0058] In summary, in an embodiment of the present invention, a target area in a grayscale image of a steering wheel handboard is obtained; each target area is equally divided into a number of reference areas, a grayscale co-occurrence matrix of the target area and each reference area is constructed, and the main pixel pairs in each reference area and the corresponding frequencies of each main pixel pair in the grayscale co-occurrence matrix of the target area are obtained; according to the grayscale co-occurrence matrix of the target area and the corresponding frequencies of each main pixel pair in the grayscale co-occurrence matrix of the target area, the final abnormality degree of each reference area is obtained; a number of edge lines in each reference area are obtained, and according to each pixel on each edge line in each reference area, the reference pixel pairs in the horizontal direction and the reference pixel pairs in the vertical direction of each edge line in each reference area are obtained; according to the final abnormality degree of each reference area, the grayscale co-occurrence matrix of the target area, the reference pixel pairs in the horizontal direction and the reference pixel pairs in the vertical direction of each edge line in each reference area are obtained, and the corrected intensity information of each edge line in each reference area is obtained according to the corrected intensity information of each edge line in each reference area. At this point, the present invention obtains independent indicators for each edge line through the relatively regular edges of scratches and the overall independence, and performs gradient strength corrections to different edge lines to varying degrees in combination with the overall texture anomaly of the area where the edge line is located, thereby enhancing the adaptability of edge detection in detecting scratches on steering wheels with complex textures.

[0059] The present invention also provides a defect detection device for a steering wheel hand plate of a new energy vehicle, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the computer program stored in the memory to implement the steps of the aforementioned defect detection method for a steering wheel hand plate of a new energy vehicle.

[0060] 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 defect detection method for a steering wheel prototype of a new energy vehicle, characterized in that: The method comprises the following steps: Get the target area in the grayscale image of the steering wheel hand plate; The target area is divided into several reference areas, and a gray level co-occurrence matrix of the target area and each reference area is constructed; each frequency in the gray level co-occurrence matrix corresponds to several identical pixel pairs in the corresponding area; according to the gray level co-occurrence matrix of each reference area, several main pixel pairs are screened out from all pixel pairs in each reference area; according to the gray level co-occurrence matrix of the target area and the corresponding frequency of each main pixel pair in each reference area in the gray level co-occurrence matrix of the target area, the final abnormality degree of each reference area is obtained; Obtain several edge lines in each reference area, and obtain the degree of integration of each edge line in each reference area in the horizontal direction according to the frequency of pixel pairs formed by each pixel point on each edge line in each reference area and its adjacent pixel points in the gray level co-occurrence matrix of each reference area; obtain the corrected intensity information of each edge line in each reference area according to the final abnormality degree of each reference area, the gray level co-occurrence matrix of the target area, and the degree of integration of each edge line in the horizontal direction of each edge line in each reference area; According to the corrected strength information of each edge line in each reference area, the scratches on the steering wheel hand plate are obtained; The final abnormality degree of each reference area is obtained according to the gray level co-occurrence matrix of the target area and the corresponding frequency of each main pixel pair in each reference area in the gray level co-occurrence matrix of the target area, and the specific steps include the following: According to the minimum distance from the centroid of each reference area to the contour of the target area, the gray level co-occurrence matrix of the target area, and the corresponding frequency of each main pixel pair in each reference area in the gray level co-occurrence matrix of the target area, the abnormality degree of each reference area in the horizontal direction is obtained; According to the method of obtaining the abnormality degree of each reference area in the horizontal direction, the abnormality degree of each reference area in the vertical direction is obtained; The average of the abnormality degree of each reference area in the horizontal direction and the abnormality degree of each reference area in the vertical direction is recorded as the final abnormality degree of each reference area; The step of obtaining the horizontal integration degree of each edge line in each reference region according to the frequency of the pixel pairs formed by each pixel point and its adjacent pixel points on each edge line in each reference region in the gray level co-occurrence matrix of each reference region comprises the following specific steps: Calculate the The product of the normalized value of the minimum distance between the centroid of the reference area and the contour of the target area and the maximum frequency in the gray level co-occurrence matrix of the target area is The first The ratio of the frequency of the reference pixel pairs of the edge line in the horizontal direction in the gray level co-occurrence matrix of the target area to the product is recorded as The first The degree of integration of the edge lines in the horizontal direction.

2. The defect detection method for the steering wheel hand plate of a new energy vehicle according to claim 1 is characterized in that: The step of dividing the target region into a plurality of reference regions and constructing the gray level co-occurrence matrix of the target region and each reference region includes the following specific steps: The minimum circumscribed rectangle of the target area is equally divided into several rectangular blocks, and the area containing the target area in each rectangular block is recorded as the reference area; Set the direction to horizontal and the step size to , construct the gray level co-occurrence matrix of the target area and each reference area, where is the preset quantity threshold.

3. The defect detection method for the steering wheel hand plate of a new energy vehicle according to claim 1 is characterized in that: The method of selecting a plurality of main pixel pairs from all pixel pairs in each reference region according to the gray level co-occurrence matrix of each reference region includes the following specific steps: In the gray level co-occurrence matrix of each reference region, the pixel pairs corresponding to the frequencies greater than the median of all frequencies in each reference region are recorded as the main pixels.

4. The defect detection method for the steering wheel hand plate of a new energy vehicle according to claim 1 is characterized in that: According to the minimum distance from the centroid of each reference area to the contour of the target area, the gray level co-occurrence matrix of the target area, and the corresponding frequency of each main pixel pair in each reference area in the gray level co-occurrence matrix of the target area, the specific calculation formula for the abnormality degree of each reference area in the horizontal direction is obtained as follows: in, Indicates The abnormality of the reference area in the horizontal direction; Indicates The number of main pixel pairs in the reference area; Indicates In the reference area The corresponding frequencies of the main pixel pairs in the gray-level co-occurrence matrix of the target area; Indicates The minimum distance between the centroid of the reference area and the outline of the target area; is an exponential function with a natural constant as base, Represents the maximum frequency in the gray-level co-occurrence matrix of the target area; represents the hyperbolic tangent function.

5. The defect detection method for the steering wheel hand plate of a new energy vehicle according to claim 1 is characterized in that: The method of obtaining the corrected intensity information of each edge line in each reference area according to the final abnormality degree of each reference area, the gray level co-occurrence matrix of the target area and the horizontal integration degree of each edge line in each reference area includes the following specific steps: According to The first The method for obtaining the degree of sociality of the edge lines in the horizontal direction is to obtain the The first The degree of vertical integration of the edge lines; The first In the reference area The mean of the gradient amplitudes of all pixels on the edge line is recorded as The first The original edge strength information of each edge line; Use the least square method to perform linear fitting on each edge line of each reference area to obtain a fitting straight line for each edge line and a residual error for each edge line; According to the final abnormality degree of each reference area, the original edge strength information of each edge line in each reference area, the residual of each edge line, the degree of conformity of each edge line in each reference area in the horizontal direction and the degree of conformity in the vertical direction, the corrected strength information of each edge line in each reference area is obtained.

6. The defect detection method for the steering wheel hand plate of a new energy vehicle according to claim 7 is characterized in that: The specific calculation formula for obtaining the corrected strength information of each edge line in each reference area according to the final abnormality degree of each reference area, the original edge strength information of each edge line in each reference area, the residual of each edge line, the horizontal conformity degree of each edge line in each reference area, and the vertical conformity degree of each edge line in each reference area is: in, Indicates The first The corrected intensity information of the edge line, Indicates The first The original edge strength information of the edge line, Indicates The final abnormality level of the reference area, Indicates The first The residual of the edge line, Indicates The first The degree of integration of the edge lines in the horizontal direction, Indicates The first The degree of vertical integration of the edge lines, is an exponential function with a natural constant as base, represents the linear normalization function.

7. The defect detection method for the steering wheel hand plate of a new energy vehicle according to claim 1 is characterized in that: The method of obtaining the scratches on the steering wheel hand plate according to the corrected strength information of each edge line in each reference area includes the following specific steps: The edge line whose corrected intensity information is greater than the preset judgment threshold is recorded as a steering wheel handplate scratch.

8. A defect detection device for a steering wheel prototype of a new energy vehicle, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by a processor, the steps of the defect detection method for a steering wheel prototype of a new energy vehicle are implemented as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Fatigue driving detection method based on eye and mouth states

    CN104809445A

  • Steering wheel holding state detection method and device

    CN113869146A

  • Visual inspection system for polishing effect of aluminum alloy surface

    CN117173189A

  • Automatic inspection method for belt-type conveying device

    WO2023134789A1