High-precision visual inspection method and device for semi-trailer axles

By dividing the area to be analyzed in the semi-trailer axle image and calculating the relevant indicators, the image is enhanced by calculating the enhancement coefficient, which solves the problem that the prior art cannot effectively enhance the performance effect of surface defects, and improves the visual detection accuracy of semi-trailer axle.

CN119273678BActive Publication Date: 2025-04-04SHANDONG YANGJIA AUTOMOBILE MFG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411784804.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-04-04
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

When the prior art uses histogram equalization method to enhance image, it cannot effectively enhance the performance effect of surface defects, resulting in inaccurate visual detection results of semi-trailer axles.

Method used

By dividing the area to be analyzed from the grayscale image of the semi-trailer axle, calculating the color deviation and deformation defect metrics, filtering out the target area, and calculating the enhancement coefficient based on the difference value of the grayscale level and the run distribution, the image is enhanced.

Benefits of technology

Effectively enhance the performance effect of surface defects and improve the accuracy of detection of axle defects in semi-trailer vehicles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119273678B_ABST
    Figure CN119273678B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image enhancement technology, and specifically to a visual high-precision detection method and detection device for a transport semitrailer axle. The present invention first obtains the color deviation of the area to be analyzed based on the difference between the grayscale of the pixel points in the area to be analyzed and the preset axle grayscale; obtains the deformation defect measurement of the area to be analyzed based on the distribution of the run in the area to be analyzed; obtains the deformation misdetection probability of the area to be analyzed based on the color deviation and deformation defect measurement of the area to be analyzed; enhances the grayscale image of the semitrailer axle according to the grayscale enhancement coefficient to obtain the semitrailer axle enhanced image; and performs defect detection on the semitrailer axle enhanced image. The present invention fully considers the grayscale's ability to express defect areas, reasonably sets the grayscale enhancement coefficient, effectively enhances the expression effect of surface defects, and improves the accuracy of semitrailer axle defect detection.
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 enhancement, and in particular to a visual high-precision detection method and a detection device for a transport semitrailer axle. Background Art

[0002] The axle of a transport trailer is an axle assembly installed on the trailer bucket and is a key component of the vehicle chassis. It is usually composed of an axle assembly, a brake device, a wheel hub assembly and other related components. It is mainly used to support the weight of the vehicle body, transmit various external forces and reaction forces, and ensure the driving stability of the vehicle. In the production of transport trailer axles, it is very important to inspect the axles of transport trailers, which is directly related to the performance of the axle itself and driving safety. Usually, a high-precision camera is used to capture images of the transport trailer axles, and a machine learning model is used to identify defects in the image. In order to improve the ability of the machine learning model to identify surface defects in the grayscale image of the semi-trailer axle, it is necessary to enhance the grayscale image of the semi-trailer axle.

[0003] Histogram equalization is a simple and effective image enhancement technology. The existing technology uses histogram equalization to enhance images. The histogram equalization method redistributes the pixel values ​​of the image to make the brightness distribution of the image more uniform, thereby enhancing the contrast and details of defects in the image. However, when using the histogram equalization method for image enhancement, the histogram equalization method is based on the global grayscale distribution and does not fully consider the grayscale's ability to express defective areas, resulting in the inability to effectively enhance the expression of surface defects, resulting in inaccurate visual inspection results of semi-trailer axles. Summary of the invention

[0004] In order to solve the technical problem that the prior art cannot effectively enhance the performance of surface defects, resulting in inaccurate visual inspection results of semi-trailer axles, the purpose of the present invention is to provide a visual high-precision inspection method and inspection device for transport semi-trailer axles, and the technical solutions adopted are as follows:

[0005] A visual high-precision detection method for a transport semitrailer axle, the method comprising:

[0006] Acquire the grayscale image of the semitrailer axle from a detection database;

[0007] According to the grayscale values ​​of the pixels in the grayscale image of the semi-trailer axle, the various areas to be analyzed are divided from the grayscale image of the semi-trailer axle; according to the difference between the grayscale of the pixels in the area to be analyzed and the preset axle grayscale, the color deviation of the area to be analyzed is obtained; according to the grayscale of the pixels in the area to be analyzed, all the runs of the area to be analyzed are constructed; according to the distribution of the runs in the area to be analyzed, the deformation defect measurement of the area to be analyzed is obtained; according to the color deviation and the deformation defect measurement of the area to be analyzed, the deformation false detection probability of the area to be analyzed is obtained; according to the deformation false detection probability, the target area is screened out from all the areas to be analyzed; according to the grayscale of the pixels in the runs in the target area, the enhancement coefficient of each grayscale is obtained;

[0008] According to the enhancement coefficients of each gray level, the grayscale image of the semitrailer axle is enhanced to obtain an enhanced image of the semitrailer axle; and defect detection is performed on the enhanced image of the semitrailer axle.

[0009] Furthermore, the method for acquiring the area to be analyzed includes:

[0010] Based on the Otsu threshold method, the semi-trailer axle grayscale image is binarized according to the grayscale values ​​of the pixels in the semi-trailer axle grayscale image to obtain the axle binary image; the foreground connected domains of the axle binary image are extracted using a connected domain analysis algorithm; the foreground connected domains whose total number of pixels is greater than a preset number threshold are marked as connected domains to be analyzed; the connected domains to be analyzed in the axle binary image are mapped to the semi-trailer axle grayscale image to obtain the connected domains to be analyzed in the semi-trailer axle grayscale image;

[0011] The detection database also includes each block area of ​​the grayscale image of the semi-trailer axle; for any one of the connected domains to be analyzed, all block areas in the grayscale image of the semi-trailer axle that overlap with the connected domain to be analyzed are used as the to-be-processed areas of the connected domain to be analyzed; the minimum circumscribed rectangle of the to-be-processed area including the connected domain to be analyzed in the grayscale image of the semi-trailer axle is used as the to-be-analyzed area corresponding to the connected domain to be analyzed.

[0012] Furthermore, the method for obtaining the color deviation comprises:

[0013] For any of the areas to be analyzed, the average of the absolute values ​​of the differences between the gray levels of all pixels and the preset axle gray level is calculated to obtain the color deviation of the area to be analyzed.

[0014] Furthermore, the method for obtaining the run length includes:

[0015] Using a preset direction as the stroke direction, evenly dividing the grayscale level into various grayscale intervals according to a preset number of divisions; starting from the upper left corner of the area to be analyzed, scanning the pixel points of the area to be analyzed row by row according to the preset direction; using the first scanned pixel point as the initial stroke;

[0016] Adjustment operation of the stroke: for the newly scanned pixel point, if the pixel point and the stroke are in the same grayscale interval, the pixel point is added to the stroke to obtain the updated stroke; if the pixel point and the stroke are not in the same grayscale interval, the stroke is ended, and the newly scanned pixel point is used as the next stroke to start recording the next stroke; repeat the adjustment operation of the stroke until the area to be analyzed is scanned, and all the strokes corresponding to the area to be analyzed are output.

[0017] Furthermore, the method for obtaining the deformation defect metric includes:

[0018] Any grayscale interval is used as the grayscale interval to be analyzed; the grayscale interval where the preset axle grayscale level is located is used as the standard grayscale interval;

[0019] Obtaining a first indicator of deformation defects of the grayscale interval to be analyzed according to the interval between the grayscale interval to be analyzed and the standard grayscale interval, and the spatial distribution and length of the runs corresponding to the grayscale interval to be analyzed;

[0020] Obtaining a second indicator of deformation defects in the grayscale interval to be analyzed according to the overall distribution of gradient values ​​corresponding to pixel points in the grayscale interval to be analyzed, the overall distribution of lengths corresponding to runs, and the spatial distribution of runs;

[0021] The first deformation defect indicator and the second deformation defect indicator of all grayscale intervals to be analyzed are forwardly fused to obtain the deformation defect metric of the area to be analyzed.

[0022] Furthermore, the method for obtaining the first indicator of deformation defect includes:

[0023] Negative correlation mapping is performed on the total number of gray levels between the gray interval to be analyzed and the standard gray interval, which is used as the false detection weight of the gray interval to be analyzed;

[0024] In all runs corresponding to the grayscale interval to be analyzed, the spatial position coordinates corresponding to the midpoint of each run are used as the reference spatial position of the run; the variance of the reference spatial position of all runs is calculated and negative correlation mapping is performed to obtain the run spatial distribution concentration of the grayscale interval to be analyzed;

[0025] In all runs corresponding to the grayscale interval to be analyzed, the ratio of the number of runs corresponding to each run length to the total number of all runs is taken as the number proportion of each run length; the variance of the number proportions corresponding to all the run lengths is calculated to obtain the run length concentration of the grayscale interval to be analyzed;

[0026] The product of the false detection weight, the run space distribution concentration and the run length concentration of each grayscale interval to be analyzed is calculated to obtain the first deformation defect indicator of the grayscale interval to be analyzed.

[0027] Furthermore, the method for obtaining the second indicator of the deformation defect includes:

[0028] The stroke corresponding to the gray level of the bridge that is greater than the preset one is taken as the reflection stroke; the stroke corresponding to the gray level of the bridge that is not greater than the preset one is taken as the backlight stroke; the total number of adjacent reflection strokes and backlight strokes in the preset direction is counted to obtain the number of connected strokes;

[0029] Calculate the average of the gradient values ​​of all pixels in the grayscale interval to be analyzed to obtain the overall gradient of the grayscale interval to be analyzed;

[0030] Calculate the mean of the lengths of all runs in the grayscale interval to be analyzed to obtain the overall run length of the grayscale interval to be analyzed;

[0031] The product of the number of connections and the overall gradient is calculated, and the ratio of the product to the overall run length is calculated to obtain a second indicator of deformation defects in the grayscale interval to be analyzed.

[0032] Furthermore, the method for obtaining the deformation false detection probability includes:

[0033] The sum of the color deviation and the preset denominator adjustment value is calculated, and the ratio of the deformation defect metric to the sum is calculated to obtain the deformation misdetection probability of the area to be analyzed.

[0034] Furthermore, the method for obtaining the enhancement coefficient includes:

[0035] Calculate the absolute value of the difference between the gray level and the preset axle gray level to obtain a first parameter; calculate the sum of the first parameter and the preset denominator adjustment value to obtain a second parameter;

[0036] In the grayscale interval corresponding to the grayscale level, the maximum length corresponds to all the runs as the run to be analyzed; the total number of all the pixel points corresponding to the run to be analyzed is used as the third parameter;

[0037] In the run to be analyzed, the total number of pixels corresponding to the gray level is used as the fourth parameter; the ratio of the third parameter to the fourth parameter is calculated to obtain the fifth parameter;

[0038] The ratio of the fifth parameter to the second parameter is calculated and normalized to obtain a grayscale enhancement coefficient.

[0039] The present invention proposes a visual high-precision detection device for a transport semi-trailer axle, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of a visual high-precision detection method for a transport semi-trailer axle are implemented.

[0040] The present invention has the following beneficial effects:

[0041] Considering the grayscale characteristics of the surface defects, the grayscale image of the semi-trailer axle is divided into various areas to be analyzed; the areas to be analyzed preliminarily reflect the areas where surface defects may exist. The color deviation is used to evaluate the degree of deviation of the grayscale in the area to be analyzed compared with the color of the axle body. The deformation defect metric of the area to be analyzed is obtained through the distribution of the run in the area to be analyzed. The deformation defect metric can reflect the probability of defects in the defect area, and then reflect the probability of the existence of defect areas with weaker performance capabilities in the area to be analyzed through the probability of deformation false detection; according to the probability of deformation false detection, the target area is screened out from all the areas to be analyzed. The target area reflects the area with a higher probability of deformation false detection. In order to enhance the image of the deformation defect area with weaker performance capabilities, the enhancement coefficients of different grayscale levels are calculated to improve the image characteristics of the deformation area. The enhancement coefficient effectively enhances the performance effect of surface defects and improves the accuracy of semi-trailer axle defect detection by fully considering the performance of grayscale on the defect area. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are 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.

[0043] Figure 1 A flowchart of a method for high-precision visual inspection of a transport semitrailer axle provided by one embodiment of the present invention;

[0044] Figure 2 A schematic diagram of a semitrailer axle image acquisition process provided by an embodiment of the present invention;

[0045] Figure 3 A flow chart of a method for obtaining deformation defect metrics provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0046] 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 visual high-precision detection method and detection device for a transport semi-trailer axle proposed by the present invention, its specific implementation method, structure, features and effects, 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.

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

