Image enhancement methods and apparatus, vehicle undercarriage detection systems, and storage media
By converting images from RGB to HSV space, performing luminance channel clustering and illumination component estimation, and combining dynamic weighted maxRGB and gamma correction, the problem of uneven brightness in vehicle under-body images is solved, improving the accuracy and efficiency of vehicle inspection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NUCTECH CO LTD
- Filing Date
- 2026-05-06
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies struggle to effectively address the issue of underexposure or overexposure in vehicle underside images due to large field of view and uneven lighting, which affects the accuracy of vehicle inspections.
By converting the image from the RGB color space to the HSV color space, clustering and illumination component estimation are performed on the luminance channel image. Correction is then performed using the luminance gradient and illumination components. The dynamic weighted maxRGB method and gamma correction algorithm are combined to optimize the correction processing of the luminance channel image.
It improves the accuracy of vehicle inspection, ensures uniform image brightness and detail preservation, and enhances the efficiency and precision of under-vehicle inspection.
Smart Images

Figure CN122492529A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of image processing technology, and in particular to an image enhancement method and apparatus, a vehicle undercarriage detection system, and a storage medium. Background Technology
[0002] Under-vehicle inspection is a fundamental safety check for all types of motor vehicles, including passenger cars, freight trucks, and container trucks, and is a crucial step in security checks and vehicle safety verification. Due to the complex structure and densely packed components of the vehicle chassis, contraband can easily be hidden in concealed locations under the vehicle, making it difficult for conventional manual inspections to quickly detect potential hazards. However, specialized under-vehicle scanning imaging equipment can efficiently collect comprehensive information from the vehicle's underside, quickly generating a complete and clear panoramic image. Based on this imaging result, a detailed inspection can be conducted to accurately determine whether contraband or illegally concealed items are present under the vehicle, significantly improving the efficiency and accuracy of safety inspections. Summary of the Invention
[0003] The inventors noted that during the imaging process of the vehicle's underside, the scanning unit is mounted on the ground, and a fisheye lens with a 180-degree field of view is typically used to capture a relatively complete image of the vehicle's underside. Because different vehicle models have different chassis heights, the overall brightness may be too low or some areas of the image may be overexposed after illumination with supplementary lighting. Furthermore, due to lighting conditions, images of the gaps between the vehicle body and the ground may be overexposed, making it difficult to observe a complete image.
[0004] Accordingly, this disclosure provides an image enhancement method that can effectively enhance images with large field of view and non-uniform illumination, thereby improving the accuracy of vehicle inspection.
[0005] In a first aspect of this disclosure, an image enhancement method is provided, comprising: acquiring a first target image; converting the first target image from an RGB color space to a hue, saturation, and brightness HSV color space to obtain a first image to be processed; clustering pixels in the brightness channel image of the first image to be processed according to their brightness values to obtain multiple pixel clusters; determining the illumination component of the brightness channel image based on the pixel brightness component of each pixel cluster in the multiple pixel clusters; correcting the brightness channel image based on the illumination component and the brightness image gradient of the brightness channel image to obtain a corrected brightness channel image; fusing the hue channel image and saturation channel image of the first image to be processed, and the corrected brightness channel image to obtain a second image to be processed; and converting the second image to be processed from the HSV color space to the RGB color space to obtain a second target image.
[0006] In some embodiments, correcting the luminance channel image based on the illumination component and the luminance image gradient of the luminance channel image includes: determining the luminance image gradient of the luminance channel image; determining a luminance adjustment index based on the luminance image gradient and the illumination component; and correcting the luminance channel image based on the luminance adjustment index to obtain the corrected luminance channel image.
[0007] In some embodiments, determining the brightness adjustment index based on the brightness image gradient and the illumination component includes: obtaining illumination component features based on the average brightness of the illumination component and the illumination component; obtaining gradient distribution information based on the brightness image gradient, a first parameter value, and a second parameter value; and determining the brightness adjustment index based on the illumination component features and the gradient distribution information.
[0008] In some embodiments, obtaining the illumination component characteristics based on the average brightness of the illumination component and the illumination component includes: calculating the average brightness of the illumination component; calculating the difference between the average brightness and the illumination component to obtain a first intermediate value; and calculating the ratio of the first intermediate value to the average brightness to obtain the illumination component characteristics.
[0009] In some embodiments, obtaining gradient distribution information based on the brightness image gradient, the first parameter value, and the second parameter value includes: calculating the ratio of the brightness image gradient to the first parameter value to obtain a second intermediate value; and calculating the sum of the second parameter value and the second intermediate value to obtain the gradient distribution information.
[0010] In some embodiments, determining the brightness adjustment index based on the illumination component characteristics and gradient distribution information includes: calculating the product of the illumination component characteristics and the gradient distribution information to obtain a correction index; and calculating a power operation with the third parameter value as the base and the correction index as the exponent to obtain the brightness adjustment index.
[0011] In some embodiments, correcting the luminance channel image according to the luminance adjustment index includes: calculating the ratio of the luminance value of each pixel in the luminance channel image to the fourth parameter value to obtain a first intermediate image; calculating a power operation with the intermediate image as the base and the luminance adjustment index as the exponent to obtain a second intermediate image; and calculating the product of the fourth parameter value and the second intermediate image to obtain the corrected luminance channel image.
[0012] In some embodiments, determining the luminance image gradient of the luminance channel image includes: determining a first gradient of a pixel in the luminance channel image in the x-direction and a second gradient in the y-direction; and determining the luminance image gradient based on the first gradient and the second gradient.
[0013] In some embodiments, determining the illumination component of the luminance channel image based on the pixel luminance component of each of the plurality of pixel clusters includes: determining the pixel luminance component of each pixel cluster; and fusing the pixel luminance components of the plurality of pixel clusters to obtain the luminance component of the luminance channel image.
[0014] In some embodiments, determining the pixel luminance component of each pixel cluster in the plurality of pixel clusters includes: determining the region of all pixels in the i-th pixel cluster in the first target image to obtain the i-th region, wherein... K is the total number of pixel clusters; calculate the maximum value of the red channel pixels, the maximum value of the green channel pixels, and the maximum value of the blue channel pixels in the i-th region respectively; calculate the weighted sum of the maximum values of the red channel pixels, the maximum values of the green channel pixels, and the maximum values of the blue channel pixels to obtain the pixel luminance component of the i-th pixel cluster.
[0015] In some embodiments, the weight of the maximum value of the red channel pixel is the ratio of the sum of the red channel pixel values in the i-th region to the sum of the pixel values of the red, green, and blue channels in the i-th region; the weight of the maximum value of the green channel pixel is the ratio of the sum of the red and green channel pixel values in the i-th region to the sum of the pixel values of the red, green, and blue channels in the i-th region; and the weight of the maximum value of the blue channel pixel is the ratio of the sum of the blue and green channel pixel values in the i-th region to the sum of the pixel values of the red, green, and blue channels in the i-th region.
[0016] In some embodiments, clustering the pixels in the luminance channel image of the first image to be processed according to luminance values includes: clustering all pixels in the luminance channel image according to luminance values to obtain multiple clusters; determining the intra-cluster distance in each of the multiple clusters; determining the clustering distance deviation for the current iteration based on the intra-cluster distances of the multiple clusters; repeatedly performing the clustering of pixels in the luminance channel image according to luminance values until the difference in the clustering distance deviation between two adjacent iterations is within a predetermined range; and using the multiple clusters generated in the last iteration as the multiple pixel clusters.
[0017] In some embodiments, determining the intra-cluster distance in each of the plurality of clusters includes: obtaining the intra-cluster distance of the i-th cluster based on the distance between each pixel in the i-th cluster and the cluster center point of the i-th cluster, wherein... K represents the total number of pixel clusters.
[0018] In some embodiments, determining the clustering distance deviation for the current iteration based on the intra-cluster distances of the plurality of clusters includes: calculating the sum of the intra-cluster distances of the plurality of clusters to obtain the clustering distance deviation for the current iteration.
[0019] In some embodiments, the number of the plurality of pixel clusters includes 11.
[0020] In some embodiments, acquiring the first target image includes: acquiring an original image; removing the incident light component from the original image to obtain the first target image.
[0021] In a second aspect of this disclosure, an image enhancement apparatus is provided, comprising: a memory; and a processor coupled to the memory, the processor being configured to execute instructions stored in the memory to implement the image enhancement method as described in any of the above embodiments.
[0022] In a third aspect of this disclosure, a vehicle undercarriage detection system is provided, comprising: an image enhancement device as described in any of the above embodiments; an image acquisition device configured to acquire a vehicle undercarriage image and send the vehicle undercarriage image to the image enhancement device; and a vehicle undercarriage detection device configured to perform vehicle undercarriage detection on the image provided by the image enhancement device.
[0023] In a fourth aspect of this disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions that, when executed by a processor, implement the image enhancement method as described in any of the above embodiments.
[0024] In a fifth aspect of this disclosure, a computer program product is provided, including computer instructions, wherein the computer instructions, when executed by a processor, implement the image enhancement method as described in any of the above embodiments.
[0025] Other features and advantages of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a schematic flowchart of an image enhancement method according to an embodiment of the present disclosure; Figure 2 This is a schematic diagram of a light-reflection rendering model according to an embodiment of the present disclosure; Figure 3 This is a schematic diagram of the original image and clustered image of a small car chassis according to an embodiment of the present disclosure; Figure 4 This is a schematic diagram of the original image and clustered image of a train chassis according to an embodiment of this disclosure; Figure 5 This is a schematic diagram of the original image and clustered image of a large truck chassis according to an embodiment of this disclosure; Figure 6 This is a schematic diagram of the illumination component estimation of a small car chassis image according to an embodiment of the present disclosure; Figure 7 This is a schematic diagram of the illumination component estimation of a train chassis image according to an embodiment of the present disclosure; Figure 8 This is a schematic diagram of the illumination component estimation of a large vehicle chassis image according to an embodiment of the present disclosure; Figure 9 This is a gradient diagram of a vehicle chassis image according to an embodiment of the present disclosure; Figure 10 This is a schematic flowchart of an image enhancement method according to another embodiment of the present disclosure; Figure 11 This is a schematic diagram of the image processing result of a small car chassis according to an embodiment of this disclosure; Figure 12 This is a schematic diagram of the image processing result of a train chassis according to an embodiment of the present disclosure; Figure 13 This is a schematic diagram of the image processing result of a large vehicle chassis according to an embodiment of this disclosure; Figure 14 This is a schematic diagram of the structure of an image enhancement device according to an embodiment of the present disclosure; Figure 15 This is a schematic diagram of the structure of a vehicle undercarriage detection system according to an embodiment of the present disclosure. Detailed Implementation
[0028] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.
[0029] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of this disclosure.
[0030] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.
[0031] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0032] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.
[0033] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0034] It should be noted that image enhancement technology is mainly divided into two categories: spatial domain and frequency domain.
[0035] Spatial domain enhancement algorithms primarily process the original pixels of an image, encompassing two main technical branches: spatial domain filtering and pixel-level computation. These spatial domain algorithms can specifically address the application shortcomings and performance limitations of existing algorithms, achieving breakthroughs in image detail preservation and contrast optimization. To further improve the performance of spatial domain enhancement, researchers have proposed various improvement strategies. For example, by introducing a specific penalty term, adaptive weighted histogram equalization is achieved, thereby adaptively adjusting the brightness and contrast of the image. Another example is the construction of a two-dimensional histogram based on the correlation characteristics between pixels, simultaneously building a dual model of background and variational contrast. This technical approach effectively enhances the difference between the target region and the background region within the image, improving target recognition and differentiation. To address the potential over-enhancement problem during the enhancement process, enhancement algorithms based on edge and texture protection have emerged to suppress unnatural enhancement effects. When image illumination is uneven, spatial domain enhancement can lead to localized over-brightness or under-brightness.
[0036] In frequency domain-based image enhancement algorithms, wavelet transform enhancement and tetrolet transform enhancement are common methods. However, wavelet transform has limited ability to describe the anisotropy of complex texture structures in images. To address this, researchers have proposed a curvelet transform enhancement algorithm with multi-resolution analysis and good local properties. This method can efficiently capture curve features in images with very few coefficients, but performing curvelet transform in the discrete domain often faces problems of high computational cost and complexity.
[0037] The Retinex algorithm uses a low-pass filter to estimate illumination components, offering advantages such as simplicity and low computational complexity. However, Super-Resolution Reconstruction (SSR) uses only a single scale for illumination estimation, making it difficult to achieve a good balance between dynamic range compression and detail reproduction. It often prioritizes only one aspect, resulting in suboptimal enhancement for some images. To overcome the limitations of SSR, the Multi-Scale Retinex (MSR) algorithm emerged. MSR integrates surround information from different scales, better balancing dynamic range compression and overall detail reproduction, achieving a balanced result under certain conditions. However, it still suffers from insufficient color sensitivity. MSRCR (Multi-Scale Retinex with Color Restoration) can enhance images while maintaining good color fidelity. However, this algorithm has many parameters, making optimization complex and determining the optimal parameter combination difficult.
[0038] In addition, a multi-step enhancement strategy has emerged: First, the image is converted to the HSI (Hue-Saturation-Intensity) color space; then, histogram equalization is performed on the saturation (S) and lightness (I) components respectively; based on this, gamma correction is further introduced to enhance the image. This series of processing effectively improves the visual effect and usability of under-vehicle images, but it does not take into account the problem of uneven illumination introduced by under-vehicle images.
[0039] In summary, existing image enhancement technologies have demonstrated their value in addressing specific challenges, but they cannot solve the specific problems existing in vehicle underside images (wide field of view, overexposure or underexposure of the vehicle underside image).
[0040] Accordingly, this disclosure provides an image enhancement method that can effectively enhance images with large field of view and non-uniform illumination, thereby improving the accuracy of vehicle inspection.
[0041] Figure 1 This is a schematic flowchart of an image enhancement method according to an embodiment of the present disclosure. In some embodiments, the image enhancement method is performed by an image enhancement apparatus and includes steps 11-17.
[0042] In step 11, the first target image is acquired.
[0043] In some embodiments, the step of acquiring the first target image includes steps S101-S102.
[0044] S101. Acquire the original image.
[0045] For example, the original image is an image of the underside of a vehicle captured using an image acquisition device. This device can be a camera, a single-line scan camera, or a multi-line scan camera, etc.
[0046] S102. Remove the incident light component from the original image to obtain the first target image.
[0047] It should be noted here that digital images can utilize two-dimensional functions. Mathematically, the value of this two-dimensional function at each coordinate point in the image corresponds to the brightness value of the pixel at that location. Based on the fundamental principles of optical imaging, the formation principle of visible light images is as follows: the illumination component in the scene illuminates the surface of the object, and after reflection, it reaches the imaging device, ultimately completing the imaging. Based on this principle, the image can be regarded as the result of multiplying the scene illumination component and the object reflection component, and the corresponding mathematical expression is shown in formula (1).
[0048] (1)
[0049] In formula (1), The incident light component in the image. This represents the reflection component in the image.
[0050] This type of imaging characterization mode is usually defined as the illumination-reflection imaging model, and a specific schematic diagram of this theoretical model is shown below. Figure 2 As shown.
[0051] By combining the illumination-reflection imaging model, the incident light components within the image can be determined. Belonging to the low-frequency component, this component mainly defines the brightness range of the entire image and directly interferes with the rendering of the true colors of the target object. The reflection component... This component carries key information such as the image's detailed texture and edge contours, and is a typical high-frequency component that can directly reflect the image's inherent properties. Based on this theoretical basis, the first step in image contrast enhancement processing is to remove the incident light component from the image to maintain the constancy of image color and avoid color distortion.
[0052] It should be noted that retaining the purified reflection component yields a high-quality image with clear details and excellent contrast. Therefore, enhancing images with uneven brightness has significant practical application value.
[0053] In step 12, the first target image is converted from the RGB (Red, Green, Blue) color space to the HSV (Hue, Saturation, Brightness) color space to obtain the first image to be processed.
[0054] It's important to note that for images with uneven brightness distribution, achieving efficient enhancement requires accurately extracting the scene's illumination components. Essentially, the final imaging result is a product of the combined effects of illumination and reflection components. This largely necessitates relying on sound theoretical assumptions and employing mathematical models to estimate the illumination components from the original image data.
[0055] Based on the classic Retinex theory, the following core assumptions are generally formed: the illumination components of an actual scene image are mostly concentrated in the low-frequency region, with a smooth and uniform overall grayscale trend; while the reflection components are mainly distributed in the high-frequency region, corresponding to local features such as image edges and texture details, with relatively abrupt and drastic grayscale changes. Based on this key assumption, the extracted illumination components should only retain the feature information of smooth illumination changes, avoiding the mixing of the image's own texture and details.
[0056] To ensure that the visual effect of the image enhancement process conforms to human visual perception and appears natural and harmonious, for low-light and unevenly distributed low-quality images, the images are first converted from the RGB color space to the HSV color space before processing. During the processing, the original parameters of the hue and saturation channels are kept fixed, and only the luminance channel is specifically enhanced and optimized to avoid color distortion and balance enhancement effect with color fidelity.
[0057] In step 13, the pixels in the brightness channel image of the first image to be processed are clustered according to their brightness values to obtain multiple pixel clusters.
[0058] It should be noted that low-light and unevenly distributed illumination environments significantly affect the accurate estimation of image illumination information. Therefore, scene segmentation can be performed on the brightness channel images in the image based on differences in brightness values. This ensures that each segmented scene category has similar brightness characteristics, i.e., pixels with similar brightness values are grouped together, forming multiple pixel clusters.
[0059] In some embodiments, the step of clustering pixels in the luminance channel image of the first image to be processed according to luminance values includes steps S201-S205.
[0060] S201. Cluster all pixels in the luminance channel image according to their luminance values to obtain multiple clusters.
[0061] For example, the K-means algorithm can be used for clustering.
[0062] S202. Determine the intra-cluster distances within each of the multiple clusters.
[0063] In some embodiments, the intra-cluster distance of the i-th cluster is obtained based on the distance between each pixel in the i-th cluster and the cluster center of the i-th cluster, where K represents the total number of pixel clusters.
[0064] For example, the intra-cluster distance in each cluster is shown in Equation (2).
[0065] (2)
[0066] In formula (2), Used to represent the set of all pixel coordinates contained in the i-th cluster. Refers to the luminance channel of an image, the luminance component of the image. The cluster center of the i-th cluster is represented by the mathematical expression shown in formula (3).
[0067] (3)
[0068] In formula (3), This represents the total number of pixels contained in the i-th cluster, used for calculating the mean and weights during the clustering process.
[0069] S203. Determine the cluster distance deviation for this iteration based on the intra-cluster distances of multiple clusters.
[0070] In some embodiments, the sum of intra-cluster distances of multiple clusters is calculated to obtain the cluster distance deviation for this iteration.
[0071] For example, the clustering distance deviation in the m-th iteration is shown in formula (4).
[0072] (4)
[0073] S204. Repeat the process of clustering pixels in the luminance channel image according to luminance value until the difference in clustering distance between two adjacent iterations is within a predetermined range.
[0074] For example, if formula (5) is satisfied, then the clustering process stops. In formula (5), For example, a preset threshold can be used.
[0075] (5)
[0076] S205. The multiple clusters generated in the last iteration are taken as multiple pixel clusters.
[0077] In some embodiments, the number of multiple pixel clusters includes 11.
[0078] It should also be noted that the choice of the number of clusters during pixel clustering directly affects the classification effect in the actual scene and significantly interferes with the accuracy of subsequent luminance component estimation. To analyze the performance of the clustering algorithm under different numbers of clusters, integers in the range [5, 15] were selected as test values for the number of clusters. Algorithm models with different parameters were applied to chassis images of three types of vehicles: small cars, large freight vehicles, and trains, for comparative testing. 120 images of each type of vehicle were selected from different time periods for testing. The clustered images were quantitatively evaluated and compared using the No-Reference Objective Quality Evaluation Metric (NIQE). The mean test results for different numbers of clusters K are shown in Table 1.
[0079] Table 1. Mean NIQE values under different K values
[0080] For NIQE, a smaller value indicates better image quality and statistical characteristics that are closer to natural images. Table 1 clearly shows that the NIQE values of the test images for the three vehicle models exhibit a concave distribution and are relatively stable, with the NIQE values for all three image types reaching their minimum when K is 11. This indicates that most test images exhibit minimal image distortion and the visual effect is closest to natural images under the clustering condition of K=11. Based on the test results of the chassis images of the three vehicle models, combined with the analysis of the objective evaluation index of NIQE, it can be seen that when the number of clusters K is set to 11, clustering results with high contrast, good visual naturalness, and low distortion can be obtained. Based on the clustering number of K=11, clustering and segmentation of the luminance channel images are performed, and the corresponding results are as follows: Figures 3 to 5 As shown.
[0081] exist Figure 3 In the image, (a) is the original image of the small car chassis, and (b) is the clustered image of the small car chassis. Figure 4 In the image, (a) is the original image of the train chassis, and (b) is a clustered image of the train chassis. Figure 5 In the image, (a) is the original image of the large truck chassis, and (b) is a clustered image of the large truck chassis. (This is achieved through...) Figure 3 , Figure 4 and Figure 5It can be seen that the image clustering results are consistent with the human eye's perception of brightness in the original image.
[0082] In step 14, the illumination component of the luminance channel image is determined based on the pixel luminance component of each pixel cluster in the multiple pixel clusters.
[0083] In some embodiments, the step of determining the illumination component of the luminance channel image based on the pixel luminance component of each pixel cluster in a plurality of pixel clusters includes S301-S302.
[0084] S301. Determine the pixel luminance components of each pixel cluster.
[0085] In some embodiments, the step of determining the pixel luminance component of each pixel cluster includes steps S401-S403.
[0086] S401. Determine the region of all pixels in the i-th pixel cluster within the first target image to obtain the i-th region, where... K represents the total number of pixel clusters.
[0087] S402. Calculate the maximum value of the red channel pixels, the maximum value of the green channel pixels, and the maximum value of the blue channel pixels in the i-th region, respectively.
[0088] S403. Calculate the weighted sum of the maximum pixel values of the red channel, green channel, and blue channel to obtain the pixel brightness component of the i-th pixel cluster.
[0089] In some embodiments, the weight of the maximum value of the red channel pixel is the ratio of the sum of the red channel pixel values in the i-th region to the sum of the pixel values of the red, green, and blue channels in the i-th region.
[0090] The weight of the maximum value of the green channel pixel is the ratio of the sum of the red and green channel pixel values in the i-th region to the sum of the red, green, and blue channel pixel values in the i-th region.
[0091] The weight of the maximum value of the blue channel pixel is the ratio of the sum of the blue and green channel pixel values in the i-th region to the sum of the red, green, and blue channel pixel values in the i-th region.
[0092] For example, the pixel luminance component of the i-th pixel cluster. As shown in formula (6).
[0093] (6) In formula (6), This refers to the image region to which the pixel of the i-th pixel cluster belongs. Used to represent the maximum value of the red channel pixels in the i-th region. Used to represent the maximum value of the green channel pixels in the i-th region. Used to represent the maximum value of the blue channel pixels in the i-th region. The weights used to represent the maximum value of pixels in the red channel. The weights used to represent the maximum value of the green channel pixels. The weight used to represent the maximum value of the blue channel pixels.
[0094] S302. The pixel luminance components of multiple pixel clusters are fused to obtain the luminance components of the luminance channel image.
[0095] It's important to note that maxRGB is a classic automatic white balance method, used by many algorithms to estimate the initial value of the luminance component. The core assumption of this method is that luminance is provided by the channel with the largest response value among the RGB three channels. The maximum value of the pixel values in the RGB three channels is used as the initial estimate of the illuminance component.
[0096] In chassis images, because car chassis are relatively low, the brightness intensity values of brighter areas under the vehicle appear excessively high. Trains and trucks, on the other hand, have higher chassis and use lenses with wide field of view, resulting in excessively high brightness intensity values in the chassis edge images and transparent areas.
[0097] Compared to the existing maxRGB method, the method for determining the illumination components of a luminance channel image provided in the above embodiments of this disclosure can be called the dynamic weighted maxRGB method. The illumination components obtained using the maxRGB method and the dynamic weighted maxRGB method are as follows: Figures 6 to 8 As shown.
[0098] exist Figure 6 In the image, (a) shows the estimated illumination components of the small car chassis obtained using the maxRGB method, and (b) shows the estimated illumination components of the small car chassis obtained using the dynamically weighted maxRGB method. Figure 7 In the image, (a) shows the estimated illumination components of the train chassis obtained using the maxRGB method, and (b) shows the estimated illumination components of the train chassis obtained using the dynamically weighted maxRGB method. Figure 8 In the image, (a) shows the estimated illumination components of the large truck chassis obtained using the maxRGB method, and (b) shows the estimated illumination components of the large truck chassis obtained using the dynamically weighted maxRGB method. Figure 6 , Figure 7 and Figure 8 It can be seen that in the illumination component estimation map of the vehicle chassis obtained using the maxRGB method, there are areas with excessively high brightness intensity values, as shown in the elliptical regions, which leads to the loss of some image details. However, in the illumination component estimation map of the vehicle chassis obtained using the dynamically weighted maxRGB method, there is no problem of excessive amplification of brightness information, and the brightness values of the image edge regions are lower than the corresponding brightness values estimated by the maxRGB algorithm, resulting in a more gradual and reasonable overall brightness distribution.
[0099] The above analysis shows that the dynamic weighted maxRGB algorithm proposed in this disclosure can better estimate the illumination components of images with uneven brightness than the maxRGB algorithm.
[0100] In step 15, the luminance channel image is corrected according to the luminance image gradient of the illumination component and the luminance channel image to obtain the corrected luminance channel image.
[0101] In some embodiments, the step of correcting the luminance channel image based on the illumination component and the luminance image gradient of the luminance channel image includes steps S501-S503.
[0102] S501. Determine the luminance image gradient of the luminance channel image.
[0103] In some embodiments, a first gradient of a pixel in the luminance channel image in the x-direction and a second gradient in the y-direction are first determined. Next, the luminance image gradient is determined based on the first and second gradients.
[0104] It should be noted here that the brightness image gradient is the magnitude of the change in the value of adjacent pixels in the image. In order to calculate the magnitude of the gray-level change of image pixels, the magnitude of the gradient value is used to represent the amount of change of image pixels. For example, considering that the Sobel operator achieves a good balance between computational efficiency and noise suppression, the Sobel operator can be used to perform convolution operations on the image to obtain the gradients in the x and y directions of the pixels, and then calculate the gradient magnitude to quantify the amount of gradient change of image pixels. As shown in formulas (7) and (8), and These represent the brightness channel images respectively. Gray values obtained from horizontal and vertical edge detection.
[0105] (7) (8) Therefore, the brightness image gradient of the brightness channel image As shown in formula (9).
[0106] (9)
[0107] For example, by using the Sobel operator to process images of small vehicle chassis, train chassis, and large truck chassis respectively, the resulting gradient maps are as follows: Figure 9 As shown. In Figure 9 In the image, (a) is the gradient map of the chassis image of a small vehicle, (b) is the gradient map of the chassis image of a train, and (c) is the gradient map of the chassis image of a large truck.
[0108] S502. Determine the brightness adjustment index based on the brightness image gradient and illumination components.
[0109] In some embodiments, the step of determining the brightness adjustment index based on the brightness image gradient and the illumination component includes steps S601-S603.
[0110] S601, based on the average brightness of the illumination component and the illumination component, the illumination component characteristics are obtained.
[0111] In some embodiments, the mean luminance of the illumination component is first calculated, and then the difference between the mean luminance and the illumination component is calculated to obtain a first intermediate value. Next, the ratio of the first intermediate value to the mean luminance is calculated to obtain the illumination component characteristics.
[0112] For example, illumination component characteristics As shown in formula (10).
[0113] (10)
[0114] In formula (10), The average brightness of the illumination component. This represents the illumination component.
[0115] S602. Obtain gradient distribution information based on the brightness image gradient, the first parameter value, and the second parameter value.
[0116] In some embodiments, the ratio of the brightness image gradient to the first parameter value is first calculated to obtain a second intermediate value. Next, the sum of the second parameter value and the second intermediate value is calculated to obtain gradient distribution information.
[0117] It's important to note that the first parameter value represents the pixel's grayscale value, ranging from 0 to 255. A grayscale value of 0 indicates pure black, and a grayscale value of 255 indicates pure white. The second parameter value is used to further map the calculation result to a specified range. For example, if the first parameter value is 255, the second parameter value might be 1.
[0118] With the first parameter value of 255, the brightness image gradient is normalized to... Within the interval.
[0119] For example, gradient distribution information As shown in formula (11).
[0120] (11)
[0121] In formula (11), This represents the brightness image gradient.
[0122] S603. Determine the brightness adjustment index based on the characteristics of the illumination components and gradient distribution information.
[0123] In some embodiments, the product of the illumination component characteristics and gradient distribution information is first calculated to obtain the correction index. Next, the brightness adjustment index is obtained by exponentiation with the third parameter as the base and the correction index as the exponent.
[0124] It should be noted that the third parameter value, used as the base in the exponentiation calculation of the brightness adjustment index, ranges from 0 to 1. For example, the value of the third parameter is 0.5.
[0125] For example, brightness adjustment index As shown in formula (12).
[0126] (12)
[0127] It should be noted here that the brightness adjustment index... It integrates the image's own illumination component features A and gradient distribution information B to achieve brightness adjustment that adapts to the image's own characteristics.
[0128] S503. Correct the brightness channel image according to the brightness adjustment index to obtain the corrected brightness channel image.
[0129] In some embodiments, the ratio of the luminance value of each pixel in the luminance channel image to the value of the fourth parameter is calculated to obtain a first intermediate image. Then, a power operation is performed with the intermediate image as the base and the luminance adjustment index as the exponent to obtain a second intermediate image. Next, the product of the fourth parameter value and the second intermediate image is calculated to obtain the corrected luminance channel image.
[0130] It's important to note that the fourth parameter represents the pixel's grayscale value, ranging from 0 to 255. A grayscale value of 0 indicates pure black, and a grayscale value of 255 indicates pure white. For example, if the fourth parameter value is 255, then the brightness value of each pixel is normalized to... Within the interval.
[0131] For example, the corrected luminance channel image As shown in formula (13).
[0132] (13)
[0133] It's important to note that gamma correction is a non-linear image enhancement algorithm. These algorithms adjust individual pixels independently, optimizing the dynamic range distribution curve of pixels while preserving the original image details, thus adapting to correction needs in different brightness scenarios. However, traditional gamma correction algorithms use fixed parameter configurations, only achieving single-mode brightness enhancement or suppression, and cannot effectively highlight or enhance the internal texture details of the image, resulting in limited overall enhancement effects.
[0134] To achieve image enhancement and texture information highlighting, the above embodiments of this disclosure provide a dynamic adaptive image enhancement method, also known as a dynamic adaptive two-dimensional gamma image enhancement algorithm. Based on the distribution characteristics of illumination components, it constructs an illumination non-uniformity correction function, combines the gradient value of the image, and performs weighted calculation on the two-dimensional gamma correction function to complete the enhancement processing of the non-uniformly illuminated image, highlight the texture information of the image, and improve the overall quality of the non-uniformly illuminated image.
[0135] It should be noted that the core processing rule of the correction algorithm is: if the illumination value of any pixel in the image is less than the mean m of the illumination components of the entire image, the gamma transform function will combine the corresponding exponential parameter to adaptively enhance the brightness value of that pixel.
[0136] Taking actual values as an example, when a pixel in the input image has an illumination component of 94, an overall illumination component mean of 128, a luminance channel value of 100, and a gradient value of 80, after algorithm correction and optimization, the final output luminance of that pixel is 123, effectively improving the luminance of low-brightness areas. Conversely, when the illumination value of a pixel is higher than the overall illumination component mean, the two-dimensional gamma function will, based on the exponential parameter, appropriately attenuate the luminance of that point to balance the luminance distribution of the entire image.
[0137] In step 16, the hue channel image, saturation channel image, and corrected luminance channel image of the first image to be processed are fused to obtain the second image to be processed.
[0138] In step 17, the second image to be processed is converted from the HSV color space to the RGB color space to obtain the second target image.
[0139] In the image enhancement method provided in the above embodiments of this disclosure, by converting the acquired image from RGB space to HSV space and correcting the luminance channel image, the hue channel image and saturation channel image in HSV space, as well as the corrected luminance channel image, are fused and converted back to RGB space, thereby effectively realizing the enhancement processing of large field-of-view non-uniform illumination images and improving the accuracy of vehicle inspection.
[0140] Figure 10 This is a flowchart illustrating an image enhancement method according to another embodiment of the present disclosure, including steps 101-1011.
[0141] In step 101, the first target image is acquired.
[0142] In step 102, the first target image is converted from the RGB color space to the HSV color space to obtain the first image to be processed.
[0143] In step 103, the luminance channel image V is extracted from the first image to be processed.
[0144] In step 104, the hue channel image S and the saturation channel image S are extracted from the first image to be processed.
[0145] In step 105, the luminance channel image V is clustered to obtain multiple clusters.
[0146] For example, clustering can be performed using steps S201-S205 described above.
[0147] In step 106, the illumination component of the luminance channel image V is determined based on the pixel luminance component of each pixel cluster in the multiple pixel clusters.
[0148] For example, the illumination components of the luminance channel image V can be determined using the steps S301-S302 described above.
[0149] In step 107, the luminance image gradient of the luminance channel image V is determined.
[0150] In step 108, the brightness adjustment index is determined based on the brightness image gradient and illumination components.
[0151] For example, the brightness adjustment index can be determined using the steps S601-S603 described above.
[0152] In step 109, the brightness channel image V is corrected according to the brightness adjustment index to obtain the corrected brightness channel image V1.
[0153] For example, the above step S503 can be used to correct the luminance channel image V.
[0154] In step 1010, the luminance channel image V1, the hue channel image S, and the saturation channel image S are fused to obtain the second image to be processed.
[0155] In step 1011, the second image to be processed is converted from the HSV color space to the RGB color space to obtain the second target image.
[0156] For example, to verify the performance of the disclosed solution in large field-of-view non-uniform brightness images, the experiment used a chassis photography hardware platform to acquire outdoor chassis images of three different vehicle types: small cars, trains, and large trucks.
[0157] Here, MSR, CLAHE, and maxRGB+Gamma are selected as comparison algorithms. The three scale factors c values of the MSR algorithm are 15, 80, and 250, respectively. The effects of the three vehicle chassis image enhancements are shown in Figures 11 to 13.
[0158] Figure 11 This is a schematic diagram illustrating the image processing result of a small car chassis according to an embodiment of this disclosure. Figure 11 In the image, (a) is the original image, (b) is the processing result of the MSR algorithm, (c) is the processing result of the CLAHE algorithm, (d) is the processing result of the maxRGB+Gamma algorithm, and (e) is the processing result of the algorithm disclosed herein.
[0159] Figure 12 This is a schematic diagram illustrating the image processing result of a train chassis according to an embodiment of this disclosure. Figure 12 In the image, (a) is the original image, (b) is the processing result of the MSR algorithm, (c) is the processing result of the CLAHE algorithm, (d) is the processing result of the maxRGB+Gamma algorithm, and (e) is the processing result of the algorithm disclosed herein.
[0160] Figure 13 This is a schematic diagram illustrating the image processing result of a large vehicle chassis according to an embodiment of this disclosure. Figure 13 In the image, (a) is the original image, (b) is the processing result of the MSR algorithm, (c) is the processing result of the CLAHE algorithm, (d) is the processing result of the maxRGB+Gamma algorithm, and (e) is the processing result of the algorithm disclosed herein.
[0161] pass Figure 11 , Figure 12 and Figure 13It is evident that the image after MSR correction is distorted, exhibiting a fogging effect, which significantly diminishes the practical application effectiveness of the algorithm. The CLAHE algorithm improves brightness compared to the original image, but noticeable halo effects appear at the edges and in translucent areas of the train and truck, and horizontal or vertical grayscale bars due to interpolation appear in the upper and lower high-brightness areas. The image enhanced by the maxRGB+Gamma method lacks clarity, resulting in a blurred scene. Comparing the processing results of the algorithm provided in this disclosure with the original image shows that the overall brightness and contrast of the processed image are effectively improved. Compared with other similar enhancement algorithms, the algorithm provided in this disclosure can retain the inherent details and core information of the original image to the greatest extent, exhibiting superior information retention.
[0162] To further compare the processing effectiveness of different algorithms, contrast, sharpness, and information entropy were selected as objective evaluation indicators to quantitatively measure the image enhancement effect of each algorithm. Contrast reflects the image's ability to render details and the range of grayscale levels; sharpness characterizes the clarity of the image's textures and edge contours; and information entropy measures the information carrying capacity of the image—the higher the value, the richer the effective information contained in the image. Based on these indicators, the objective quality of the images before and after processing by different algorithms was evaluated. The relevant average statistical results for the chassis images of the three vehicle models are shown in Table 2.
[0163] Table 2 Image quality evaluation metrics for different algorithms
[0164] As can be seen from the data in Table 2, after processing by the algorithm provided in this disclosure, the image contrast is significantly improved, the clarity is greatly enhanced, and the information entropy is also increased. This indicates that the processed image can carry and extract more effective information. Therefore, the algorithm provided in this disclosure effectively mitigates the adverse effects of large field of view and uneven brightness on imaging performance, and achieves good enhancement effects for various common chassis images.
[0165] Figure 14 This is a schematic diagram of the structure of an image enhancement device according to an embodiment of the present disclosure; like Figure 14 As shown, the image enhancement device 140 can be represented in the form of a general computing device. The image enhancement device 140 includes a memory 141, a processor 142, and a bus 143 connecting different system components.
[0166] Memory 141 may include, for example, system memory, non-volatile storage media, etc. System memory may store, for example, an operating system, application programs, a boot loader, and other programs. System memory may include volatile storage media, such as random access memory (RAM) and / or cache memory. Non-volatile storage media may store, for example, instructions for a corresponding embodiment of at least one of the image enhancement methods being executed. Non-volatile storage media include, but are not limited to, disk storage, optical storage, flash memory, etc.
[0167] The processor 142 can be implemented using a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete hardware components such as discrete gates or transistors. Accordingly, each module, such as the acquisition module, the calculation module, and the adjustment module, can be implemented by executing instructions in the central processing unit (CPU) running memory to perform the corresponding steps, or by implementing dedicated circuitry to perform the corresponding steps.
[0168] For example, processor 142 is configured for memory-based instruction execution implementation such as Figure 1 , 10 The method involved in any of the embodiments.
[0169] Bus 143 can use any of the various bus architectures. For example, bus architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, and Peripheral Component Interconnect (PCI) bus.
[0170] The interfaces 144, 145, and 146 of the image enhancement device 140, as well as the memory 141 and processor 142, can be connected via bus 143. Input / output interface 144 provides a connection interface for input / output devices such as a monitor, mouse, and keyboard. Network interface 145 provides a connection interface for various networked devices. Storage interface 146 provides a connection interface for external storage devices such as floppy disks, USB flash drives, and SD cards.
[0171] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus, and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations thereof, can be implemented by computer-readable program instructions.
[0172] These computer-readable program instructions are provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable device to produce a machine, such that execution of the instructions by the processor produces means for implementing the functions specified in one or more boxes of the flowchart and / or block diagram.
[0173] These computer-readable program instructions may also be stored in a computer-readable storage medium. These instructions cause a computer to work in a particular manner to produce an article of manufacture, including instructions that implement the functions specified in one or more boxes in a flowchart and / or block diagram.
[0174] This disclosure may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects.
[0175] This disclosure also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement... Figure 1 , 10 The method involved in any of the embodiments.
[0176] This disclosure also provides a computer program product, including computer instructions, wherein the computer instructions, when executed by a processor, implement as follows: Figure 1 , 10 The method involved in any of the embodiments.
[0177] Figure 15 This is a schematic diagram of the structure of a vehicle undercarriage detection system according to an embodiment of this disclosure. Figure 15 As shown, the undercarriage detection system includes an image acquisition device 151, an image enhancement device 152, and an undercarriage detection device 153. The image enhancement device 152 is... Figure 14 The image enhancement apparatus involved in any of the embodiments.
[0178] The image acquisition device 151 is configured to acquire an image of the bottom of a vehicle and send the image of the bottom of the vehicle to the image enhancement device 152 so that the image enhancement device 152 can enhance the image of the bottom of the vehicle.
[0179] The undercarriage detection device 153 is configured to perform undercarriage detection on the enhanced image provided by the image enhancement device 152.
[0180] It should also be noted that during the acquisition of vehicle chassis images, factors such as the large field of view sensor and illumination result in images with uneven brightness, increasing the difficulty of extracting valuable information from the image content. Therefore, this disclosure proposes an adaptive enhancement method for images with uneven brightness distribution over a large field of view. In-depth theoretical analysis and multiple sets of comparative experiments confirm that the improved algorithm proposed in this disclosure has a significantly outstanding enhancement effect on images with uneven brightness distribution over a large field of view. Horizontal comparative analysis of various quality evaluation indicators of the enhanced images shows that the algorithm can effectively optimize the overall contrast and visual clarity of images with uneven brightness, while completely preserving and enhancing the texture details of the image. Its overall processing performance is superior to conventional enhancement methods. This method can be used for preprocessing in chassis foreign object detection and recognition, showing great application potential.
[0181] In some embodiments, the functional units described above may be implemented as general-purpose processors, programmable logic controllers (PLCs), digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or any suitable combination thereof for performing the functions described herein.
[0182] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0183] The description in this disclosure is provided for illustrative and descriptive purposes only and is not intended to be exhaustive or to limit the disclosure to its forms. Many modifications and variations will be apparent to those skilled in the art. The embodiments were chosen and described in order to better illustrate the principles and practical application of this disclosure and to enable those skilled in the art to understand this disclosure and to design various embodiments with various modifications suitable for a particular purpose.
Claims
1. An image enhancement method, comprising: Acquire the first target image; The first target image is converted from the RGB color space to the HSV color space of hue, saturation, and brightness to obtain the first image to be processed. The pixels in the brightness channel image of the first image to be processed are clustered according to their brightness values to obtain multiple pixel clusters; The illumination component of the luminance channel image is determined based on the pixel luminance component of each pixel cluster in the plurality of pixel clusters; The luminance channel image is corrected based on the illumination component and the luminance image gradient of the luminance channel image to obtain the corrected luminance channel image; The hue channel image and saturation channel image of the first image to be processed, as well as the corrected luminance channel image, are fused to obtain the second image to be processed. The second image to be processed is converted from the HSV color space to the RGB color space to obtain the second target image.
2. The image enhancement method according to claim 1, wherein, The step of correcting the luminance channel image based on the illumination component and the luminance image gradient of the luminance channel image includes: Determine the brightness image gradient of the brightness channel image; The brightness adjustment index is determined based on the brightness image gradient and the illumination components; The brightness channel image is corrected according to the brightness adjustment index to obtain the corrected brightness channel image.
3. The image enhancement method according to claim 2, wherein, The step of determining the brightness adjustment index based on the brightness image gradient and the illumination component includes: The illumination component characteristics are obtained based on the average brightness of the illumination component and the illumination component itself. The gradient distribution information is obtained based on the brightness image gradient, the first parameter value, and the second parameter value. The brightness adjustment index is determined based on the characteristics of the illumination components and the gradient distribution information.
4. The image enhancement method according to claim 3, wherein, The step of obtaining the illumination component characteristics based on the average brightness of the illumination component and the illumination component includes: Calculate the average brightness of the illumination component; The difference between the average brightness and the illumination component is calculated to obtain the first intermediate value; The ratio of the first intermediate value to the average brightness value is calculated to obtain the illumination component characteristics.
5. The image enhancement method according to claim 3, wherein, The step of obtaining gradient distribution information based on the brightness image gradient, the first parameter value, and the second parameter value includes: Calculate the ratio of the brightness image gradient to the first parameter value to obtain a second intermediate value; The gradient distribution information is obtained by calculating the sum of the second parameter value and the second intermediate value.
6. The image enhancement method according to claim 3, wherein, Determining the brightness adjustment index based on the illumination component characteristics and gradient distribution information includes: The product of the illumination component characteristics and the gradient distribution information is calculated to obtain the correction index; The brightness adjustment index is obtained by calculating the power of the correction index with the third parameter as the base.
7. The image enhancement method according to claim 2, wherein, The step of correcting the brightness channel image according to the brightness adjustment index includes: The ratio of the brightness value of each pixel in the brightness channel image to the value of the fourth parameter is calculated to obtain the first intermediate image; The second intermediate image is obtained by calculating the power of the brightness adjustment index with the intermediate image as the base; The product of the fourth parameter value and the second intermediate image is calculated to obtain the corrected luminance channel image.
8. The image enhancement method according to claim 2, wherein, Determining the brightness image gradient of the brightness channel image includes: Determine the first gradient of the pixels in the luminance channel image in the x-direction and the second gradient in the y-direction; The brightness image gradient is determined based on the first gradient and the second gradient.
9. The image enhancement method according to claim 1, wherein, Determining the illumination component of the luminance channel image based on the pixel luminance component of each of the plurality of pixel clusters includes: Determine the pixel luminance components of each pixel cluster; The pixel luminance components of the multiple pixel clusters are fused to obtain the luminance components of the luminance channel image.
10. The image enhancement method according to claim 9, wherein, The step of determining the pixel luminance components of each pixel cluster includes: The region in the first target image is determined by identifying all pixels in the i-th pixel cluster among the plurality of pixel clusters, to obtain the i-th region, where K is the total number of pixel clusters; Calculate the maximum value of the red channel pixels, the maximum value of the green channel pixels, and the maximum value of the blue channel pixels in the i-th region, respectively. The weighted sum of the maximum pixel value of the red channel, the maximum pixel value of the green channel, and the maximum pixel value of the blue channel is calculated to obtain the pixel luminance component of the i-th pixel cluster.
11. The image enhancement method according to claim 10, wherein, The weight of the maximum value of the red channel pixel is the ratio of the sum of the red channel pixel values in the i-th region to the sum of the pixel values of the red, green, and blue channels in the i-th region; The weight of the maximum value of the green channel pixel is the ratio of the sum of the red and green channel pixel values in the i-th region to the sum of the red, green, and blue channel pixel values in the i-th region. The weight of the maximum value of the blue channel pixel is the ratio of the sum of the blue and green channel pixel values in the i-th region to the sum of the red, green, and blue channel pixel values in the i-th region.
12. The image enhancement method according to claim 1, wherein, The step of clustering the pixels in the luminance channel image of the first image to be processed according to their luminance values includes: All pixels in the brightness channel image are clustered according to their brightness values to obtain multiple clusters; Determine the intra-cluster distances within each of the plurality of clusters; The clustering distance deviation for this iteration is determined based on the intra-cluster distances of the multiple clusters. Repeat the process of clustering pixels in the brightness channel image according to brightness value until the difference in clustering distance between two adjacent iterations is within a predetermined range; The multiple clusters generated in the last iteration are taken as the multiple pixel clusters.
13. The image enhancement method according to claim 12, wherein, Determining the intra-cluster distance within each of the plurality of clusters includes: The intra-cluster distance of the i-th cluster is obtained based on the distance between each pixel in the i-th cluster and the cluster center of the i-th cluster. K represents the total number of pixel clusters.
14. The image enhancement method according to claim 13, wherein, The determination of the clustering distance deviation for this iteration based on the intra-cluster distances of the multiple clusters includes: The sum of the intra-cluster distances of the multiple clusters is calculated to obtain the cluster distance deviation for this iteration.
15. The image enhancement method according to claim 1, wherein, The number of the plurality of pixel clusters includes 11.
16. The image enhancement method according to any one of claims 1-15, wherein, The acquisition of the first target image includes: Acquire raw images; The incident light component is removed from the original image to obtain the first target image.
17. An image enhancement apparatus, comprising: Memory; A processor, coupled to a memory, is configured to execute instructions stored in the memory to implement the image enhancement method as described in any one of claims 1-16.
18. A vehicle undercarriage detection system, comprising: The image enhancement apparatus as described in claim 17; An image acquisition device is configured to acquire an image of the underside of a vehicle and send the image of the underside of the vehicle to the image enhancement device; The undercarriage detection device is configured to perform undercarriage detection on the image provided by the image enhancement device.
19. A computer-readable storage medium, wherein, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the image enhancement method as described in any one of claims 1-16.
20. A computer program product comprising computer instructions, wherein the computer instructions, when executed by a processor, implement the image enhancement method as described in any one of claims 1-16.