Image processing method and device, electronic equipment and storage medium

Through image processing methods, including pixel normalization, ductility coefficient calculation, channel pixel analysis and visual enhancement processing, the problem of low clarity of sand and dust images is solved, and the quality of sand and dust images and the accuracy of insurance claims are improved.

CN119205578APending Publication Date: 2024-12-27PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411332192.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The sand and dust images obtained in sandstorm weather conditions have poor clarity, which makes it difficult for insurance platforms to judge the authenticity of the claims and the degree of vehicle damage, reducing the accuracy of the claims.

Method used

Through image processing methods, including pixel normalization, ductility coefficient calculation, channel pixel analysis, color correction and visual enhancement processing, the clarity and image quality of sand and dust images are improved.

Benefits of technology

It significantly improves the clarity and visual perception effect of sand and dust images, enhances the image quality acquired in sand and dusty weather conditions, and improves the accuracy of claims.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119205578A_ABST
    Figure CN119205578A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an image processing method and device, electronic equipment and a storage medium, and belongs to the technical field of financial science and technology. The method comprises the following steps: acquiring an original dust image; carrying out pixel normalization on the original sand and dust image to obtain an intermediate sand and dust image; carrying out extension coefficient calculation on the middle dust image to obtain an image extension coefficient of the middle dust image; performing channel pixel analysis on the middle dust image to obtain channel pixel analysis data of the middle dust image; based on the channel pixel analysis data and the image extension coefficient, color correction is carried out on the middle sand and dust image, and a corrected sand and dust image is obtained; and performing visual enhancement processing on the corrected sand-dust image to obtain a target sand-dust image, the definition of the target sand-dust image being greater than the definition of the original sand-dust image. According to the embodiment of the invention, the image definition of the sand and dust image can be improved, so that the image quality of the sand and dust image obtained under the sand and dust weather condition is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of financial technology, and in particular to an image processing method and device, an electronic device and a storage medium. Background Art

[0002] At present, various image applications are often involved in various business fields. For example, in the insurance field, objects often insure their physical resources (such as houses and vehicles, etc.). When the insured vehicle is damaged due to natural disasters (such as extreme disasters such as sandstorms), the object can apply for claims processing from the insurance platform and provide supporting materials related to the claims, where the supporting materials include vehicle purchase certificates, vehicle damage videos, and environmental data of the accident. Specifically, when the vehicle is damaged due to sandstorm weather, the environmental data of the accident may include weather images related to sandstorms, as well as related images of vehicles driving in sandstorm weather, etc. This type of image can be collectively referred to as sandstorm images, so that the insurance platform can process compensation based on sandstorm images, etc.

[0003] However, when the clarity of the dust images provided by the object is poor, the insurance platform often finds it difficult to determine the authenticity of the claim event, and it is also difficult to determine the actual extent of damage caused to the vehicle by the sandstorm, which will lead to reduced accuracy of the claim. Summary of the invention

[0004] The main purpose of the embodiments of the present application is to propose an image processing method and device, an electronic device and a storage medium, aiming to improve the image clarity of dust images, and thereby improve the image quality of dust images acquired under dust weather conditions.

[0005] To achieve the above object, a first aspect of an embodiment of the present application provides an image processing method, the method comprising:

[0006] Get the original dust image;

[0007] Normalizing the pixels of the original dust image to obtain an intermediate dust image;

[0008] Calculating a stretch coefficient for the intermediate dust image to obtain an image stretch coefficient for the intermediate dust image, wherein the image stretch coefficient is used to indicate a degree of scaling of the contrast of the intermediate dust image;

[0009] Performing channel pixel analysis on the intermediate dust image to obtain channel pixel analysis data of the intermediate dust image;

[0010] Based on the channel pixel analysis data and the image stretch coefficient, color correction is performed on the intermediate dust image to obtain a corrected dust image;

[0011] The corrected dust image is subjected to visual enhancement processing to obtain a target dust image, wherein the clarity of the target dust image is greater than the clarity of the original dust image.

[0012] In some embodiments, the channel pixel analysis data includes the channel pixel mean and channel pixel standard deviation of the intermediate dust image in each color channel, and the global pixel mean and global pixel standard deviation of the intermediate dust image;

[0013] The color correction of the intermediate dust image based on the channel pixel analysis data and the image stretch coefficient to obtain a corrected dust image includes:

[0014] For each of the color channels, obtaining an initial pixel value of each pixel point of the intermediate dust image in the color channel;

[0015] For each pixel point, performing a difference calculation between the initial pixel value and the channel pixel mean to obtain a pixel difference;

[0016] Performing an increment calculation based on the pixel difference, the image stretch coefficient, and the ratio of the global pixel standard deviation to the channel pixel standard deviation to obtain a pixel value increment of the pixel point in the color channel;

[0017] Update the pixel value of the pixel point based on the pixel value increment of each color channel and the global pixel mean value to obtain a target pixel value of the pixel point;

[0018] Based on the target pixel values ​​of the plurality of pixel points, color correction is performed on the intermediate dust image to obtain the corrected dust image.

[0019] In some embodiments, performing visual enhancement processing on the corrected dust image to obtain a target dust image includes:

[0020] Projecting the corrected dust image to a preset grayscale image space to obtain a dust grayscale image corresponding to the corrected dust image;

[0021] Inputting the dust grayscale image into a preset grayscale space model for image enhancement to obtain an enhanced dust image;

[0022] The enhanced dust image is projected into a target color space to obtain the target dust image.

[0023] In some embodiments, the step of inputting the dust grayscale image into a preset grayscale space model for image enhancement to obtain an enhanced dust image includes:

[0024] Performing a histogram analysis on the dust grayscale image based on the grayscale space model to obtain an image mean and an image variance of the dust grayscale image;

[0025] Performing brightness equalization on the dust grayscale image based on the image mean and the image variance to obtain a balanced grayscale image;

[0026] The balanced grayscale image is enhanced based on a preset mapping function to obtain the enhanced dust image.

[0027] In some embodiments, performing channel pixel analysis on the intermediate dust image to obtain channel pixel analysis data of the intermediate dust image includes:

[0028] For each color channel of the intermediate dust image, obtaining a pixel value of each pixel point of the intermediate dust image in the color channel;

[0029] For each of the color channels, averaging the pixel values ​​of the plurality of pixels in the color channel to obtain a channel pixel mean of the color channel;