[0048] The specific scheme of the visual high-precision detection method and detection device for a transport semitrailer axle provided by the present invention is described in detail below with reference to the accompanying drawings.

[0049] The embodiment of the present invention provides a visual high-precision detection method and detection device for a transport semi-trailer axle, please refer to Figure 1 , which shows a flow chart of a visual high-precision detection method for a transport semitrailer axle provided by an embodiment of the present invention, the method comprising the following steps:

[0050] Step S1: Obtain a grayscale image of a semitrailer axle from a detection database.

[0051] In order to perform image enhancement later, it is first necessary to obtain the grayscale image of the semi-trailer axle.

[0052] Get the grayscale image of the semi-trailer axle from the detection database. The specific steps include: using a high-precision camera, installing the camera on a stable camera stand, sliding the camera along the camera sliding direction, collecting images of the semi-trailer axle at a preset frequency, and obtaining all local original images of the transport semi-trailer axle. Figure 2, which shows a schematic diagram of a semi-trailer axle image acquisition process provided by an embodiment of the present invention. All local original images of the transport semi-trailer axle are spliced ​​into one image using an image stitching method to obtain a panoramic surface image of the transport semi-trailer axle for subsequent processing. Since there is noise in the panoramic surface image, the panoramic surface image is subjected to denoising to obtain the original image of the semi-trailer axle. In order to reduce the cost of calculation and analysis and highlight the texture features of the axle surface, after obtaining the original image of the semi-trailer axle, the original image of the semi-trailer axle is grayed to obtain a grayscale image of the semi-trailer axle corresponding to the original image of the semi-trailer axle. The embodiment of the present invention uses a non-local mean filtering method to reduce the noise of the image, and the implementer can set it according to the actual situation. It should be noted that the image stitching method and the non-local mean filtering method are technical means well known to those skilled in the art and will not be described in detail here. In one embodiment of the present invention, the preset frequency is 5 seconds / time, and the implementer can set it according to the implementation scenario.

[0053] Considering that the semi-trailer axle is a complex structure, it is usually composed of multiple different components connected by welding and other methods. When collecting images of the welded parts of the axle, due to the differences in the materials, surface treatments and welding processes of these components, the image features of the components inside the image are relatively different. Reflecting a specific component or area of ​​the axle through the block area facilitates subsequent analysis, identification and processing. The detection database also includes the various block areas of the grayscale image of the semi-trailer axle. The specific acquisition process includes:

[0054] The detection database also includes the original image of the semi-trailer axle corresponding to the grayscale image of the semi-trailer axle; the original image of the semi-trailer axle is segmented by using the superpixel segmentation method to obtain each superpixel block of the original image of the semi-trailer axle; each superpixel block is used as each block area of ​​the original image of the semi-trailer axle; the block area in the original image of the semi-trailer axle is mapped to the grayscale image of the semi-trailer axle to obtain the block area of ​​the grayscale image of the semi-trailer axle. It should be noted that the superpixel segmentation method is a prior art well known to those skilled in the art and will not be described in detail here.

[0055] With respect to the above steps, the original image of the semi-trailer axle in the present invention is an RGB image that can provide rich color information. After being processed by the superpixel segmentation method, the original image of the semi-trailer axle is divided into multiple superpixel blocks. The superpixel blocks are relatively consistent in color, texture and other features, and are connected in space. The superpixel blocks reflect a specific component or area of ​​the axle. The obtained superpixel blocks are used as the respective block areas of the original image of the semi-trailer axle. In order to retain the component or area information in the original image on the grayscale image, the grayscale image is used for more efficient feature extraction and analysis. The block areas in the original image of the semi-trailer axle are mapped to the grayscale image of the semi-trailer axle to obtain the block areas of the grayscale image of the semi-trailer axle. The block areas reflect a specific component or area of ​​the axle, which facilitates subsequent analysis, identification and processing.

[0056] Step S2: according to the grayscale values ​​of the pixels in the grayscale image of the semi-trailer axle, the various areas to be analyzed are divided from the grayscale image of the semi-trailer axle; according to the difference between the grayscale of the pixels in the area to be analyzed and the preset axle grayscale, the color deviation of the area to be analyzed is obtained; according to the grayscale of the pixels in the area to be analyzed, all the runs in the area to be analyzed are constructed; according to the distribution of the runs in the area to be analyzed, the deformation defect measurement of the area to be analyzed is obtained; according to the color deviation and deformation defect measurement of the area to be analyzed, the deformation false detection probability of the area to be analyzed is obtained; according to the deformation false detection probability, the target area is screened out from all the areas to be analyzed; according to the grayscale of the pixels corresponding to the runs in the target area, the enhancement coefficient of each grayscale is obtained.

[0057] Considering the grayscale characteristics of surface defects, the grayscale image of the semi-trailer axle is divided into various areas to be analyzed; the areas to be analyzed preliminarily reflect the areas where surface defects may exist. The color deviation is used to evaluate the degree of deviation of the grayscale in the area to be analyzed compared with the color of the axle body. The deformation defect metric of the area to be analyzed is obtained by the distribution of the run in the area to be analyzed. The deformation defect metric can reflect the probability of defects in the defective area, and then reflect the probability of the existence of defective areas with weaker performance in the area to be analyzed through the probability of deformation false detection; according to the probability of deformation false detection, the target area is screened out from all the areas to be analyzed. The target area reflects the area with a higher probability of deformation false detection. In order to enhance the image of the deformation defect area with weaker performance, the enhancement coefficients of different gray levels are calculated to improve the image characteristics of the deformation area.

[0058] In order to preliminarily analyze the area where there may be surface defects, preferably, in one embodiment of the present invention, the method for obtaining the area to be analyzed includes:

[0059] Based on the Otsu threshold method, the semi-trailer bridge grayscale image is binarized according to the grayscale values ​​of the pixels in the semi-trailer bridge grayscale image to obtain the bridge binary image; the connected domain analysis algorithm is used to extract the foreground connected domains of the bridge binary image; the foreground connected domains whose total number of pixels is greater than the preset number threshold are marked as connected domains to be analyzed; the connected domains to be analyzed in the bridge binary image are mapped to the semi-trailer bridge grayscale image to obtain the connected domains to be analyzed in the semi-trailer bridge grayscale image;