[0030] Performing difference calculation based on the channel pixel mean and the pixel values ​​of the plurality of pixel points in the color channel to obtain a channel pixel standard deviation of the color channel;

[0031] Calculating a global pixel mean based on the channel pixel means of the plurality of color channels;

[0032] Calculating a global pixel standard deviation based on the global pixel mean and the channel pixel means of the plurality of color channels;

[0033] The channel pixel mean, the channel pixel standard deviation, the global pixel mean and the global pixel standard deviation are combined into the channel pixel analysis data.

[0034] In some embodiments, calculating the stretch coefficient of the intermediate dust image to obtain the image stretch coefficient of the intermediate dust image includes:

[0035] For each color channel of the intermediate dust image, obtaining a pixel value of each pixel point of the intermediate dust image in the color channel;

[0036] Filtering out a first pixel value group and a second pixel value group from the plurality of pixel values ​​according to a predetermined ratio, the total number of the pixel points and the size of each pixel value;

[0037] Calculating pixel differences between the first pixel value group and the second pixel value group to obtain a target pixel difference;

[0038] Determining a stretch coefficient of the color channel based on the inverse of the target pixel difference;

[0039] The stretch coefficients of the plurality of color channels are combined into the image stretch coefficient.

[0040] In some embodiments, normalizing pixels of the original dust image to obtain an intermediate dust image includes:

[0041] For the original dust image, obtaining a pixel value of each pixel point of the original dust image;

[0042] Comparing the pixel values ​​of the respective pixel points to obtain the maximum pixel value and the minimum pixel value of the original dust image;

[0043] For each of the pixel points, pixel normalization is performed based on a difference between the maximum pixel value and the minimum pixel value and a difference between the pixel value and the minimum pixel value to obtain a normalized pixel value of the pixel point;

[0044] The intermediate dust image is obtained based on the normalized pixel values ​​of the plurality of pixel points.

[0045] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides an image processing device, the device comprising:

[0046] An acquisition unit, used for acquiring an original dust image;

[0047] A normalization unit, used for performing pixel normalization on the original dust image to obtain an intermediate dust image;

[0048] a calculation unit, configured to calculate a stretch coefficient for the intermediate dust image to obtain an image stretch coefficient for the intermediate dust image, wherein the image stretch coefficient is used to indicate a degree of scaling of a contrast ratio of the intermediate dust image;

[0049] An analysis unit, configured to perform channel pixel analysis on the intermediate dust image to obtain channel pixel analysis data of the intermediate dust image;

[0050] A correction unit, configured to perform color correction on the intermediate dust image based on the channel pixel analysis data and the image stretch coefficient to obtain a corrected dust image;

[0051] The enhancement unit is used to perform visual enhancement processing on the corrected dust image to obtain a target dust image, wherein the clarity of the target dust image is greater than the clarity of the original dust image.

[0052] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the image processing method described in the first aspect is implemented.

[0053] To achieve the above objectives, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the image processing method described in the first aspect.

[0054] The image processing method and device, electronic device and storage medium proposed in the present application obtain an original dust image, perform pixel normalization on the original dust image, and obtain an intermediate dust image, which can convert the pixel values ​​of each pixel point of the original dust image to a smaller numerical range, thereby improving the stability of image processing. Then, the extension coefficient of the intermediate dust image is calculated to obtain the image extension coefficient of the intermediate dust image, and the channel pixel analysis of the intermediate dust image is performed to obtain the channel pixel analysis data of the intermediate dust image, and the image extension coefficient can be used to control the contrast scaling of the intermediate dust image, and realize the pixel analysis of the intermediate dust image from a statistical perspective. Further, based on the channel pixel analysis data and the image extension coefficient, the intermediate dust image is color corrected to obtain a corrected dust image, which can realize color equalization processing of the intermediate dust image and reduce the color deviation degree of the corrected dust image. Finally, the corrected dust image is visually enhanced to obtain a target dust image, which can improve the image clarity and visual perception effect of the target dust image, thereby improving the image quality of the dust image obtained under dust weather conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 is a flowchart of an image processing method provided by an embodiment of the present application;

[0056] Figure 2 yes Figure 1 Flow chart of step S102 in FIG.

[0057] Figure 3 yes Figure 1 Flow chart of step S103 in FIG.

[0058] Figure 4 yes Figure 1 Flow chart of step S104 in FIG.

[0059] Figure 5 yes Figure 1 Flow chart of step S105 in FIG.

[0060] Figure 6 yes Figure 1 Flow chart of step S106 in FIG.

[0061] Figure 7 yes Figure 6 Flowchart of step S602 in FIG.

[0062] Figure 8 is a schematic diagram of the structure of an image processing device provided in an embodiment of the present application;

[0063] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0065] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0066] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0067] At present, various image applications are often involved in various business fields. For example, in the insurance field, objects often insure their physical resources (such as houses and vehicles, etc.). When the insured vehicle is damaged due to natural disasters (such as extreme disasters such as sandstorms), the object can apply for claims processing from the insurance platform and provide supporting materials related to the claims, where the supporting materials include vehicle purchase certificates, vehicle damage videos, and environmental data of the accident. Specifically, when the vehicle is damaged due to sandstorm weather, the environmental data of the accident may include weather images related to sandstorms, as well as related images of vehicles driving in sandstorm weather, etc. This type of image can be collectively referred to as sandstorm images, so that the insurance platform can process compensation based on sandstorm images, etc.

[0068] However, when the clarity of the dust images provided by the object is poor, the insurance platform often finds it difficult to determine the authenticity of the claim event, and it is also difficult to determine the actual extent of damage caused to the vehicle by the sandstorm, which will lead to reduced accuracy of the claim.

[0069] It should be noted that the poor clarity of dust images is often due to the fact that in sandstorm weather, a large number of dust particles suspended in the atmosphere have different degrees of scattering of visible light, causing the images acquired by the camera equipment to become blurred low-quality images. There are often certain differences between dust images and general haze images. In addition to appearing visually blurred, dust images are often accompanied by a certain degree of color shift, which can cause color distortion, halo artifacts and other problems in the image, making the image clarity low.

[0070] Based on this, the embodiments of the present application provide an image processing method, an image processing device, an electronic device and a storage medium, which aim to improve the image clarity of dust images, and thereby improve the image quality of dust images acquired under dust weather conditions.

[0071] The image processing method and device, electronic device and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the image processing method in the embodiments of the present application is described.