[0060] The detection database also includes each block area of ​​the grayscale image of the semi-trailer bridge; for any connected domain to be analyzed, all block areas in the grayscale image of the semi-trailer bridge that overlap with the connected domain to be analyzed are used as the processed area of ​​the connected domain to be analyzed; the minimum circumscribed rectangle including the processed area in the grayscale image of the semi-trailer bridge is used as the analyzed area corresponding to the connected domain to be analyzed. In one embodiment of the present invention, the preset quantity threshold is 1, and the implementer can set it according to the implementation scenario. It should be noted that the Otsu threshold method and the connected domain analysis algorithm are prior arts well known to those skilled in the art and will not be elaborated here.

[0061] For the above steps, it is considered that the deformed part of the bridge surface has different reflective characteristics due to the structural difference from the normal bridge surface. For example, the concave or convex deformation defect area has reflective characteristics due to the structural difference from the normal bridge surface. During the imaging process, these deformation areas have a strong reflective ability for the illumination light, thus forming a highlight area in the image. In order to determine the area where there may be surface defects, the connected domain analysis algorithm is used to extract each foreground connected domain in the binary image of the bridge. A connected domain refers to an area composed of adjacent pixels with the same pixel value. In order to reduce noise interference, the number of connected domains is too small, and the foreground connected domains whose total number of pixels is greater than the preset number threshold are marked as connected domains to be analyzed. The connected domain to be analyzed reflects the high brightness area in the image. For any connected domain to be analyzed, all the block areas in the grayscale image of the semi-trailer axle that overlap with the connected domain to be analyzed are used as the area to be processed of the connected domain to be analyzed; the area to be processed contains a relatively complete deformation area. In order to further ensure the integrity of the defect area to be analyzed, the minimum circumscribed rectangle including the area to be processed in the grayscale image of the semi-trailer axle is used as the corresponding area to be analyzed of the connected domain to be analyzed. The area to be analyzed preliminarily reflects the area in the grayscale image of the semi-trailer axle where there may be surface defects.

[0062] In order to evaluate the degree of deviation of the grayscale in the area to be analyzed from the color of the axle body. Preferably, in one embodiment of the present invention, the method for obtaining the color deviation includes:

[0063] For any area to be analyzed, the average of the absolute values ​​of the difference between the grayscale of all pixels and the preset axle grayscale is calculated to obtain the color deviation of the area to be analyzed. The difference is reflected by the absolute value of the difference. In one embodiment of the present invention, the preset axle grayscale can be set according to an empirical value to reflect the grayscale of the axle body in a normal state. In other embodiments of the present invention, in the grayscale image of the semi-trailer axle, the area outside the area to be analyzed can be used as a background area; in the background area, the total number of pixels corresponding to each grayscale is counted, and the grayscale corresponding to the maximum total number is used as the preset axle grayscale. The background area reflects the normal part of the axle body, and the grayscale corresponding to the maximum total number represents the main grayscale of the axle body in a normal state. Therefore, the preset axle grayscale can reflect the grayscale of the axle body in a normal state.

[0064] For the above steps, for any area to be analyzed, it is necessary to calculate the absolute value of the difference between the grayscale of all pixels and the preset axle grayscale. This absolute value of the difference reflects the degree of difference between the grayscale value of each pixel and the main color of the axle. Calculate the average of the absolute values ​​of the difference between the grayscale of all pixels and the preset axle grayscale to obtain the color deviation of the area. This average reflects the degree of deviation between the overall area to be analyzed and the main color of the axle. The greater the color deviation, the greater the difference between the color of the area to be analyzed and the main color of the axle.

[0065] In order to more easily extract features related to surface defects, preferably, in one embodiment of the present invention, a method for obtaining a grayscale run matrix includes:

[0066] The preset direction is used as the stroke direction, and the gray level is evenly divided into various gray intervals according to the preset division number; starting from the upper left corner of the area to be analyzed, the pixel points of the area to be analyzed are scanned row by row according to the preset direction; the first scanned pixel point is used as the initial stroke;

[0067] Adjustment operation of the stroke: for the newly scanned pixel point, if the pixel point and the stroke are in the same grayscale interval, add the pixel point to the stroke and obtain the updated stroke; if the pixel point and the stroke are not in the same grayscale interval, end the stroke and take the newly scanned pixel point as the next stroke to start recording the next stroke; repeat the adjustment operation of the stroke until the area to be analyzed is scanned and all the strokes corresponding to the area to be analyzed are output.

[0068] According to all runs corresponding to the area to be analyzed, a grayscale run matrix of the area to be analyzed is constructed; the rows of the grayscale run matrix represent the grayscale intervals of the runs; the columns of the grayscale run matrix represent the lengths of the runs; the elements of the grayscale run matrix are the number of runs under specific grayscale intervals and run lengths.

[0069] It should be noted that, based on the image coordinate system, the preset direction is set to be the positive direction along the X-axis. For the grayscale image of the semi-trailer axle targeted by the present invention, the X-axis is parallel to the inner half axis of the axle. The preset number of divisions is set to 16 in the present invention, and the implementer can set it according to the implementation scenario.

[0070] With respect to the above steps, compared with the existing method of constructing a grayscale run matrix, the improvement of the present invention is that the grayscale interval is used instead of the direct grayscale level to construct the run, and the grayscale run matrix is ​​constructed accordingly. Considering that the surface defects usually appear as a sudden change or abnormal distribution of grayscale values ​​on the grayscale image of the semi-trailer axle. After dividing the grayscale intervals, these abnormal features may be more likely to form obvious aggregation phenomena in one or several intervals, making them easier to detect and identify. The grayscale run matrix constructed based on the grayscale interval is more likely to extract features related to surface defects.

[0071] To analyze the probability of deformation defects in the area to be analyzed, refer to Figure 3 , which shows a flow chart of a method for obtaining a deformation defect metric in one embodiment of the present invention. Preferably, in one embodiment of the present invention, the method for obtaining a deformation defect metric includes:

[0072] Step S201: taking any grayscale interval as the grayscale interval to be analyzed; taking the grayscale interval where the grayscale level of the preset axle is located as the standard grayscale interval.

[0073] The grayscale interval of the preset axle grayscale level is selected as the standard for comparison and reference, and any grayscale interval is used as the grayscale interval to be analyzed for subsequent analysis.