[0072] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0073] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0074] The image processing method provided in the embodiment of the present application relates to the fields of financial technology and artificial intelligence technology. The medical image processing method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the image processing method, etc., but is not limited to the above forms.

[0075] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0076] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to the identity or characteristics of the object, such as object information, object behavior data, object historical data, and object location information, the permission or consent of the object will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the personal information of the object, the separate permission or separate consent of the object will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the separate permission or separate consent of the object, the necessary object-related data for the normal operation of the embodiment of the present application will be obtained.

[0077] Figure 1 is an optional flowchart of the image processing method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S106.

[0078] Step S101, obtaining an original dust image;

[0079] Step S102, normalizing the pixels of the original dust image to obtain an intermediate dust image;

[0080] Step S103, calculating the stretch coefficient of the intermediate dust image to obtain the image stretch coefficient of the intermediate dust image;

[0081] Step S104, performing channel pixel analysis on the intermediate dust image to obtain channel pixel analysis data of the intermediate dust image;

[0082] Step S105, performing color correction on the intermediate dust image based on the channel pixel analysis data and the image stretch coefficient to obtain a corrected dust image;

[0083] Step S106 , performing visual enhancement processing on the corrected dust image to obtain a target dust image, wherein the clarity of the target dust image is greater than the clarity of the original dust image.

[0084] In the steps S101 to S106 shown in the embodiment of the present application, by acquiring the original dust image, the original dust image is pixel normalized to obtain the intermediate dust image, and the pixel values ​​of each pixel point of the original dust image can be converted to a smaller numerical range, thereby improving the stability of image processing. Then, the extension coefficient of the intermediate dust image is calculated to obtain the image extension coefficient of the intermediate dust image, and the channel pixel analysis of the intermediate dust image is performed to obtain the channel pixel analysis data of the intermediate dust image, and the image extension coefficient can be used to control the contrast scaling of the intermediate dust image, and realize the pixel analysis of the intermediate dust image from a statistical perspective. Further, based on the channel pixel analysis data and the image extension coefficient, the intermediate dust image is color corrected to obtain the corrected dust image, which can realize the color equalization processing of the intermediate dust image and reduce the color deviation degree of the corrected dust image. Finally, the corrected dust image is visually enhanced to obtain the target dust image, which can improve the image clarity and visual perception effect of the target dust image, thereby improving the image quality of the dust image obtained under dust weather conditions.

[0085] In step S101 of some embodiments, an original dust image is acquired.

[0086] The original sand and dust image refers to an image containing objects such as vehicles. The original sand and dust image can be a multi-perspective image of the insured vehicle of the object driving in sand and dust weather or sandstorm environment, or it can be a multi-perspective image of the damage suffered by the insured vehicle of the object in sand and dust weather or sandstorm environment, without restriction.

[0087] When this embodiment is implemented, since the driving recorder on the target vehicle often records the weather environment in which the vehicle is driving when the target vehicle is driving, it is possible to export video data from the driving recorder of the target vehicle with authorization, capture video frames in the video data, and use the dust image that meets the requirements as the original dust image.

[0088] In addition, when applying for compensation, the subject will also take some images of the damaged vehicle at multiple angles. Therefore, some images containing dusty weather environments can be screened out from the multi-view damaged images of the vehicle as original dust images.

[0089] In step S102 of some embodiments, the original dust image is pixel normalized to obtain an intermediate dust image.

[0090] The intermediate dust image refers to the image corresponding to when the pixel values ​​of each pixel point of the original dust image are normalized to the range of [0,1].

[0091] See also Figure 2 In some embodiments, step S102 may include but is not limited to steps S201 to S204:

[0092] Step S201, for an original dust image, obtaining a pixel value of each pixel point of the original dust image;

[0093] Step S202, comparing the pixel values ​​of each pixel point to obtain the maximum pixel value and the minimum pixel value of the original dust image;

[0094] Step S203, for each pixel point, performing pixel normalization based on the difference between the maximum pixel value and the minimum pixel value, and the difference between the pixel value and the minimum pixel value, to obtain a normalized pixel value of the pixel point;

[0095] Step S204: obtaining an intermediate dust image based on the normalized pixel values ​​of the plurality of pixels.

[0096] Steps S201 to S204 are described in detail below.

[0097] In step S201 of some embodiments, for the original dust image, pixel values ​​at various positions of the original dust image are extracted to obtain pixel values ​​of various pixel points.

[0098] Since the original dust image is often an image in the three-primary color space, the pixel value of a pixel point is often composed of the pixel value components of three color channels (color channel R, color channel G, color channel B). The pixel value of a pixel point can be expressed as (I R , I G , IB ).

[0099] In step S202 of some embodiments, the pixel values ​​of each pixel are compared, and the pixel value of the pixel with the largest pixel value is taken as the maximum pixel value, and the pixel value of the pixel with the largest pixel value is taken as the minimum pixel value.

[0100] In step S203 of some embodiments, for each pixel point, the maximum pixel value and the minimum pixel value are first subtracted, and the difference between the maximum pixel value and the minimum pixel value is obtained by subtracting the minimum pixel value from the maximum pixel value. Next, the pixel value and the minimum pixel value are subtracted, and the difference between the pixel value and the minimum pixel value is obtained by subtracting the minimum pixel value from the pixel value. Finally, the difference between the pixel value and the minimum pixel value is divided by the difference between the maximum pixel value and the minimum pixel value to normalize the pixel value of the pixel point and obtain the normalized pixel value of the pixel point.

[0101] In step S204 of some embodiments, for the original dust image, the pixel value of the pixel point at each position in the original dust image is replaced with the normalized pixel value of the pixel point to achieve overall pixel normalization of the original dust image, thereby obtaining an intermediate dust image.

[0102] It should be noted that the above steps S201 to S204 are performed at the color channel level, that is, the processing process of the above steps S201 to S204 is performed on each color channel of the original dust image, and the pixel normalization results of the pixel point on each color channel are combined into the normalized pixel value of the pixel point.

[0103] For example, for each pixel of the original dust image, a pixel normalization operation is performed on the color channel c, where the color channel c is any one of the three primary color channels RGB, that is, c∈{R,G,B}. First, the pixel value I of each pixel of the original dust image in the color channel c is obtained. c Next, the maximum pixel value is determined from the pixel values ​​of multiple pixels. and pixel minimum Finally, according to the pixel value I of each pixel c , pixel maximum value and pixel minimum Calculate the pixel normalization result of the pixel point. Among them, the pixel normalization result It can be expressed as shown in formula (1):

[0104]

[0105] It can be seen that when the pixel normalization result of the pixel point in the color channel R is calculated Pixel normalization result of color channel G And the pixel normalization result of color channel B After that, the final normalized pixel value of the pixel can be combined

[0106] The advantage of this embodiment is that the original dust image is subjected to image normalization processing in each color channel, and the pixel values ​​of the original dust image in each color channel can be normalized to the range of 0 to 1, and the pixel values ​​of all pixels are scaled to the same scale, which is conducive to pixel comparison. In addition, since the pixel values ​​of all pixels are normalized to a smaller value range, the numerical stability problem caused by too large or too small a value range can be effectively avoided, thereby improving the convenience and accuracy of image processing.

[0107] In step S103 of some embodiments, a stretch coefficient is calculated for the intermediate dust image to obtain an image stretch coefficient of the intermediate dust image.

[0108] The image stretch factor is used to indicate the degree to which the contrast of the intermediate dust image is scaled.

[0109] See also Figure 3 In some embodiments, step S103 may include but is not limited to steps S301 to S305:

[0110] Step S301, for each color channel of the intermediate dust image, obtaining the pixel value of each pixel point of the intermediate dust image in the color channel;

[0111] Step S302, selecting a first pixel value group and a second pixel value group from a plurality of pixel values ​​according to a predetermined ratio, a total number of pixel points and a size of each pixel value;

[0112] Step S303, calculating the pixel difference between the first pixel value group and the second pixel value group to obtain a target pixel difference;

[0113] Step S304, determining a stretch coefficient of a color channel based on the inverse of the target pixel difference;

[0114] Step S305: Combining the stretch coefficients of multiple color channels into an image stretch coefficient.

[0115] Steps S301 to S305 are described in detail below.

[0116] In step S301 of some embodiments, the specific process of step S301 is similar to the above step S201, and will not be described in detail to save space.

[0117] In step S302 of some embodiments, first, in each color channel, the pixels of the intermediate dust image are sorted in ascending order according to the pixel values ​​in the color channel. Then, according to the product of the predetermined ratio and the total number of pixels, the target number is determined in the sorting, the first target number of pixel values ​​in the sorting are taken to form a first pixel value group, and the last target number of pixel values ​​in the sorting are taken to form a second pixel value group.

[0118] In step S303 of some embodiments, first, the multiple pixel values ​​of the first pixel value group are averaged to obtain a first pixel mean value, and the multiple pixel values ​​of the second pixel value group are averaged to obtain a second pixel mean value. Then, a pixel difference is calculated between the first pixel mean value and the second pixel mean value, and the first pixel mean value is subtracted from the second pixel mean value to obtain a target pixel difference.

[0119] In step S304 of some embodiments, the reciprocal of the target pixel difference is taken to obtain the reciprocal of the target pixel difference, and the reciprocal of the target pixel difference is used as the stretch coefficient of the intermediate dust image in the color channel.

[0120] For example, when the predetermined ratio is set to 1%, the smallest pixel value of the 1st percentile and the largest pixel value of the 99th percentile among the multiple pixel values ​​of the intermediate dust image are found according to the total number of pixel points of the intermediate dust image, and the 99th percentile (the largest pixel value) and the 1st percentile (the smallest pixel value) are subtracted to obtain the target pixel difference, and the reciprocal of the target pixel difference is used as the stretch coefficient on the color channel c. The stretch coefficient on the color channel c can be expressed as shown in formula (2):

[0121]

[0122] Among them, λ is the stretch coefficient of color channel c, is the minimum value among the top 1% of pixel values ​​in color channel c, is the maximum value among the last 1% of pixel values ​​in color channel c, Indicates that the calculation of the stretch coefficient is performed on the color channel c.

[0123] When taking the 1st percentile (smallest pixel value) and the 99th percentile (largest pixel value) of the pixel value, it means that the 1% highest and 1% lowest values ​​in the pixel value will be ignored, which can reduce the impact of abnormal pixel values ​​or noise, so that the generated stretch coefficient is generated based on the range between the darkest and brightest pixel values ​​of the color channel of the intermediate dust image.

[0124] In step S305 of some embodiments, the stretch coefficients of multiple color channels are combined to form an array of stretch coefficients, and the array of stretch coefficients is used as the image stretch coefficient to achieve overall adjustment of the pixel contrast of the intermediate dust image by controlling the image stretch coefficient.

[0125] The advantage of this embodiment is that, according to the predetermined ratio, the total number of pixels and the size of each pixel value, a stretch coefficient is generated in each color channel, and multiple stretch coefficients are assembled into the final image stretch coefficient. By setting the predetermined ratio, the calculation error caused by chance can be reduced, and the image stretch coefficient can control the overall adjustment of the pixel contrast of the intermediate dust image, which can effectively reduce the overflow or underflow of the pixel value, and help to protect the image details of the intermediate dust image while enhancing the contrast of the intermediate dust image, reduce the information loss caused by contrast stretching, and thus improve the integrity of the image information of the target dust image finally generated. In addition, each color channel has a corresponding stretch coefficient, which can adjust the contrast of the intermediate dust image with different dynamic ranges (different stretch coefficients) on different color channels for the intermediate dust image, so as to make the intermediate dust image have better color balance and more complete detail information as much as possible after color correction.

[0126] In step S104 of some embodiments, channel pixel analysis is performed on the intermediate dust image to obtain channel pixel analysis data of the intermediate dust image.

[0127] The channel pixel analysis data is used to indicate the overall pixel situation and pixel difference situation of the intermediate dust image in each color channel, and is also used to indicate the overall pixel situation and pixel difference situation of the intermediate dust image.

[0128] See also Figure 4 In some embodiments, step S104 may include but is not limited to steps S401 to S406:

[0129] Step S401, for each color channel of the intermediate dust image, obtaining the pixel value of each pixel point of the intermediate dust image in the color channel;

[0130] Step S402, for each color channel, averaging the pixel values ​​of multiple pixels in the color channel to obtain a channel pixel mean of the color channel;

[0131] Step S403, performing difference calculation based on the channel pixel mean and the pixel values ​​of multiple pixels in the color channel to obtain the channel pixel standard deviation of the color channel;

[0132] Step S404, calculating a global pixel mean based on the channel pixel means of multiple color channels;