[0074] Step S202: Obtain a first indicator of deformation defects of the grayscale interval to be analyzed according to the interval between the grayscale interval to be analyzed and the standard grayscale interval, and the spatial distribution and length of the runs corresponding to the grayscale interval to be analyzed.

[0075] The main purpose of the present invention is to enhance the performance of the surface deformation area. First, it is necessary to screen out the deformation defect area with weaker defect performance ability. Considering that the grayscale interval to be analyzed may have a weld area in addition to the surface deformation area. By analyzing the difference between the surface deformation area and the weld area, a first deformation defect index is constructed to reflect the possibility that the grayscale interval to be analyzed is a surface deformation area. The larger the first deformation defect index is, the greater the possibility that the grayscale interval to be analyzed is a surface deformation area, and the smaller the possibility that the grayscale interval to be analyzed is a weld area.

[0076] Preferably, in one embodiment of the present invention, the method for obtaining the first indicator of deformation defect includes:

[0077] Negative correlation mapping is performed on the total number of gray levels between the gray interval to be analyzed and the standard gray interval, which is used as the false detection weight of the gray interval to be analyzed;

[0078] In all runs corresponding to the grayscale interval to be analyzed, the spatial position coordinates corresponding to the midpoint of each run are used as the reference spatial position of the run; the variance of the reference spatial positions of all runs is calculated and negative correlation mapping is performed to obtain the spatial distribution concentration of the runs of the grayscale interval to be analyzed;

[0079] In all runs corresponding to the grayscale interval to be analyzed, the ratio of the number of runs corresponding to each run length to the total number of all runs is taken as the number proportion of each run length; the variance of the number proportion corresponding to all run lengths is calculated to obtain the run length concentration of the grayscale interval to be analyzed;

[0080] The product of the false detection weight, the run space distribution concentration, and the run length concentration of each grayscale interval to be analyzed is calculated to obtain the first indicator of deformation defects in the grayscale interval to be analyzed. It should be noted that negative correlation mapping and normalization processing are both technical means well known to those skilled in the art. Negative correlation mapping can be in the form of inverse proportion or negative exponential power, and normalization processing can be linear normalization, etc., which are not limited here.

[0081] For the above steps, the false detection weight is used to evaluate the closeness between the grayscale interval to be analyzed and the standard grayscale interval to determine the possibility of false detection in the grayscale interval to be analyzed, which represents the degree of attention to the grayscale interval. Considering that the midpoint position can also provide a relatively stable reference point, the midpoint of each run corresponds to the spatial position coordinate as the reference spatial position of the run; the variance of the midpoint position of each run is calculated and negatively correlated, and we can get the concentration of the spatial distribution of the run in the interval. This indicator is very useful for distinguishing surface deformation areas from weld areas. Because the deformation area usually shows continuous grayscale changes, the distribution of its runs in space is relatively concentrated; while the weld area has a relatively discrete distribution of runs in space due to the banded arrangement of welding textures. The greater the concentration of the spatial distribution of runs, the more concentrated the spatial distribution of runs in the grayscale interval to be analyzed, and the greater the possibility that the grayscale interval to be analyzed is a surface deformation area.

[0082] Considering that for the weld area, since its texture is usually irregular lines in the welding area, when scanning its stroke in the scanning direction, it is easy to have a large difference in stroke length in the same grayscale interval, that is, the stroke length distribution is relatively discrete. For the deformation area, since it usually does not have many obvious lines, its stroke mainly reflects the image grayscale difference caused by the reflection difference in the deformation area, and the stroke length of the deformation area is usually distributed relatively concentrated. Among all the strokes corresponding to the grayscale interval to be analyzed, the ratio of the number of strokes corresponding to each stroke length to the total number of all strokes is taken as the number proportion of the stroke length; the number proportion reflects the number proportion of the stroke of a specific stroke length relative to all strokes in the grayscale interval to be analyzed. The variance of the corresponding number proportion of all stroke lengths is calculated to obtain the stroke length concentration of the grayscale interval to be analyzed; the stroke length concentration can effectively distinguish the weld area from the deformation area. The larger the stroke length concentration, the more concentrated the stroke length, and the greater the possibility that the grayscale interval to be analyzed is a surface deformation area. The product of the false detection weight, the run space distribution concentration and the run length concentration of each grayscale interval to be analyzed is combined to obtain the first deformation defect index of the grayscale interval to be analyzed. The larger the first deformation defect index, the greater the possibility that the grayscale interval to be analyzed is a surface deformation area.

[0083] Step S203: Obtain a second deformation defect indicator of the grayscale interval to be analyzed according to the overall distribution of gradient values ​​corresponding to pixels in the grayscale interval to be analyzed, the overall distribution of lengths corresponding to runs, and the spatial distribution of runs.

[0084] Taking into account that in addition to the surface deformation area, there may also be normal surface areas in the grayscale interval to be analyzed, by analyzing the difference between the surface deformation area and the normal surface area, a second deformation defect index is constructed to reflect the possibility that the grayscale interval to be analyzed is a surface deformation area. The larger the second deformation defect index is, the greater the possibility that the grayscale interval to be analyzed is a surface deformation area.

[0085] Preferably, in one embodiment of the present invention, the method for obtaining the second indicator of deformation defect includes:

[0086] The stroke corresponding to the gray level of the bridge that is greater than the preset one is taken as the reflection stroke; the stroke corresponding to the gray level of the bridge that is not greater than the preset one is taken as the backlight stroke; the total number of adjacent reflection strokes and backlight strokes in the preset direction is counted to obtain the number of connected strokes;

[0087] Calculate the mean of the gradient values ​​of all pixels in the grayscale interval to be analyzed to obtain the overall gradient of the grayscale interval to be analyzed;

[0088] Calculate the mean of the lengths of all runs in the grayscale interval to be analyzed, and obtain the overall run length of the grayscale interval to be analyzed;

[0089] The product of the number of connections and the overall gradient is calculated, and the ratio of the product to the overall run length is calculated to obtain the second indicator of the deformation defect in the grayscale interval to be analyzed.

[0090] For the above steps, the runs can be divided into reflective runs and backlight runs according to the size of the grayscale. Usually, the grayscale of the reflective area is larger, while the grayscale of the backlight area is smaller. The preset bridge grayscale is used as a dividing line, and the runs greater than the grayscale are classified as reflective runs, and the runs not greater than the grayscale are classified as backlight runs. For the reflective and backlight areas of the bridge surface, the connection characteristics of their runs in the grayscale run matrix are different. The normal surface area is relatively smooth and regular in the reflective and backlight areas, and the runs are usually long and not connected. However, in the deformation area, due to the changes in surface texture and shape, the runs of the reflective and backlight areas may be connected in a specific way, such as symmetrically connected at the most convex point or the most concave point. In order to quantify this connection characteristic, the total number of adjacent reflective runs and backlight runs in the preset direction can be counted, that is, the number of connections. The larger the number of connections, the greater the possibility that the grayscale interval to be analyzed is a surface deformation area. Considering that the overall gradient value of the pixels in the normal surface area is small, and the overall gradient value of the pixels in the deformation area is large, the overall gradient reflects the overall gradient value of the grayscale interval to be analyzed. The larger the value, the greater the possibility that the grayscale interval to be analyzed is a surface deformation area. At the same time, considering that the run length of the normal surface area is usually longer than that of the deformation area, the larger the overall run length of the grayscale interval to be analyzed, the smaller the possibility that the grayscale interval to be analyzed is a surface deformation area. Calculate the product of the number of connections and the overall gradient, and calculate the ratio of the product and the overall run length to obtain the second deformation defect index of the grayscale interval to be analyzed. The larger the second deformation defect index, the greater the possibility that the grayscale interval to be analyzed is a surface deformation area.

[0091] Step S204: forwardly fuse the first deformation defect index and the second deformation defect index of all grayscale intervals to be analyzed to obtain the deformation defect metric of the area to be analyzed.

[0092] The deformation defect metric comprehensively reflects the possibility that the area to be analyzed is a surface deformation area.

[0093] It should be noted that forward fusion is an existing technology well known to those skilled in the art, and forward fusion can adopt simple product, arithmetic mean or other suitable fusion methods. In one embodiment of the present invention, in the area to be analyzed, the mean of the first deformation defect index and the second deformation defect index of all grayscale intervals to be analyzed is calculated to obtain the deformation defect metric of the area to be analyzed.

[0094] In order to analyze the probability that the area to be analyzed is a defect area with weaker performance, preferably, in one embodiment of the present invention, the method for obtaining the probability of false detection of deformation includes:

[0095] The sum of the color deviation and the preset denominator adjustment value is calculated, and the ratio of the deformation defect measurement to the sum is calculated to obtain the deformation misdetection probability of the area to be analyzed.

[0096] For the above steps, the greater the color deviation, the higher the degree of deviation of the grayscale in the area to be analyzed compared to the color of the axle body, and the less likely it is to be misdetected. The greater the deformation defect measure, the greater the possibility that the area to be analyzed is a surface deformation area. The probability of deformation misdetection represents the possibility of deformation defects in the area when the color deviation is small. The greater the possibility, the weaker the ability to express deformation defects in the area to be analyzed, and the more likely it is to be misdetected.

[0097] In order to determine the area with a higher probability of false deformation detection, preferably, in one embodiment of the present invention, the method for acquiring the target area includes: taking the area to be analyzed corresponding to the maximum probability of false deformation detection as the target area.

[0098] In order to effectively enhance the performance of surface defects, it is necessary to reasonably set the grayscale enhancement coefficient. Preferably, in one embodiment of the present invention, the method for obtaining the enhancement coefficient includes:

[0099] Calculate the absolute value of the difference between the grayscale and the preset axle grayscale to obtain the first parameter; calculate the sum of the first parameter and the preset denominator adjustment value to obtain the second parameter; in the grayscale interval corresponding to the grayscale, the maximum length corresponds to all runs as the run to be analyzed; the total number of all pixels corresponding to the run to be analyzed is used as the third parameter; in the run to be analyzed, the total number of pixels corresponding to the grayscale is used as the fourth parameter; calculate the ratio of the third parameter to the fourth parameter to obtain the fifth parameter; calculate the ratio of the fifth parameter to the second parameter and perform normalization processing to obtain the grayscale enhancement coefficient. It should be noted that the normalization method used is: normalize using the norm normalization function to limit the value range to between 0 and 1. Normalization is a technical means well known to those skilled in the art, and the selection of the normalization function can be linear normalization or standard normalization, etc. The specific normalization method is not limited here.

[0100] In one embodiment of the present invention, the formula for obtaining the enhancement coefficient includes:

[0101] ;in, is the enhancement coefficient of the nth gray level; To preset the denominator adjustment value; is the absolute value of the difference between the nth gray level and the preset axle gray level; is the ratio of the total number of pixels corresponding to the nth gray level in all runs corresponding to the maximum length in the gray level interval corresponding to the nth gray level; In one embodiment of the present invention, the preset denominator adjustment value is set to 0.01, and the implementer can set it according to the implementation scenario.

[0102] For the above steps, considering that the target area reflects the area where defects are most difficult to distinguish, the maximum length corresponds to all runs and reflects the part of the image that is difficult to distinguish by grayscale intervals. Reflects the proportion of the nth gray level in the difficult-to-distinguish part. The larger the value, the weaker the gray level's ability to express the defect area, which means that the gray level needs more attention and the enhancement coefficient should be set larger. It reflects the difference between the nth grayscale level and the body color. The smaller the value, the more likely the grayscale level will be misdetected, and the weaker the grayscale's ability to represent defective areas is. This means that the grayscale level needs more attention, and the enhancement coefficient should be set larger.

[0103] Step S3: According to the enhancement coefficients of each gray level, the grayscale image of the semitrailer axle is enhanced to obtain an enhanced image of the semitrailer axle; and defect detection is performed on the enhanced image of the semitrailer axle.

[0104] The enhancement coefficient fully considers the grayscale's ability to express defective areas, and enhances the grayscale image of the semi-trailer axle according to the enhancement coefficient of each grayscale level, effectively enhancing the expression of surface defects and improving the accuracy of semi-trailer axle defect detection.