[0133] Step S405, calculating a global pixel standard deviation based on a global pixel mean and channel pixel means of multiple color channels;

[0134] Step S406, combining the channel pixel mean, the channel pixel standard deviation, the global pixel mean and the global pixel standard deviation into channel pixel analysis data.

[0135] Steps S401 to S406 are described in detail below.

[0136] In step S401 of some embodiments, the specific process of step S401 is similar to the above step S301, and will not be described in detail to save space.

[0137] In step S402 of some embodiments, first, the pixel points of the intermediate dust image are counted to obtain the total number of pixel points. Then, for each color channel, the pixel values ​​of each pixel point in the color channel are added to obtain the total pixel value. Finally, the total pixel value is divided by the total number of pixel points to obtain the channel pixel mean of the color channel.

[0138] In step S403 of some embodiments, first, for each pixel value, the pixel value of the pixel point in the color channel and the channel pixel mean are subtracted to obtain a subtraction result, and the subtraction result is squared to obtain a pixel square value of a single pixel point. Next, the pixel square values ​​of all pixels in the color channel are averaged to obtain a pixel square mean. Finally, the pixel square mean is squared to obtain a channel pixel standard deviation of the color channel.

[0139] In step S404 of some embodiments, first, the total number of color channels is determined. Then, the channel pixel means of multiple color channels are added to obtain the sum of the channel pixel means. Finally, the sum of the channel pixel means is divided by the total number of color channels to obtain the global pixel mean.

[0140] In step S405 of some embodiments, first, for each color channel, the channel pixel mean of the color channel and the global pixel mean are subtracted to obtain a subtraction result, and the subtraction result is squared to obtain a pixel square value of a single color channel. Next, the pixel square values ​​of all color channels are averaged to obtain a pixel square mean. Finally, the pixel square mean is squared to obtain a global pixel standard deviation.

[0141] In step S406 of some embodiments, the channel pixel mean, the channel pixel standard deviation, the global pixel mean and the global pixel standard deviation are combined into a data set, and all data in the data set are used as channel pixel analysis data.

[0142] The benefit of this embodiment is that, for each color channel, the pixel mean and pixel standard deviation of each pixel point of the intermediate dust image on the color channel are calculated, which can more accurately identify the overall pixel situation and pixel gap situation of the intermediate dust image in each color channel, and realize local pixel analysis of the intermediate dust image. At the same time, for the intermediate dust image, the global pixel mean and global pixel standard deviation are calculated, which can more accurately identify the overall pixel situation and pixel gap situation of the intermediate dust image, and realize overall pixel analysis of the intermediate dust image. Performing pixel analysis on the intermediate dust image at both coarse and fine granularity can improve the comprehensiveness of the pixel analysis of the intermediate dust image, thereby improving the data integrity of the channel pixel analysis data.

[0143] In step S105 of some embodiments, color correction is performed on the intermediate dust image based on the channel pixel analysis data and the image stretch coefficient to obtain a corrected dust image.

[0144] The corrected dust image refers to an image that is closer to normal visual perception and is generated after the intermediate dust image is color-balanced.

[0145] In an embodiment of the present application, the channel pixel analysis data includes the channel pixel mean and channel pixel standard deviation of the intermediate dust image in each color channel, and the global pixel mean and global pixel standard deviation of the intermediate dust image.

[0146] Since the pixel values ​​of the image in each channel often overflow or underflow during the channel stretching process, image information will be lost. Based on this, the embodiment of the present application considers a color correction scheme based on fixing the global pixel mean of the intermediate dust image before color correction to a certain value, which can minimize the risk of image information loss due to overflow. For example, the actual global pixel mean obtained in the above-mentioned channel pixel analysis is replaced by a fixed value of 0.5, so that the value of the global pixel mean used in step S105 is 0.5.

[0147] See also Figure 5 In some embodiments, step S105 may include but is not limited to steps S501 to S505:

[0148] Step S501, for each color channel, obtaining the initial pixel value of each pixel point of the intermediate dust image in the color channel;

[0149] Step S502, for each pixel point, performing difference calculation between the initial pixel value and the channel pixel mean to obtain a pixel difference;

[0150] Step S503, performing increment calculation based on the pixel difference, the image stretch coefficient, and the ratio of the global pixel standard deviation to the channel pixel standard deviation to obtain the pixel value increment of the pixel point in the color channel;

[0151] Step S504, updating the pixel value of the pixel point based on the pixel value increment of each color channel and the global pixel mean value to obtain the target pixel value of the pixel point;

[0152] Step S505 , based on the target pixel values ​​of the plurality of pixels, color correction is performed on the intermediate dust image to obtain a corrected dust image.

[0153] Steps S501 to S505 are described in detail below.

[0154] In step S501 of some embodiments, the specific process of step S501 is similar to the above step S301, and will not be described in detail to save space.

[0155] In step S502 of some embodiments, on each color channel, for each pixel point, a difference calculation is performed between the initial pixel value and the channel pixel mean, and the channel pixel mean is subtracted from the initial pixel value to obtain a pixel difference.

[0156] In step S503 of some embodiments, first, the stretch coefficient corresponding to the color channel is extracted from the image stretch coefficient, and the pixel difference is multiplied by the stretch coefficient corresponding to the color channel to obtain a first product. Then, the global pixel standard deviation is divided by the channel pixel standard deviation to obtain a ratio of the global pixel standard deviation to the channel pixel standard deviation, and the first product and the ratio are multiplied to obtain a pixel value increment of the pixel point in the color channel.

[0157] In step S504 of some embodiments, for each pixel point, first, the pixel increment of each color channel is added to the global pixel mean to obtain the updated pixel value of each color channel. Then, the updated pixel values ​​of each color channel are combined into the target pixel value of the pixel point.

[0158] In step S505 of some embodiments, for the intermediate dust image, the normalized pixel value of the pixel point at each position in the intermediate dust image is replaced with the target pixel value of the pixel point to achieve overall color correction of the intermediate dust image, thereby obtaining a corrected dust image.

[0159] For example, the specific process of color correction on each pixel of the intermediate dust image on the color channel c can be expressed as shown in formula (3):

[0160]

[0161] Among them, I ′c Refers to the updated pixel value of the pixel point on the color channel c, μ is the global pixel mean, which is generally 0.5; λ is the extension coefficient on the color channel; σ is the global pixel standard deviation, is the initial pixel value of the pixel on color channel c (the above pixel normalization result), μ c is the channel pixel mean of the intermediate dust image on color channel c, σ c is the channel pixel standard deviation of the intermediate dust image on color channel c. The above pixel value increment refers to

[0162] The benefit of this embodiment is that, on each color channel, the pixel value of each pixel point on the color channel is fine-tuned, which helps to improve the contrast of the intermediate dust image at a fine granularity. At the same time, it also takes into account that the global pixel mean is taken as a fixed value to reduce the risk of pixel value overflow, and can retain more image detail information when performing color equalization processing on the intermediate dust image, thereby improving the correction accuracy of the corrected dust image, and improving the image quality and image information integrity of the corrected dust image. In addition, the above-mentioned color correction process can also effectively equalize the color deviation of the original dust image, improve the global visual perception of the original dust image, and help improve the image quality of the dust image in overall visual perception.

[0163] In step S106 of some embodiments, visual enhancement processing is performed on the corrected dust image to obtain a target dust image, wherein the clarity of the target dust image is greater than the clarity of the original dust image.

[0164] Visual enhancement is used to adjust the image parameters of the dust correction image in visual perception, where the image parameters include but are not limited to brightness, contrast, etc.

[0165] See also Figure 6 In some embodiments, step S106 includes but is not limited to steps S601 to S603:

[0166] Step S601, projecting the corrected dust image into a preset grayscale image space to obtain a dust grayscale image corresponding to the corrected dust image;

[0167] Step S602, inputting the dust grayscale image into a preset grayscale space model for image enhancement to obtain an enhanced dust image;

[0168] Step S603: Project the enhanced dust image into a target color space to obtain a target dust image.

[0169] Steps S601 to S603 are described in detail below.

[0170] In step S601 of some embodiments, when the corrected dust image is projected into a preset grayscale image space, the pixel components of each pixel point in each color space on the corrected dust image can be weighted to obtain the grayscale value of each pixel point in the grayscale image space, and a dust grayscale image corresponding to the corrected dust image can be generated according to the grayscale value of each pixel point.

[0171] For example, the specific formula for projecting the corrected dust image into the preset grayscale image space can be expressed as shown in formula (4);

[0172] Y=0.299R+0.587G+0.114B Formula (4);

[0173] Among them, Y is the gray value of each pixel of the corrected dust image (RGB color image) in the gray image space (the gray value corresponding to the pixel in the dust gray image), R is the pixel component of each pixel of the corrected dust image in the red color channel; G is the pixel component of each pixel of the corrected dust image in the green color channel; B is the pixel component of each pixel of the corrected dust image in the blue color channel. 0.299, 0.587 and 0.114 are the weighting coefficients of different color channels.

[0174] In step S602 of some embodiments, the preset grayscale space model is a neural network model that is obtained by training a lightweight neural network based on a public haze image dataset and can enhance the visual effect of the input image. The lightweight neural network includes but is not limited to a convolutional neural network.

[0175] To save space, the specific process of inputting the dust grayscale image into the preset grayscale space model for image enhancement in the embodiment of the present disclosure will be described in detail below. No further description will be given here.

[0176] In step S603 of some embodiments, the specific process of step S603 is similar to the specific process of step S601. The specific process of step S603 is the inverse process of the specific process of step S601, and will not be described in detail to save space.

[0177] The advantage of this embodiment is that after color correction, it also takes into account the need to restore the image detail information that is missing in the corrected dust image. After the corrected dust image is projected into a preset grayscale image space and converted into a dust grayscale image, a lightweight grayscale space model is introduced to achieve image enhancement of the corrected dust image in the grayscale space. After enhancement, the enhanced dust image is projected back to the original color space, which can achieve effective recovery of local detail information in the corrected dust image, which is beneficial to improving the integrity of the image information of the generated target dust image and improving the visual clarity of the target dust image.

[0178] See also Figure 7 In some embodiments, step S602 may include but is not limited to steps S701 to S703:

[0179] Step S701, performing histogram analysis on the dust grayscale image based on the grayscale space model to obtain the image mean and image variance of the dust grayscale image;

[0180] Step S702, performing brightness equalization on the dust grayscale image based on the image mean and the image variance to obtain a balanced grayscale image;

[0181] Step S703: performing enhancement processing on the balanced grayscale image based on a preset mapping function to obtain an enhanced dust image.

[0182] Steps S701 to S703 are described in detail below.

[0183] In step S701 of some embodiments, first, a histogram of the dust grayscale image is generated by a grayscale space model, and a preset function (e.g., cv2.cal cHist function) is called to calculate the histogram according to a preset histogram size (e.g., the histogram size is set to 256 grayscale levels) and a grayscale value range (e.g., the grayscale value range is set to 0-255), and a histogram corresponding to the dust grayscale image is drawn, wherein the histogram can be used to reflect the brightness distribution of the dust grayscale image. Then, according to the histogram, the grayscale values ​​of each pixel of the dust grayscale image are averaged to obtain the image mean of the dust grayscale image. Finally, according to the image mean of the dust grayscale image and the grayscale values ​​of each pixel, the image variance of the dust grayscale image is calculated. Among them, the calculation process of the image variance is similar to the specific process of calculating the channel pixel standard deviation of the color channel mentioned above. In order to save space, it will not be repeated.

[0184] In step S702 of some embodiments, when the brightness of the dust grayscale image is balanced based on the image mean and image variance, with authorization, a preset cumulative distribution function (CDF) is called, and the image mean and image variance are input into the cumulative distribution function to balance the brightness of the dust grayscale image to obtain a balanced grayscale image. This method can increase the overall brightness of the dust grayscale image when the dust grayscale image is overall dark, and reduce the overall brightness of the dust grayscale image when the dust grayscale image is overall bright.

[0185] In step S703 of some embodiments, the preset mapping function may be an exponential function or a logarithmic function, without limitation. Specifically, based on the preset mapping function, the high brightness area in the balanced grayscale image is compressed, and the low brightness area in the balanced grayscale image is expanded to obtain an enhanced dust image, thereby enhancing the local contrast of the balanced grayscale image to enhance the image details and texture of the balanced grayscale image.

[0186] The advantage of this embodiment is that when visually enhancing the corrected dust image, the grayscale space model is used to perform feature enhancement in multiple dimensions such as brightness equalization, contrast enhancement, and detail enhancement on the grayscale dust image corresponding to the corrected dust image in a preset grayscale space. This method can more comprehensively restore the local detail information missing in the corrected grayscale image, thereby improving the image clarity and visual effect of the target dust image finally generated, and further improving the image quality of the dust image acquired under dust weather conditions.