[0105] Preferably, in the process of histogram equalization, the grayscale values ​​of the image are redistributed so that the grayscale value distribution of the image is more uniform, thereby enhancing the contrast and visual effect of the image. In order to enhance the prominence of grayscale levels with weaker defect expression capabilities, the grayscale value mapping is adjusted by adjusting the enhancement coefficient. When obtaining the updated mapped grayscale of each grayscale level, the grayscale level with weaker defect expression capabilities has a greater probability of being assigned to the new grayscale level after mapping, thereby effectively enhancing the prominence of the defect. In one embodiment of the present invention, a method for acquiring an enhanced image of a semitrailer axle includes:

[0106] Based on the histogram equalization method, the initial mapped grayscale of the grayscale is obtained; it should be noted that the method of obtaining the initial mapped grayscale of the grayscale by the histogram equalization method is a prior art well known to those skilled in the art, wherein the formula for determining the initial mapped grayscale of the grayscale by the prior histogram equalization method is:

[0107] ;in, For the The initial mapped gray level of gray levels; is the rounding function; is the total number of gray levels; No. The number of pixels in each gray level, a=0,1,2...L-1; is the total number of all pixels in the grayscale image of the semitrailer axle.

[0108] Forward fusion of the enhancement coefficient corresponding to the gray level and the initial mapped gray level of the gray level to obtain the updated mapped gray level of each gray level;

[0109] In order to enhance the prominence of the defect grayscale, the enhancement coefficient corresponding to the grayscale and the initial mapped grayscale of the grayscale are forward fused to obtain an updated mapped grayscale. In one embodiment of the present invention, the formula for obtaining the updated mapped grayscale includes:

[0110] ;in, For the An updated mapped gray level of gray levels; is the rounding function; is the total number of gray levels; For the The number of pixels in gray level; is the total number of all pixels in the grayscale image of the semitrailer axle; For the The enhancement factor of each gray level; For the The initial mapped gray level of gray levels.

[0111] In the updated mapped grayscale formula, the updated mapped grayscale fully considers the required degree of grayscale enhancement. The larger the enhancement coefficient, the weaker the grayscale's ability to express the defect area, which means that the grayscale needs more attention, making the updated mapped grayscale larger, thereby enhancing the expression effect of surface defects and reducing the false detection or missed detection rate.

[0112] According to the updated mapped grayscale of each grayscale, the enhanced image of the semi-trailer axle is obtained. It should be noted that the histogram equalization method is a prior art well known to those skilled in the art, and only a brief description is given here of the brief process of obtaining the enhanced image of the semi-trailer axle according to the updated mapped grayscale of each grayscale:

[0113] According to the updated mapped gray levels of each gray level and in combination with CLAHE limited contrast, the updated mapped gray levels of each gray level are applied to the gray image of the semi-trailer bridge to obtain the semi-trailer bridge enhanced image.

[0114] The enhanced image of the semi-trailer axle is input into the trained neural network model for defect detection to obtain the defect detection result. The neural network model can select a convolutional neural network model for performing classification tasks. The specific neural network model training process is a technical means well known to those skilled in the art, and is only briefly described here:

[0115] A convolutional neural network is trained using a historical data set, which includes multiple enhanced images of semi-trailer axles. Since some of the enhanced images of semi-trailer axles include defect information, the defective parts in the enhanced images of semi-trailer axles are marked, and then the labeled data set is divided into a training set and a validation set according to a preset ratio. The historical data set is input into the convolutional neural network for training, and the loss function is cross entropy. The gradient descent method is used until the loss function converges to obtain a trained neural network model; each enhanced image of the semi-trailer axle is input into the trained neural network model, and the model automatically marks the enhanced image of the semi-trailer axle, and outputs the marked enhanced image of the semi-trailer axle, that is, the defect detection result. In the embodiment of the present invention, the preset ratio is 6:4, and the implementer can set it according to the implementation scenario.

[0116] A visual high-precision detection device for a transport semitrailer axle comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned visual high-precision detection method for a transport semitrailer axle are implemented.

[0117] In summary, the embodiment of the present invention provides a visual high-precision detection method and detection device for the axle of a transport semitrailer. First. In the embodiment of the present invention, the color deviation of the area to be analyzed is obtained according to the difference between the grayscale of the pixel points in the area to be analyzed and the preset grayscale of the axle; the deformation defect measurement of the area to be analyzed is obtained according to the distribution of the strokes in the area to be analyzed; the deformation misdetection probability of the area to be analyzed is obtained according to the color deviation and deformation defect measurement of the area to be analyzed; the enhancement coefficient of each grayscale is obtained according to the grayscale of the pixel points corresponding to the stroke in the target area; the grayscale image of the semitrailer axle is enhanced to obtain the enhanced image of the semitrailer axle; and the enhanced image of the semitrailer axle is subjected to defect detection. The present invention effectively enhances the expression effect of surface defects and improves the accuracy of semitrailer axle defect detection by fully considering the expression ability of grayscale for defective areas.

[0118] It should be noted that the sequence of the above embodiments of the present invention is for description only and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0119] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

Claims

1. A visual high-precision detection method for a transport semitrailer axle, characterized in that: The method comprises: Obtain a grayscale image of a semitrailer axle from a detection database; According to the grayscale values ​​of the pixels in the grayscale image of the semi-trailer axle, the various areas to be analyzed are divided from the grayscale image of the semi-trailer axle; according to the difference between the grayscale of the pixels in the area to be analyzed and the preset axle grayscale, the color deviation of the area to be analyzed is obtained; according to the grayscale of the pixels in the area to be analyzed, all the runs in the area to be analyzed are constructed; according to the distribution of the runs in the area to be analyzed, the deformation defect measurement of the area to be analyzed is obtained; according to the color deviation and the deformation defect measurement of the area to be analyzed, the deformation false detection probability of the area to be analyzed is obtained; according to the deformation false detection probability, the target area is screened out from all the areas to be analyzed; according to the grayscale of the pixels corresponding to the runs in the target area, the enhancement coefficient of each grayscale is obtained; According to the enhancement coefficients of each gray level, the grayscale image of the semitrailer axle is enhanced to obtain an enhanced image of the semitrailer axle; and defect detection is performed on the enhanced image of the semitrailer axle; The method for obtaining the deformation false detection probability includes: Calculate the sum of the color deviation and the preset denominator adjustment value, calculate the ratio of the deformation defect metric to the sum, and obtain the deformation misdetection probability of the area to be analyzed; The method for acquiring the target area includes: corresponding the area to be analyzed with the maximum deformation false detection probability as the target area.