[0187] See also Figure 8 The embodiment of the present application further provides an image processing device, which can implement the above-mentioned image processing method, and the device includes:

[0188] An acquisition unit 801 is used to acquire an original dust image;

[0189] A normalization unit 802 is used to perform pixel normalization on the original dust image to obtain an intermediate dust image;

[0190] A calculation unit 803 is used to calculate a stretch coefficient for the intermediate dust image to obtain an image stretch coefficient for the intermediate dust image, wherein the image stretch coefficient is used to indicate a degree of scaling of the contrast of the intermediate dust image;

[0191] The analysis unit 804 is used to perform channel pixel analysis on the intermediate dust image to obtain channel pixel analysis data of the intermediate dust image;

[0192] The correction unit 805 is used to perform color correction on the intermediate dust image based on the channel pixel analysis data and the image stretch coefficient to obtain a corrected dust image;

[0193] The enhancement unit 806 is configured to perform visual enhancement processing on the corrected dust image to obtain a target dust image, wherein the clarity of the target dust image is greater than that of the original dust image.

[0194] In some embodiments, the normalization unit 802 is used to:

[0195] For the original dust image, obtain the pixel value of each pixel point of the original dust image;

[0196] Compare the pixel values ​​of each pixel point to obtain the maximum pixel value and the minimum pixel value of the original dust image;

[0197] For each pixel point, pixel normalization is performed based on the difference between the maximum pixel value and the minimum pixel value, and the difference between the pixel value and the minimum pixel value, to obtain a normalized pixel value of the pixel point;

[0198] Based on the normalized pixel values ​​of multiple pixels, an intermediate dust image is obtained.

[0199] In some embodiments, the computing unit 803 is used to:

[0200] For each color channel of the intermediate dust image, a pixel value of each pixel point of the intermediate dust image in the color channel is obtained;

[0201] Screening out a first pixel value group and a second pixel value group from a plurality of pixel values ​​according to a predetermined ratio, a total number of pixel points, and a size of each pixel value;

[0202] Calculating pixel differences between the first pixel value group and the second pixel value group to obtain a target pixel difference;

[0203] Determine the stretch coefficient of the color channel based on the inverse of the target pixel difference;

[0204] Combine the stretch factors of multiple color channels into an image stretch factor.

[0205] In some embodiments, the analysis unit 804 is used to:

[0206] For each color channel of the intermediate dust image, a pixel value of each pixel point of the intermediate dust image in the color channel is obtained;

[0207] For each color channel, the pixel values ​​of multiple pixels in the color channel are averaged to obtain the channel pixel mean of the color channel;

[0208] Based on the channel pixel mean and the pixel values ​​of multiple pixels in the color channel, the channel pixel standard deviation of the color channel is obtained;

[0209] Calculate the global pixel mean based on the channel pixel means of multiple color channels;

[0210] Calculate the global pixel standard deviation based on the global pixel mean and the channel pixel means of multiple color channels;

[0211] The channel pixel mean, channel pixel standard deviation, global pixel mean and global pixel standard deviation are combined into channel pixel analysis data.

[0212] In some embodiments, the channel pixel analysis data includes the channel pixel mean and channel pixel standard deviation of the intermediate dust image in each color channel, and the global pixel mean and global pixel standard deviation of the intermediate dust image;

[0213] The correction unit 805 is used for:

[0214] For each color channel, the initial pixel value of each pixel point of the intermediate dust image in the color channel is obtained;

[0215] For each pixel point, the difference between the initial pixel value and the channel pixel mean is calculated to obtain the pixel difference;

[0216] An incremental calculation is performed based on the pixel difference, the image stretch coefficient, and the ratio of the global pixel standard deviation to the channel pixel standard deviation to obtain the pixel value increment of the pixel point in the color channel;

[0217] The pixel value of the pixel point is updated based on the pixel value increment of each color channel and the global pixel mean value to obtain the target pixel value of the pixel point;

[0218] Based on the target pixel values ​​of multiple pixels, the intermediate dust image is color corrected to obtain a corrected dust image.

[0219] In some embodiments, the enhancement unit 806 is used to:

[0220] The corrected dust image is projected into a preset grayscale image space to obtain a dust grayscale image corresponding to the corrected dust image;

[0221] The dust grayscale image is input into a preset grayscale space model for image enhancement to obtain an enhanced dust image;

[0222] The enhanced dust image is projected into the target color space to obtain the target dust image.

[0223] In some embodiments, the dust grayscale image is input into a preset grayscale space model for image enhancement to obtain an enhanced dust image, including:

[0224] The histogram analysis of the dust grayscale image is performed based on the grayscale space model to obtain the image mean and image variance of the dust grayscale image.

[0225] The brightness of the dust grayscale image is balanced based on the image mean and image variance to obtain a balanced grayscale image;

[0226] The balanced grayscale image is enhanced based on a preset mapping function to obtain an enhanced dust image.

[0227] The specific implementation of the image processing device is basically the same as the specific implementation of the above-mentioned image processing method, and will not be repeated here.

[0228] The embodiment of the present application also provides an electronic device, the electronic device comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, and the program is executed by the processor to realize the above-mentioned image processing method. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0229] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0230] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.

[0231] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the image processing method of the embodiment of this application;

[0232] Input / output interface 903, used to implement information input and output;

[0233] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WI FI, Bluetooth, etc.);

[0234] A bus 905 that transmits information between the various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);

[0235] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .

[0236] An embodiment of the present application also provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the above-mentioned image processing method.

[0237] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0238] The image processing method, image processing device, electronic device and computer-readable storage medium provided by the embodiments of the present application obtain an original dust image, perform pixel normalization on the original dust image, and obtain an intermediate dust image, which can convert the pixel values ​​of each pixel point of the original dust image to a smaller numerical range, thereby improving the stability of image processing. Then, the stretch coefficient is calculated for the intermediate dust image to obtain the image stretch coefficient of the intermediate dust image, and the channel pixel analysis is performed on the intermediate dust image to obtain the channel pixel analysis data of the intermediate dust image. The image stretch coefficient can be used to control the contrast scaling of the intermediate dust image, and the pixel analysis of the intermediate dust image can be realized from a statistical perspective. Furthermore, based on the channel pixel analysis data and the image stretch coefficient, the intermediate dust image is color corrected to obtain a corrected dust image, which can realize color equalization processing of the intermediate dust image and reduce the degree of color deviation of the corrected dust image. Finally, the corrected dust image is visually enhanced to obtain the target dust image, which can improve the image clarity and visual perception effect of the target dust image, thereby improving the image quality of the dust image obtained under dust weather conditions.

[0239] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0240] It can be understood by those skilled in the art that Figure 1-7 The technical solutions shown in the figure do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than those shown in the figure, or a combination of certain steps, or different steps.

[0241] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0242] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0243] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0244] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0245] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0246] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0247] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0248] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0249] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. An image processing method, characterized in that: The image processing method comprises: Get the original dust image; Normalizing the pixels of the original dust image to obtain an intermediate dust image; Calculating a stretch coefficient for the intermediate dust image to obtain an image stretch coefficient for the intermediate dust image, wherein the image stretch coefficient is used to indicate a degree of scaling of the contrast of the intermediate dust image; Performing channel pixel analysis on the intermediate dust image to obtain channel pixel analysis data of the intermediate dust image; Based on the channel pixel analysis data and the image stretch coefficient, color correction is performed on the intermediate dust image to obtain a corrected dust image; The corrected dust image is subjected to visual enhancement processing to obtain a target dust image, wherein the clarity of the target dust image is greater than the clarity of the original dust image.

2. The method according to claim 1, characterized in that The channel pixel analysis data includes the channel pixel mean and channel pixel standard deviation of the intermediate dust image in each color channel, and the global pixel mean and global pixel standard deviation of the intermediate dust image; The color correction of the intermediate dust image based on the channel pixel analysis data and the image stretch coefficient to obtain a corrected dust image includes: For each of the color channels, obtaining an initial pixel value of each pixel point of the intermediate dust image in the color channel; For each pixel point, performing a difference calculation between the initial pixel value and the channel pixel mean to obtain a pixel difference; Performing an increment calculation based on the pixel difference, the image stretch coefficient, and the ratio of the global pixel standard deviation to the channel pixel standard deviation to obtain a pixel value increment of the pixel point in the color channel; Update the pixel value of the pixel point based on the pixel value increment of each color channel and the global pixel mean value to obtain a target pixel value of the pixel point; Based on the target pixel values ​​of the plurality of pixel points, color correction is performed on the intermediate dust image to obtain the corrected dust image.

3. The method according to claim 1, characterized in that The performing visual enhancement processing on the corrected dust image to obtain a target dust image includes: Projecting the corrected dust image to a preset grayscale image space to obtain a dust grayscale image corresponding to the corrected dust image; Inputting the dust grayscale image into a preset grayscale space model for image enhancement to obtain an enhanced dust image; The enhanced dust image is projected into a target color space to obtain the target dust image.

4. The method according to claim 3, characterized in that The step of inputting the dust grayscale image into a preset grayscale space model for image enhancement to obtain an enhanced dust image includes: Performing a histogram analysis on the dust grayscale image based on the grayscale space model to obtain an image mean and an image variance of the dust grayscale image; Performing brightness equalization on the dust grayscale image based on the image mean and the image variance to obtain a balanced grayscale image; The balanced grayscale image is enhanced based on a preset mapping function to obtain the enhanced dust image.

5. The method according to claim 1, characterized in that The performing channel pixel analysis on the intermediate dust image to obtain channel pixel analysis data of the intermediate dust image includes: For each color channel of the intermediate dust image, obtaining a pixel value of each pixel point of the intermediate dust image in the color channel; For each of the color channels, averaging the pixel values ​​of the plurality of pixels in the color channel to obtain a channel pixel mean of the color channel; Performing difference calculation based on the channel pixel mean and the pixel values ​​of the plurality of pixel points in the color channel to obtain a channel pixel standard deviation of the color channel; Calculating a global pixel mean based on the channel pixel means of the plurality of color channels; Calculating a global pixel standard deviation based on the global pixel mean and the channel pixel means of the plurality of color channels; The channel pixel mean, the channel pixel standard deviation, the global pixel mean and the global pixel standard deviation are combined into the channel pixel analysis data.

6. The method according to claim 1, characterized in that The step of calculating the stretch coefficient of the intermediate dust image to obtain the image stretch coefficient of the intermediate dust image includes: For each color channel of the intermediate dust image, obtaining a pixel value of each pixel point of the intermediate dust image in the color channel; Filtering out a first pixel value group and a second pixel value group from the plurality of pixel values ​​according to a predetermined ratio, the total number of the pixel points and the size of each pixel value; Calculating pixel differences between the first pixel value group and the second pixel value group to obtain a target pixel difference; Determining a stretch coefficient of the color channel based on the inverse of the target pixel difference; The stretch coefficients of the plurality of color channels are combined into the image stretch coefficient.

7. The method according to any one of claims 1 to 6, characterized in that: The step of normalizing pixels of the original dust image to obtain an intermediate dust image includes: For the original dust image, obtaining a pixel value of each pixel point of the original dust image; Comparing the pixel values ​​of the respective pixel points to obtain the maximum pixel value and the minimum pixel value of the original dust image; For each of the pixel points, pixel normalization is performed based on a difference between the maximum pixel value and the minimum pixel value and a difference between the pixel value and the minimum pixel value to obtain a normalized pixel value of the pixel point; The intermediate dust image is obtained based on the normalized pixel values ​​of the plurality of pixel points.

8. An image processing device, characterized in that: The image processing device comprises: An acquisition unit, used for acquiring an original dust image; A normalization unit, used for performing pixel normalization on the original dust image to obtain an intermediate dust image; a calculation unit, configured to calculate a stretch coefficient for the intermediate dust image to obtain an image stretch coefficient for the intermediate dust image, wherein the image stretch coefficient is used to indicate a degree of scaling of a contrast ratio of the intermediate dust image; An analysis unit, configured to perform channel pixel analysis on the intermediate dust image to obtain channel pixel analysis data of the intermediate dust image; A correction unit, configured to perform color correction on the intermediate dust image based on the channel pixel analysis data and the image stretch coefficient to obtain a corrected dust image; The enhancement unit is used to perform visual enhancement processing on the corrected dust image to obtain a target dust image, wherein the clarity of the target dust image is greater than the clarity of the original dust image.

9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the image processing method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the image processing method according to any one of claims 1 to 7 is implemented.