2. According to claim 1, a visual high-precision detection method for a transport semitrailer axle is characterized in that: The method for obtaining the area to be analyzed includes: Based on the Otsu threshold method, the semi-trailer axle grayscale image is binarized according to the grayscale values ​​of the pixels in the semi-trailer axle grayscale image to obtain the axle binary image; the foreground connected domains of the axle binary image are extracted using a connected domain analysis algorithm; the foreground connected domains whose total number of pixels is greater than a preset number threshold are marked as connected domains to be analyzed; the connected domains to be analyzed in the axle binary image are mapped to the semi-trailer axle grayscale image to obtain the connected domains to be analyzed in the semi-trailer axle grayscale image; The detection database also includes each block area of ​​the grayscale image of the semi-trailer axle; for any one of the connected domains to be analyzed, all block areas in the grayscale image of the semi-trailer axle that overlap with the connected domain to be analyzed are used as the to-be-processed areas of the connected domain to be analyzed; the minimum circumscribed rectangle of the to-be-processed area including the connected domain to be analyzed in the grayscale image of the semi-trailer axle is used as the to-be-analyzed area corresponding to the connected domain to be analyzed.

3. According to claim 1, a visual high-precision detection method for a transport semitrailer axle is characterized in that: The method for obtaining the color deviation comprises: For any of the areas to be analyzed, the average of the absolute values ​​of the differences between the gray levels of all pixels and the preset axle gray level is calculated to obtain the color deviation of the area to be analyzed.

4. According to claim 1, a visual high-precision detection method for a transport semitrailer axle is characterized in that: The method for obtaining the travel distance includes: Using a preset direction as the stroke direction, evenly dividing the grayscale level into various grayscale intervals according to a preset number of divisions; starting from the upper left corner of the area to be analyzed, scanning the pixel points of the area to be analyzed row by row according to the preset direction; using the first scanned pixel point as the initial stroke; Adjustment operation of the stroke: for the newly scanned pixel point, if the pixel point and the stroke are in the same grayscale interval, the pixel point is added to the stroke to obtain the updated stroke; if the pixel point and the stroke are not in the same grayscale interval, the stroke is ended, and the newly scanned pixel point is used as the next stroke to start recording the next stroke; repeat the adjustment operation of the stroke until the area to be analyzed is scanned, and all the strokes corresponding to the area to be analyzed are output.

5. The method for high-precision visual inspection of a transport semitrailer axle according to claim 4 is characterized in that: The method for obtaining the deformation defect metric includes: Any grayscale interval is used as the grayscale interval to be analyzed; the grayscale interval where the preset axle grayscale level is located is used as the standard grayscale interval; Obtaining a first indicator of deformation defects of the grayscale interval to be analyzed according to the interval between the grayscale interval to be analyzed and the standard grayscale interval, and the spatial distribution and length of the runs corresponding to the grayscale interval to be analyzed; Obtaining a second indicator of deformation defects in the grayscale interval to be analyzed according to the overall distribution of gradient values ​​corresponding to pixel points in the grayscale interval to be analyzed, the overall distribution of lengths corresponding to runs, and the spatial distribution of runs; The first deformation defect indicator and the second deformation defect indicator of all grayscale intervals to be analyzed are forwardly fused to obtain the deformation defect metric of the area to be analyzed.

6. The method for high-precision visual inspection of a transport trailer axle according to claim 5, characterized in that: The method for obtaining the first indicator of the deformation defect includes: Negative correlation mapping is performed on the total number of gray levels between the gray interval to be analyzed and the standard gray interval, which is used as the false detection weight of the gray interval to be analyzed; In all runs corresponding to the grayscale interval to be analyzed, the spatial position coordinates corresponding to the midpoint of each run are used as the reference spatial position of the run; the variance of the reference spatial position of all runs is calculated and negative correlation mapping is performed to obtain the run spatial distribution concentration of the grayscale interval to be analyzed; In all runs corresponding to the grayscale interval to be analyzed, the ratio of the number of runs corresponding to each run length to the total number of all runs is taken as the number proportion of each run length; the variance of the number proportions corresponding to all the run lengths is calculated to obtain the run length concentration of the grayscale interval to be analyzed; The product of the false detection weight, the run space distribution concentration and the run length concentration of each grayscale interval to be analyzed is calculated to obtain the first deformation defect indicator of the grayscale interval to be analyzed.

7. The method for high-precision visual inspection of a transport semitrailer axle according to claim 5, characterized in that: The method for obtaining the second indicator of the deformation defect includes: The stroke corresponding to the gray level of the bridge that is greater than the preset one is taken as the reflection stroke; the stroke corresponding to the gray level of the bridge that is not greater than the preset one is taken as the backlight stroke; the total number of adjacent reflection strokes and backlight strokes in the preset direction is counted to obtain the number of connected strokes; Calculate the average of the gradient values ​​of all pixels in the grayscale interval to be analyzed to obtain the overall gradient of the grayscale interval to be analyzed; Calculate the mean of the lengths of all runs in the grayscale interval to be analyzed to obtain the overall run length of the grayscale interval to be analyzed; The product of the number of connections and the overall gradient is calculated, and the ratio of the product to the overall run length is calculated to obtain a second indicator of deformation defects in the grayscale interval to be analyzed.

8. The method for high-precision visual inspection of a transport trailer axle according to claim 1, characterized in that: The method for obtaining the enhancement coefficient includes: Calculate the absolute value of the difference between the gray level and the preset axle gray level to obtain a first parameter; calculate the sum of the first parameter and the preset denominator adjustment value to obtain a second parameter; In the grayscale interval corresponding to the grayscale level, the maximum length corresponds to all the runs as the run to be analyzed; the total number of all the pixel points corresponding to the run to be analyzed is used as the third parameter; In the run to be analyzed, the total number of pixels corresponding to the gray level is used as the fourth parameter; the ratio of the third parameter to the fourth parameter is calculated to obtain the fifth parameter; The ratio of the fifth parameter to the second parameter is calculated and normalized to obtain a grayscale enhancement coefficient.

9. A visual high-precision detection device for a transport semitrailer axle, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the high-precision visual detection method for a transport semi-trailer axle as described in any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Axle defect detection method based on image processing

    CN114998356A

  • Automatic detection method and system for appearance of pliers

    CN117115174A