Image processing methods, apparatus, computing devices, and readable storage media
By identifying exposure and color cast anomalies in the LAB space of an image and using a deep learning model for correction, the problem of image detail loss and manual intervention in existing technologies is solved, achieving intelligent and efficient image processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-09
- Publication Date
- 2026-04-03
AI Technical Summary
Existing image processing technologies cannot effectively preserve image details on automotive platforms, and are greatly affected by training samples and human intervention, failing to simultaneously process other details in the image.
By using the brightness and color contrast features in the LAB space of an image, a deep learning model is used to determine whether the image has exposure anomalies and color cast anomalies, and to perform corresponding corrections, including exposure correction and color cast correction.
It enables intelligent image processing without manual annotation and intervention, improving the efficiency of image correction, especially the efficiency of large-scale image processing.
Smart Images

Figure CN116416155B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet technology, and in particular to an image processing method, apparatus, computing device, and readable storage medium. Background Technology
[0002] In recent years, with the development of artificial intelligence, image processing technology has become increasingly mature, including portrait beautification technology, style transfer technology, and texture mapping. On platforms such as short videos, entertainment, and fast-moving consumer goods (FMCG), fun and personalized image enhancements are often well-received. However, these platforms typically focus on faces or body areas, or enhance images by introducing texture mapping techniques. Even for images other than portraits, such as natural images, current image enhancement methods focus on making the image more aesthetically pleasing rather than preserving the image's original information, which can lead to image distortion.
[0003] For automotive platforms, the purpose is to display detailed vehicle information. However, excessive color correction and enhancement can lead to a loss of image detail. Existing image processing solutions include: Solution 1: Based on the user-selected texture style, using spatial geometric relationships, an asynchronous texture algorithm synthesizes the car image to be enhanced and the target style. The drawback of Solution 1 is its inability to retouch image details. Solution 2: Extracting features from training and images to be corrected, training a machine learning model to obtain a color correction model, and correcting color casts. The drawback of Solution 2 is that the image processing results are significantly affected by the training samples. Solution 3: Collecting sample images, manually adjusting brightness and contrast, and recording the results. The collected samples are then manually categorized into environmental types (shadow type, highlight type, etc.). After categorizing the samples, a deep learning model is trained, and a similarity analysis is performed between the environmental type of the image to be processed and the environmental types in the sample library. The adjustment parameters from the sample library are then applied to the image to be processed. The drawback of Solution 3 is that the model is limited by the collected samples, requires extensive manual assistance, and cannot simultaneously address other details in the image.
[0004] Therefore, the present invention provides an image processing scheme to solve the problems in the prior art. Summary of the Invention
[0005] Therefore, the present invention provides an image processing method, apparatus, computing device, and readable storage medium to solve or at least alleviate the problems mentioned above.
[0006] According to a first aspect of the present invention, an image processing method is provided, the method comprising: determining whether the image has an exposure abnormality based on brightness features in the LAB space of the image; if the image has an exposure abnormality, performing exposure correction on the image with the exposure abnormality using a first deep learning model; determining whether the image has a color cast abnormality based on color contrast features in the LAB space of the image; if the image has a color cast abnormality, performing color cast correction on the image with the color cast abnormality using a second deep learning model.
[0007] Optionally, in the image processing method according to the present invention, determining whether the image has an exposure abnormality based on the brightness features in the Lab space of the image includes: performing channel separation on the LAB space of the image to obtain a brightness channel array of the image; if the mean value of the brightness channel array of the image is less than the average brightness threshold, and the maximum value of the brightness channel array of the image is less than the first maximum brightness threshold, or the maximum value of the brightness channel array of the image is equal to the second maximum brightness threshold, then the image has an exposure abnormality.
[0008] Optionally, in the image processing method according to the present invention, the average brightness threshold, the first maximum brightness threshold, and the second maximum brightness threshold are obtained by: acquiring a first dataset including images requiring illumination adjustment and a second dataset including images not requiring illumination adjustment; acquiring a first set including brightness channel arrays of the first dataset and a second set including brightness channel arrays of the second dataset; acquiring a first maximum brightness array and a first average brightness array of the first set, and a second maximum brightness array and a second average brightness array of the second set; performing cluster analysis on the first maximum brightness array, the first average brightness array, the second maximum brightness array, and the second average brightness array to obtain the average brightness threshold, the first maximum brightness threshold, and the second maximum brightness threshold.
[0009] Optionally, in the image processing method according to the present invention, the first deep learning model is obtained by: acquiring a first test image and establishing a first training set by performing a first data augmentation process on the first test image; performing data preprocessing on the first training set to obtain a Laplacian pyramid set and a truth database; and training a first U-Net network model based on the Laplacian pyramid set and the truth database to obtain an optimal model as the first deep learning model.
[0010] Optionally, in the image processing method according to the present invention, data preprocessing of the first training set includes: calculating the Laplacian pyramid for each image data in the first training set to obtain a Laplacian pyramid set corresponding to each image data; and downsampling each image data in the first training set to obtain a truth database.
[0011] Optionally, in the image processing method according to the present invention, training a first U-Net network model based on the Laplacian pyramid set and the truth database includes: inputting the Laplacian pyramid set and the truth database into the first U-Net network model for encoding and decoding to obtain an output image; and optimizing the first U-Net network model using a loss function between the output image and the truth database.
[0012] Optionally, in the image processing method according to the present invention, determining whether the image has a color cast anomaly based on the color contrast features in the Lab space of the image includes: performing channel separation on the LAB space of the image to obtain a first color contrast dimension array and a second color contrast dimension array of the image; calculating a first one-dimensional histogram of the image based on the first color contrast dimension array, and calculating a first color mean of the first one-dimensional histogram; calculating a second one-dimensional histogram of the image based on the second color contrast dimension array, and calculating a second color mean of the second one-dimensional histogram; calculating the difference between the image's single chromaticity and the first color mean, and the second color mean, based on the first color mean and the second color mean; calculating the chromaticity average difference value of the image based on the variance of the difference; calculating the color cast value of the image based on the first color mean, the second color mean, and the chromaticity average difference value; if the color cast value of the image is greater than a color cast threshold, then the image has a color cast anomaly.
[0013] Optionally, in the image processing method according to the present invention, the second deep learning model is obtained by: acquiring a second test image and establishing a second training set by performing a second data augmentation process on the second test image, the second training set including the augmented color cast adjustment image, the correction image, the indoor color cast image, and the outdoor color cast image; inputting the color cast adjustment image into the encoder of the second U-Net network model for encoding representation to obtain the encoding representation result; inputting the encoding representation result into the three decoders of the second U-Net network model respectively to obtain three decoded images; calculating the loss function between each decoded image and the correction image, the indoor color cast image, and the outdoor color cast image respectively, and optimizing the corresponding second U-Net network model to obtain an automatic correction model, an indoor color cast correction model, and an outdoor color cast correction model.
[0014] Optionally, in the image processing method according to the present invention, color correction is performed on the image with color cast anomaly using a second deep learning model, including: color correction is performed on the image with color cast anomaly using the automatic correction model, the indoor color cast correction model and the outdoor color cast correction model to obtain an automatic correction image, an indoor correction image and an outdoor correction image.
[0015] Optionally, in the image processing method according to the present invention, correcting an image with color cast anomalies further includes: obtaining a color temperature value to be adjusted; and calculating a correction image corresponding to the color temperature value to be adjusted based on the color temperature value to be adjusted, an indoor correction image, and an outdoor correction image.
[0016] Optionally, the image processing method according to the present invention further includes: if the long side of the image is greater than a predetermined value, then the image is scaled down proportionally until the long side of the image is equal to the predetermined value, so as to perform color cast correction on the scaled-down image.
[0017] Optionally, in the image processing method according to the present invention, after correcting the color cast of the image with color cast anomalies, the method further includes cropping the size of the color-corrected image.
[0018] Optionally, in the image processing method according to the present invention, the first data enhancement processing includes: overexposure or underexposure processing.
[0019] Optionally, in the image processing method according to the present invention, the second data enhancement process includes: adjusting the color cast value.
[0020] Optionally, in the image processing method according to the present invention, the image is an image with a car as the main subject.
[0021] According to a second aspect of the present invention, an image processing apparatus is provided, comprising: an exposure detection module adapted to determine whether an image has an exposure abnormality based on brightness features in the Lab space of the image; an exposure correction module adapted to perform exposure correction on the image with exposure abnormality using a first deep learning model when the image has an exposure abnormality; a color cast detection module adapted to determine whether the image has a color cast abnormality based on color contrast features in the Lab space of the image; and a color cast correction module adapted to perform color cast correction on the image with color cast abnormality using a second deep learning model when the image has a color cast abnormality.
[0022] Optionally, the image processing apparatus according to the present invention further includes: an image cropping module adapted to crop the size of the color-corrected image.
[0023] According to a third aspect of the present invention, a computing device is provided, comprising: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions including instructions for performing the methods described above.
[0024] According to a fourth aspect of the present invention, a readable storage medium storing program instructions is provided, which, when read and executed by a computing device, causes the computing device to perform the method described above.
[0025] The technical solution of this invention determines whether an image has exposure anomalies by using brightness features in the LAB space and whether it has color cast anomalies by using color contrast features in the LAB space. This eliminates the need for manual annotation and intervention, allowing for the determination of whether an image requires processing. For images with exposure anomalies, a first deep learning model corrects the exposure; for images with color cast anomalies, a second deep learning model corrects the color cast. This provides an intelligent image processing workflow, improving correction efficiency, especially for processing large batches of images, significantly enhancing image correction efficiency.
[0026] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0027] To achieve the foregoing and related objectives, certain illustrative aspects are described herein in conjunction with the following description and accompanying drawings. These aspects indicate various ways in which the principles disclosed herein may be practiced, and all aspects and their equivalents are intended to fall within the scope of the claimed subject matter. The foregoing and other objectives, features, and advantages of this disclosure will become more apparent from the following detailed description taken in conjunction with the accompanying drawings. Throughout this disclosure, the same reference numerals generally refer to the same parts or elements.
[0028] Figure 1 A block diagram of the physical components (i.e., hardware) of the computing device 100 is shown;
[0029] Figure 2 A flowchart of an image processing method 200 according to an embodiment of the present invention is shown;
[0030] Figure 3 A schematic diagram of a data preprocessing procedure according to an embodiment of the present invention is shown;
[0031] Figure 4A schematic diagram illustrating the training of a first deep learning model according to an embodiment of the present invention is shown;
[0032] Figure 5 A schematic diagram of a second deep learning model according to an embodiment of the present invention is shown;
[0033] Figure 6 A schematic diagram of an image processing apparatus 600 according to an embodiment of the present invention is shown;
[0034] Figure 7 A flowchart illustrating an image processing method according to another embodiment of the present invention is shown. Detailed Implementation
[0035] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0036] Figure 1 A block diagram of the physical components (i.e., hardware) of a computing device 100 is shown. In a basic configuration, the computing device 100 includes at least one processing unit 102 and a system memory 104. According to one aspect, depending on the configuration and type of the computing device, the processing unit 102 may be implemented as a processor. The system memory 104 includes, but is not limited to, volatile memory (e.g., random access memory), non-volatile memory (e.g., read-only memory), flash memory, or any combination of such memories. According to one aspect, the system memory 104 includes an operating system 105 and a program module 106, the program module 106 including an image processing device 600 configured to perform the image processing method 200 of the present invention.
[0037] According to one aspect, operating system 105 is, for example, suitable for controlling the operation of computing device 100. Furthermore, examples are practiced in conjunction with graphics libraries, other operating systems, or any other applications, and are not limited to any particular application or system. Figure 1 The basic configuration is illustrated by the components within the dashed lines 108. According to one aspect, the computing device 100 has additional features or functions. For example, according to one aspect, the computing device 100 includes additional data storage devices (removable and / or non-removable), such as disks, optical discs, or magnetic tapes. This additional storage... Figure 1 The image is shown by removable storage device 109 and non-removable storage device 110.
[0038] As stated above, according to one aspect, a program module is stored in system memory 104. According to one aspect, the program module may include one or more applications. The present invention does not limit the type of application; for example, applications may include: email and contact applications, word processing applications, spreadsheet applications, database applications, slideshow applications, drawing or computer-aided applications, web browser applications, etc.
[0039] According to one aspect, examples can be practiced on circuits including discrete electronic components, packaged or integrated electronic chips containing logic gates, circuits utilizing microprocessors, or on a single chip containing electronic components or a microprocessor. For example, it can be practiced via wherein... Figure 1 Each or many of the components shown can be implemented as an example by integrating a System-on-a-Chip (SOC) on a single integrated circuit. According to one aspect, such an SOC device may include one or more processing units, graphics units, communication units, system virtualization units, and various application functions, all integrated (or “burned in”) as a single integrated circuit onto a chip substrate. When operating via the SOC, the functions described herein can be operated via dedicated logic integrated on a single integrated circuit (chip) with other components of the computing device 100. Embodiments of the invention can also be implemented using other techniques capable of performing logical operations (e.g., AND, OR, and NOT), including but not limited to mechanical, optical, fluid, and quantum technologies. Additionally, embodiments of the invention can be implemented within a general-purpose computer or in any other circuit or system.
[0040] According to one aspect, computing device 100 may also have one or more input devices 112, such as a keyboard, mouse, pen, voice input device, touch input device, etc. It may also include output devices 114, such as a display, speaker, printer, etc. The foregoing devices are examples and other devices may also be used. Computing device 100 may include one or more communication connections 116 that allow communication with other computing devices 118. Examples of suitable communication connections 116 include, but are not limited to: RF transmitter, receiver and / or transceiver circuitry; Universal Serial Bus (USB), parallel and / or serial ports.
[0041] As used herein, the term computer-readable medium includes computer storage medium. Computer storage medium can include volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information (e.g., computer-readable instructions, data structures, or program modules). System memory 104, removable storage device 109, and non-removable storage device 110 are examples of computer storage media (i.e., memory storage). Computer storage media can include random access memory (RAM), read-only memory (ROM), electrically erasable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical storage, magnetic tape, magnetic tape, disk storage or other magnetic storage devices, or any other article of manufacture that can be used to store information and is accessible by computer device 100. According to one aspect, any such computer storage medium can be part of computing device 100. Computer storage media does not include carrier waves or other transmitted data signals.
[0042] According to one aspect, a communication medium is implemented by computer-readable instructions, data structures, program modules, or other data in a modulated data signal (e.g., a carrier wave or other transmission mechanism), and includes any information transmission medium. According to one aspect, the term "modulated data signal" describes a signal having one or more sets of characteristics or altered in a manner that encodes information in the signal. By way of example and not limitation, a communication medium includes wired media such as wired networks or direct wired connections, and wireless media such as acoustic, radio frequency (RF), infrared, and other wireless media.
[0043] In some embodiments of the present invention, the computing device 100 includes one or more processors and one or more readable storage media storing program instructions. When the program instructions are configured to be executed by one or more processors, the computing device causes the computing device to perform the image processing method of the embodiments of the present invention.
[0044] Figure 2 A flowchart of an image processing method 200 according to an embodiment of the present invention is shown. Method 200 is adapted to be executed in a computing device (e.g., the aforementioned computing device 100). Figure 2 As shown, method 200 begins with step 210.
[0045] In step 210, the presence of exposure anomalies in the image is determined by the brightness characteristics in the LAB space of the image.
[0046] According to an embodiment of the present invention, the LAB space of the image is separated into channels to obtain the brightness channel array of the image.
[0047] Specifically, the image is read in RGB format to obtain an RGB image. Then, the RGB image is converted to a LAB image. Channel separation is performed on the LAB image to obtain the luminance channel (L channel) corresponding to the luminance channel, the first color-complementary channel (A channel) corresponding to the first color-complementary dimension array, and the second color-complementary channel (B channel) corresponding to the second color-complementary dimension array. The arrays corresponding to the luminance channel, the first color-complementary channel, and the second color-complementary channel are two-dimensional arrays. Optionally, the image is converted from RGB format to LAB format using a conversion formula between RGB and LAB spaces.
[0048] Since the luminance channels of an image can reflect the lighting environment information, the presence of exposure anomalies can be determined based on the obtained luminance channel array. In some embodiments, if the mean value of the luminance channel array is less than the average luminance threshold and the maximum value is less than a first maximum luminance threshold, or if the maximum value is equal to a second maximum luminance threshold, then the image has an exposure anomaly. Specifically, if the mean value of the luminance channel array is less than the average luminance threshold and the maximum value is less than the first maximum luminance threshold, the image is too dark and belongs to a shadow environment. If the maximum value is equal to the second maximum luminance threshold, the image is overexposed and belongs to a highlight environment. In other cases, the image is not overexposed and no processing is required.
[0049] The average brightness threshold, the first maximum brightness threshold, and the second maximum brightness threshold can be obtained in the following way:
[0050] Step 1: Collect two datasets, including the first dataset of images whose lighting needs to be adjusted, denoted as D1 = {I 11 I 12 , ..., I 1n}, and a second dataset including images that do not require lighting adjustment, denoted as D2={I 21 I 22 , ..., I 2n Then, each image in the first and second datasets is converted to LAB space format, and channel separation is performed to obtain the luminance channel array for each image. This yields the first set of luminance channel arrays including those from the first dataset, denoted as LD1 = {l...} 11 , l 12 , ..., l 1n} and a second set including the luminance channel arrays of the second dataset, denoted as LD2={l 21 , l 22 , ..., l 2n}
[0051] Step 2: For the first set and the second set (i.e., LD) i,i=1,2 Each element l in ) ij Calculate the maximum brightness and average brightness to obtain the first maximum brightness array of the first set, denoted as maxLD1, and the first average brightness array, denoted as meanLD1; the second maximum brightness array of the second set, denoted as maxLD2, and the second average brightness array, denoted as meanLD2.
[0052] in, This represents the average brightness of the nth element in the first set. maxLD1 = {M 11 M 12 M 1n}, M 1n This represents the maximum brightness of the nth element in the first set. This represents the average brightness of the nth element in the second set. maxLD2={M 21 M 22 M 2n}, M 2n This represents the maximum brightness of the nth element in the second set.
[0053] Step 3: Perform cluster analysis on the first maximum brightness array, the first average brightness array, the second maximum brightness array, and the second average brightness array. Analyze the differences in the distribution ranges of the first average brightness array and the second average brightness array, as well as the differences in the distribution ranges of the first maximum brightness array and the second maximum brightness array, to determine the lighting environment and obtain the average brightness threshold, the first maximum brightness threshold, and the second maximum brightness threshold.
[0054] Optionally, the average brightness threshold can be determined as the mean of the second average brightness array, or as a value between the mean of the first average brightness array and the mean of the second average brightness array. The first maximum brightness threshold can be determined as the value corresponding to the category with a smaller value (e.g., less than the second maximum brightness threshold) obtained after cluster analysis of the first maximum brightness array, or as the value corresponding to the category with the smallest value. The second maximum brightness threshold can be determined as the value corresponding to the category with a larger value (e.g., greater than the second maximum brightness threshold) obtained after cluster analysis of the first maximum brightness array, or as the value corresponding to the category with the largest value. For example, the average brightness threshold is 80, the first maximum brightness threshold is 20, and the second maximum brightness threshold is 255. If the mean of the image's brightness channel array is less than 20, and the maximum value of the image's brightness channel array is less than 20, then the image is too dark. If the maximum value of the image's brightness channel array is equal to 255, then the image is overexposed. In other cases, it indicates that the image has no exposure and no processing is performed.
[0055] In step 220, if the image has an exposure abnormality, the first deep learning model is used to correct the exposure of the image with the exposure abnormality.
[0056] In some embodiments, the first deep learning model can be obtained in the following manner:
[0057] Step 1: Acquire a first test image and establish a first training set by performing a first data augmentation process on the first test image. The first data augmentation process may include overexposure or underexposure processing.
[0058] First, collect the first test image for data preparation. This first test image can be an image with a car as the main subject, or different types of images can be prepared depending on the required usage scenario. For example, if the image to be corrected is an image with a ship as the main subject, then the first test image will be an image with a ship as the main subject. The number of first test images can be at least one; using a larger number of first test images for training can result in a first deep learning model with higher correction accuracy.
[0059] Then, using data augmentation algorithms, the first test image is subjected to different degrees of overexposure and underexposure through the first data augmentation process. The image with the most suitable exposure is selected from the first test image and the multiple images after the first data augmentation process, and used as the positive sample of the first training set; the other images are used as the negative samples of the first training set. Here, the first dataset is denoted as Dset = {I1, I2, ..., I...} n}
[0060] Step 2: Perform data preprocessing on the first training set to obtain the Laplace pyramid set and the truth database.
[0061] According to an embodiment of the present invention, a Laplacian pyramid is calculated for each image data in the first training set to obtain a Laplacian pyramid set corresponding to each image data. Figure 3 A schematic diagram of a data preprocessing procedure according to an embodiment of the present invention is shown. Figure 3 As shown, during the data preprocessing process, one of the image data I from the first dataset is used. i Let's take I as an example. i A Laplacian pyramid calculation with level 4 is performed. Specifically, the image data is downsampled at level 4, resulting in four downsampled images. Gaussian filtering is then applied to each of the four downsampled images, yielding a corresponding filtered image; that is, each downsampled image corresponds to one filtered image. Then, the downsampled image is subtracted from its corresponding filtered image to obtain a set of Laplacian pyramids including the Laplacian image, denoted as X = {X1, X2, X3, X4}. The Laplacian pyramid set represents information at different frequencies from high to low frequencies, where X4 represents low-frequency information and X1 represents high-frequency information. Global color information in an image is typically concentrated in low-frequency information, while detailed image information is typically concentrated in mid-to-high-frequency information.
[0062] To train the first deep learning model, in addition to the Laplacian pyramid set, a truth database is also needed. In some embodiments, an image set at the scale corresponding to each image data is obtained as the truth database for the reconstructed image data. Specifically, each image data in the first training set is upsampled to obtain the truth database corresponding to the first training set. Optionally, each image data in the first training set is downsampled at level 4 to obtain the downsampled image corresponding to each image data, which forms the truth database. For example: for an image data I... i Downsampling by a factor of 2 yields T2, which is used to analyze image data I. i Downsampling by a factor of 3 yields T3, and this process is repeated to obtain image data I. i The corresponding truth library is T = {T1, T2, T3, T4}.
[0063] Step 3: Based on the Laplacian pyramid set and the truth database, train the first U-Net network model to obtain the optimal model as the first deep learning model.
[0064] According to an embodiment of the present invention, the first deep learning model may be a U-Net network model. The first deep learning model is constructed by concatenating four U-Net encoder-decoder networks. The four U-Net encoder-decoder networks are respectively denoted as U... net1 U net2U net3、 U net4 These are respectively called the first codec network, the second codec network, the third codec network, and the fourth codec network, where U net3、 U net2 U net1 For the same three-layer U-Net network with residual layers, U net4 It is a four-layer U-Net network.
[0065] Figure 4 A schematic diagram illustrating the training of a first deep learning model according to an embodiment of the present invention is shown. Figure 4 As shown, the Laplacian pyramid set and the truth library are input into the first U-Net network model for encoding and decoding to obtain the output image.
[0066] Specifically, the Laplacian pyramid set {X1, X2, X3, X4} is considered as a temporal sequence. Here, the four pieces of information arranged sequentially from high to low frequency are referred to as the first, second, third, and fourth pieces of information, respectively, to more clearly illustrate the training process. First, the fourth piece of information (X4) is fed into the fourth encoder-decoder network (U... net4 The encoding and decoding process is performed to obtain the output fourth image (Y4). Then, the fourth image and the third information (Y4+X3) are sent together into the third encoding and decoding network (U). net3 Encoding and decoding are performed, where U net3 A residual structure is introduced to construct the third image (Y3). Then, the third image and the second information (Y3+X2) are fed together into the second encoding / decoding network (U). net2 The first image (Y2) is constructed by encoding and decoding the first image (Y2+X1). Then, the second image and the first information (Y2+X1) are fed into the first encoding / decoding network (U). net1 Encode and decode to construct the first image (Y1).
[0067] During the training phase of the first deep learning model, the first U-Net network model is optimized using the loss function between the output image and the ground truth database. Specifically, T1 to T4 in the ground truth database T = {T1, T2, T3, T4} are referred to as the first ground truth data, the second ground truth data, the third ground truth data, and the fourth ground truth data, respectively. The loss function loss(Y1, T1) between the first image and the first ground truth data in the ground truth database, the loss function loss(Y2, T2) between the second image and the second ground truth data in the ground truth database, the loss function loss(Y3, T3) between the third image and the third ground truth data in the ground truth database, and the loss function loss(Y4, T4) between the fourth image and the fourth ground truth data in the ground truth database are calculated and used for gradient updates of the model. The model is continuously iterated using gradient descent until the optimal model is obtained. Optionally, the model trained when the gradient no longer decreases is considered the optimal model. The optimal model can be the model with the highest accuracy during training. During the testing phase of the first deep learning model, the optimal model can be tested using the first test image.
[0068] The first deep learning model trained as described above can perform exposure correction on images with exposure anomalies with high accuracy, thus improving the efficiency of large-scale image processing. Furthermore, both overexposure and underexposure of images can be corrected using the same first deep learning model, resulting in high detection efficiency and reduced image processing complexity.
[0069] In step 230, the presence of color cast anomalies in the image is determined by the color contrast features in the LAB space of the image.
[0070] According to an embodiment of the present invention, channel separation of the LAB space of an image can yield a first color-opposite dimension array corresponding to the A channel and a second color-opposite dimension array corresponding to the B channel. The A and B channels of the image can reflect the overall color distribution information of the image. The A channel represents the range from red to green [-128, 127], and the B channel represents the range from blue to yellow [-128, 127].
[0071] For color-skewed images, after calculating the histogram, abrupt peaks may appear in the histogram for a particular color group. Therefore, we calculate the one-dimensional histograms for the A and B channels of the image separately, and then calculate the first one-dimensional histogram of the image based on the first color-opposite dimension array, denoted as hist. A Based on the second color-opposite dimension array, calculate the second one-dimensional histogram of the image, denoted as histogram. B .
[0072] Then, calculate the first color mean of the first one-dimensional histogram and the second color mean of the second one-dimensional histogram. Optionally, calculate the first color mean corresponding to channel A and the second color mean corresponding to channel B using the following formula:
[0073] d j =sum(hist j [i]) / (w j *h j )-128, j=A, B; i=0~255
[0074] Where i represents chromaticity, i.e., the color distribution value, w represents the width of channels A and B, and h represents the height of channels A and B. The first color mean d... A We can determine whether the overall color scheme of the image is red or green based on the mean value d of the second color. B This tells us whether the overall color scheme of the image is yellow or blue.
[0075] Subsequently, based on the first color mean and the second color mean, the difference between the image's single chromaticity and the first color mean, and the difference between the image's single chromaticity and the second color mean, are calculated. Optionally, the difference V between the single chromaticity and the color mean of channels A and B is calculated using the following formula. ij :
[0076] V ij =(id) j -128)×hist j [i], j = A, B; i = 0 ~ 255
[0077] Then, the mean chromaticity difference of the image is calculated based on the variance of the differences. Alternatively, the mean chromaticity difference of the entire image can be calculated based on the variance of individual chromaticity values i using the following formula.
[0078]
[0079] Next, the color cast value of the image is calculated based on the mean of the first color, the mean of the second color, and the average difference in chromaticity. Optionally, the overall color cast value C of the image is calculated using the following formula:
[0080]
[0081] In some embodiments, after obtaining the color cast value of an image, it can be determined whether the image has a color cast anomaly by comparing the color cast value with a color cast threshold. If the color cast value of the image is greater than the color cast threshold, the image has a color cast anomaly. The color cast threshold can be set according to actual conditions. For example, the color cast threshold can be 1. If the color cast value of the image is greater than 1, it indicates that the image has a color cast anomaly, and the image is marked to indicate a color cast anomaly (e.g., flag = 0), and then the image enters the color cast correction process. If the color cast value of the image is less than 1, it indicates that the image does not have a color cast anomaly, and the image is marked to indicate no color cast anomaly (e.g., flag = -1), and no color cast correction is required.
[0082] In step 240, if the image has a color cast anomaly, the second deep learning model is used to correct the color cast of the image.
[0083] According to an embodiment of the present invention, the second deep learning model is obtained in the following manner:
[0084] Step 1: Obtain the second test image and establish the second training set by performing a second data augmentation process on the second test image. The second training set includes the augmented color cast adjustment image, the correction image, the indoor color cast image, and the outdoor color cast image.
[0085] In data preparation, considering that color cast is a color distortion caused by different ambient lighting, the color of the lighting in the shooting scene may change the color of the captured image. For example, in a shooting scene with predominantly pink lighting, the captured image will appear pinkish. Therefore, this invention takes into account the possible color deviations caused by different scenes by using different color temperature values. Optionally, the color temperature value t1 is set to 2850 Kelvin to represent the indoor lighting value, and the color temperature value t2 is set to 7500 Kelvin to represent the outdoor lighting value. In practical applications, the color temperature values of different shooting scenes are also different. To make the model universal, three models are considered to be generated simultaneously, including: an automatic correction model, an indoor color cast correction model, and an outdoor color cast correction model. If it is necessary to correct the image to a specific color temperature value, it can be obtained by interpolation calculation using the indoor correction image obtained from the indoor color cast correction model and the outdoor correction image obtained from the outdoor color cast correction model.
[0086] In some embodiments, adjusting the color cast value of the second test image to perform data augmentation on the second test image can yield four types of images, including: a color cast adjustment image (denoted as I). i ), Correction diagram (denoted as, I) auto ), Indoor color shift diagram at color temperature t1 (denoted as, I) t1 ), Outdoor color cast diagram at color temperature t2 (denoted as I) t2This constitutes the second training set for the second deep learning model. The color cast value in the color cast adjustment image can be a specific value, and can be any value different from the color cast values of the calibration image, indoor color cast image, and outdoor color cast image. The calibration image can be an image that meets the color cast correction requirements. The calibration image is obtained by adjusting the color cast value of the second test image until the adjusted image meets specific screening criteria. Screening criteria could be, for example, maximizing the amount of detail presented in the image. These criteria can be specifically set by relevant personnel to meet the requirements of a particular use case.
[0087] Step 2: Input the color shift adjustment map into the encoder of the second U-Net network model for encoding representation to obtain the encoding representation result.
[0088] According to an embodiment of the present invention, the second deep learning model may be a U-Net network model. Figure 5 A schematic diagram of a second deep learning model according to an embodiment of the present invention is shown. Figure 5 As shown, the second deep learning model includes one encoder (denoted as E1) and three decoders (the first decoder, denoted as D). auto The second decoder, denoted as D t1 The third decoder, denoted as D t2 ).
[0089] Specifically, during the training phase of the second deep learning model, the color cast adjustment images from the second training set are input into the encoder (E1) to encode and represent the color cast adjustment images, thereby obtaining the encoded representation result (f). i ).
[0090] Step 3: Input the encoded representation results into the three decoders of the second U-Net network model respectively to obtain three decoded images.
[0091] Specifically, f i Input to three decoders (D) respectively auto D t1 D t2 In ), f i The input is fed into the first decoder to obtain the first decoded image, denoted as O. auto f i The input is fed into the second decoder to obtain the second decoded image, denoted as O. t1 f i The input is fed into the third decoder to obtain the third decoded image, denoted as O. t2 .
[0092] Step 4: Calculate the loss function between each decoded image and the corrected image, indoor color cast image, and outdoor color cast image, and optimize the corresponding second U-Net network model to obtain the automatic correction model, indoor color cast correction model, and outdoor color cast correction model.
[0093] Specifically, three sets of loss functions are calculated, including: the loss function between the first decoded image and the corrected image (loss(O)). auto I auto ), used to train the automatic correction model, the second decoded image, and the indoor color cast map, the loss function loss(O) t1 I t1 ), used to train the indoor color cast correction model, and the loss function loss(O) between the third decoded image and the outdoor color cast map. t2 I t2 A third deep learning model is used to train the outdoor color cast correction model. The loss function is used for gradient updates of the model. The three models are iterated through gradient descent until three optimal correction models are obtained: an automatic correction model, an indoor color cast correction model, and an outdoor color cast correction model. Optionally, the model trained when the gradient stops decreasing is considered the optimal correction model. The optimal correction model can be the one with the highest accuracy during training. In the testing phase of the second deep learning model, the optimal correction model can be tested using the first test image.
[0094] According to an embodiment of the present invention, an automatically corrected model, trained to obtain an image with color cast anomalies, can be used to correct the color cast and obtain an automatically corrected image, denoted as Y. auto The indoor color cast correction model, obtained through training, can correct color cast anomalies in images, producing an indoor corrected image, denoted as Y. t1 The outdoor color cast correction model, obtained through training, can correct color cast anomalies in images, producing an outdoor corrected image, denoted as Y. t2 .
[0095] In some embodiments, after color correction is performed on an image with color cast anomalies to obtain an automatic correction image, an indoor correction image, and an outdoor correction image, the automatic correction image, the indoor correction image, and the outdoor correction image can be sent to the client so that the user can select the corrected image that meets the requirements.
[0096] Optionally, images with color cast anomalies can also be corrected by adjusting the color temperature value. Specifically, the color temperature value to be adjusted is obtained. This color temperature value can be set or input by the user, or it can be set by the program. Then, based on the color temperature value to be adjusted, the indoor calibration map, and the outdoor calibration map, a calibration map corresponding to the color temperature value to be adjusted is calculated, so as to adjust the color temperature of the image with color cast anomalies to the desired color temperature value to meet the user's specific requirements.
[0097] The color temperature value to be adjusted is denoted as t0. The range of the color temperature value to be adjusted can be between the color temperature value (t1) corresponding to the indoor calibration diagram and the color temperature value (t2) corresponding to the outdoor calibration diagram, i.e., t1 < t0 < t2.
[0098] By combining Y with the following formula t1 Y t2 Given t0, calculate the calibration curve Y0 corresponding to the color temperature value to be adjusted:
[0099]
[0100] Y0 = g*Y t1 +(1-g)*Y t2
[0101] In some embodiments, the automatic calibration image is first sent to the client. If the automatic calibration image meets the user's requirements, for example, if the user is satisfied with the automatic calibration image, then the automatic calibration image is used as the final calibrated image. If the automatic calibration image does not meet the user's requirements, for example, if the user is not satisfied with the automatic calibration image, then the image with color cast abnormalities is calibrated by adjusting the color temperature value.
[0102] In some embodiments, if the image size is too large, i.e., the longer side of the image is greater than a predetermined value, the image needs to be scaled down proportionally until the longer side of the image equals the predetermined value, so that color correction can be performed on the scaled-down image. The predetermined value can be set according to the usage scenario. For example, for images displayed on a computer, if the longer side of the image is greater than 665 pixels, the image size is too large, and the predetermined value can be set to 665 pixels.
[0103] The image with color cast anomaly (denoted as I) in After reduction, the calibration map corresponding to the color temperature value to be adjusted of the reduced image is obtained according to the aforementioned method, denoted as Y. re Here, the scaled-down image is denoted as I. re If Y is directly used at this point... re Scaling the image proportionally to its original size before scaling down will result in pixel distortion. Therefore, color space mapping can be used to adjust the Y-axis. reEnlarge to the original size to avoid color distortion caused by scaling.
[0104] First, Y is expressed by the following formula. re and I re Calculate the polynomial mapping function:
[0105]
[0106] in, It is a polynomial kernel function. M is obtained by inverse solution of the above equation.
[0107] Then, Y is expressed by the following formula. re Enlarged to its original size, the final output is the enlarged image Y. in :
[0108]
[0109] In some embodiments, after performing color cast correction on an image with color cast anomalies, the size of the color-corrected image can be cropped. For example, an image of a car as the main subject typically has a 3:2 aspect ratio. The color-corrected image remains 3:2, while the image required for displaying a car on a webpage is 4:3. Therefore, the color-corrected image (denoted as I) also needs to be cropped. input The dimensions are processed to meet the requirements of image presentation.
[0110] Alternatively, I can be expressed by the following formula. input After processing, the cropped image I is obtained. out :
[0111] I out =I input [:,bias:w-bias,:]
[0112] in, w represents I input The width.
[0113] In some embodiments, the output cropped image I out Feedback is sent to the application so that it can be approved and uploaded to the platform, and synchronized to the corresponding website page.
[0114] Additionally, it should be noted that the various images involved in this invention can be images with a car as the main subject, or other types of images obtained according to the required usage scenario, such as images with a ship or an airplane as the main subject, but are not limited thereto.
[0115] The present invention also provides an image processing apparatus. Figure 6A schematic diagram of an image processing apparatus 600 according to an embodiment of the present invention is shown. Figure 6 As shown, the image processing apparatus 600 includes an exposure detection module 610, an exposure correction module 620, a color cast detection module 630, and a color cast correction module 640. In some embodiments, the image processing apparatus may further include an image cropping module 650.
[0116] The exposure detection module 610 is adapted to: determine whether an image has an exposure abnormality based on the brightness features in the Lab space of the image. The exposure correction module 620 is adapted to: correct the exposure of the image with exposure abnormality using a first deep learning model when exposure abnormality exists. The color cast detection module 630 is adapted to: determine whether an image has a color cast abnormality based on the color contrast features in the Lab space of the image. The color cast correction module 640 is adapted to: correct the color cast of the image with color cast abnormality using a second deep learning model when color cast abnormality exists. The image cropping module 650 is adapted to: crop the size of the color cast corrected image.
[0117] It should be noted that the working principle and process of the image processing device 600 provided in this embodiment are similar to those of the method 200 described above. For relevant details, please refer to the description in the method 200 described above, which will not be repeated here.
[0118] The process of processing images using the image processing apparatus 600 proposed in this invention will be described below.
[0119] Figure 7 A flowchart illustrating an image processing method according to another embodiment of the present invention is shown. Figure 7 As shown, the image is input to the exposure detection module 610 of the device 600, which detects whether there is an exposure abnormality in the image. If the image has an exposure abnormality, it is input to the exposure correction module 620, and after the exposure correction is completed, the exposure-corrected image is input to the color cast detection module 630.
[0120] If the image does not have exposure abnormalities, it is input to the color cast detection module 630. If the image has color cast abnormalities, it is input to the color cast correction module 640. After color cast correction, the image is input to the image cropping module 650. If the image does not have color cast abnormalities, it is input to the image cropping module 650. After cropping the input image, the image cropping module 650 outputs it to the application.
[0121] The technical solution of this invention determines whether an image has abnormal exposure by using the brightness features in the LAB space of the image, and determines whether an image has abnormal color cast by using the color contrast features in the LAB space of the image. This allows for the determination of whether an image needs corresponding processing without manual annotation or intervention. For images with abnormal exposure, a first deep learning model corrects the exposure; for images with abnormal color cast, a second deep learning model corrects the color cast. This provides an intelligent image processing workflow, improving the efficiency of correction, especially for processing large batches of images, significantly enhancing image correction efficiency.
[0122] Furthermore, this invention determines whether an image has color cast anomalies by analyzing the color distribution and occupancy of the color-opposite channels in the LAB space of the image. This invention also introduces images with different color temperatures under different environmental factors during the training of the second deep learning model, generating indoor and outdoor color cast correction models for different environments to correct images under different conditions. It can also reconstruct the correction map based on the user-set color temperature value to be adjusted, and the indoor and outdoor correction maps, calculating the correction map corresponding to the color temperature value to be adjusted, thus increasing the flexibility of image processing in intelligent image processing.
[0123] In addition, the present invention also uses a color space mapping function to avoid image color distortion caused by image size scaling.
[0124] The various techniques described herein can be implemented in combination with hardware or software, or a combination thereof. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, can take the form of program code (i.e., instructions) embedded in a tangible medium, such as a removable hard disk, USB flash drive, floppy disk, CD-ROM, or any other machine-readable storage medium, wherein when the program is loaded into and executed by a machine such as a computer, the machine becomes an apparatus for practicing the present invention.
[0125] When the program code is executed on a programmable computer, the mobile terminal generally includes a processor, a processor-readable storage medium (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device. The memory is configured to store program code; the processor is configured to execute the image processing method of the present invention according to instructions in the program code stored in the memory.
[0126] By way of example, and not limitation, readable media include readable storage media and communication media. Readable storage media stores information such as computer-readable instructions, data structures, program modules, or other data. Communication media generally embodies computer-readable instructions, data structures, program modules, or other data in the form of modulated data signals such as carrier waves or other transmission mechanisms, and includes any information delivery medium. Any combination of the above is also included within the scope of readable media.
[0127] In the specification provided herein, the algorithms and displays are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used with the examples of this invention. The required structure for constructing such systems is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of the invention.
[0128] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0129] Similarly, it should be understood that, in order to streamline this disclosure and aid in understanding one or more of the various aspects of the invention, in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof.
[0130] Those skilled in the art will understand that modules, units, or components of the devices disclosed in the examples herein can be arranged in the devices described in this embodiment, or alternatively, can be located in one or more devices different from the devices in this example. The modules in the foregoing examples can be combined into a single module or, in addition, can be divided into multiple sub-modules.
[0131] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed herein and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed herein may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0132] Furthermore, those skilled in the art will understand that although some embodiments described herein include certain features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention and form different embodiments.
[0133] Furthermore, some of the embodiments described herein are methods or combinations of method elements that can be implemented by a processor of a computer system or by other means of performing the functions. Therefore, a processor having the necessary instructions for implementing the methods or method elements forms means for implementing the methods or method elements. Furthermore, the elements described herein in the apparatus embodiments are examples of means for implementing the functions performed by elements for the purposes of carrying out the invention.
[0134] As used herein, unless otherwise specified, the use of ordinal numbers such as “first,” “second,” “third,” etc., to describe ordinary objects merely indicates different instances of similar objects and is not intended to imply that the objects being described must have a given order in time, space, ordering, or any other manner.
[0135] Although the invention has been described with respect to a limited number of embodiments, those skilled in the art will understand from the foregoing description that other embodiments are conceivable within the scope of the invention described herein. Furthermore, it should be noted that the language used in this specification has been chosen primarily for readability and edibility purposes, and not for the purpose of explaining or limiting the subject matter of the invention.
Claims
1. An image processing method, the method comprising: The presence of exposure anomalies in the image is determined by the brightness characteristics in the LAB space of the image. If the image has an exposure error, then the first deep learning model is used to correct the exposure of the image with the exposure error. By analyzing the color contrast features in the LAB space of the image, it can be determined whether the image has a color cast anomaly. If the image has a color cast anomaly, then the second deep learning model is used to correct the color cast of the image. The first deep learning model is obtained in the following manner: A first test image is acquired, and a first training set is established by performing a first data augmentation process on the first test image. The first training set is preprocessed to obtain the Laplace pyramid set and the truth database; Based on the Laplacian pyramid set and the truth database, the first U-Net network model is trained to obtain the optimal model as the first deep learning model.
2. The method according to claim 1, wherein, Determining whether an image has exposure anomalies based on its brightness characteristics in the Lab color space includes: Channel separation is performed on the LAB space of the image to obtain the brightness channel array of the image; If the mean value of the brightness channel array of the image is less than the average brightness threshold, and the maximum value of the brightness channel array of the image is less than the first maximum brightness threshold, or the maximum value of the brightness channel array of the image is equal to the second maximum brightness threshold, then the image has an exposure anomaly.
3. The method according to claim 2, wherein, The average brightness threshold, the first maximum brightness threshold, and the second maximum brightness threshold are obtained in the following manner: Obtain a first dataset of images that require lighting adjustment and a second dataset of images that do not require lighting adjustment; obtain a first set of luminance channel arrays including the first dataset and a second set of luminance channel arrays including the second dataset. Obtain the first maximum brightness array and the first average brightness array of the first set, and the second maximum brightness array and the second average brightness array of the second set; Cluster analysis is performed on the first maximum brightness array, the first average brightness array, the second maximum brightness array, and the second average brightness array to obtain the average brightness threshold, the first maximum brightness threshold, and the second maximum brightness threshold.
4. The method according to claim 1, wherein, The data preprocessing of the first training set includes: For each image data in the first training set, a Laplacian pyramid is calculated to obtain a Laplacian pyramid set corresponding to each image data. Each image data in the first training set is downsampled to obtain a truth database.
5. The method according to claim 1 or 4, wherein, The training of the first U-Net network model based on the Laplacian pyramid set and the truth database includes: The Laplacian pyramid set and the truth database are input into the first U-Net network model for encoding and decoding to obtain the output image; The first U-Net network model is optimized using a loss function between the output image and the truth database.
6. The method according to claim 1, wherein, Determining whether the image has a color cast anomaly by using the color contrast features in the Lab space of the image includes: Channel separation is performed on the LAB space of the image to obtain a first color-opposite dimension array and a second color-opposite dimension array of the image; Based on the first color-opposite dimension array, calculate the first one-dimensional histogram of the image, and calculate the first color mean of the first one-dimensional histogram; Based on the second color-opposite dimension array, calculate the second one-dimensional histogram of the image, and calculate the second color mean of the second one-dimensional histogram; Based on the first color mean and the second color mean, calculate the difference between the image's single chromaticity and the first color mean, as well as the difference between the first color mean and the second color mean; The average chromaticity difference of the image is calculated based on the variance of the difference. The color cast value of the image is calculated based on the first color mean, the second color mean, and the chromaticity difference. If the color cast value of the image is greater than the color cast threshold, then the image has a color cast anomaly.
7. The method according to claim 1, wherein, The second deep learning model is obtained in the following way: A second test image is acquired, and a second training set is established by performing a second data augmentation process on the second test image. The second training set includes the color cast adjustment image, correction image, indoor color cast image, and outdoor color cast image after the augmentation process. The color shift adjustment map is input into the encoder of the second U-Net network model for encoding representation to obtain the encoding representation result; The encoded representation results are input into the three decoders of the second U-Net network model respectively to obtain three decoded images; The loss function between each decoded image and the correction image, the indoor color cast image, and the outdoor color cast image is calculated respectively, and the corresponding second U-Net network model is optimized to obtain the automatic correction model, the indoor color cast correction model, and the outdoor color cast correction model.
8. The method according to claim 7, wherein, The step of correcting color cast in images with color cast anomalies using a second deep learning model includes: The automatic correction model, indoor color cast correction model, and outdoor color cast correction model are used to correct color cast anomalies in images, resulting in an automatic correction image, an indoor correction image, and an outdoor correction image.
9. The method according to claim 8, wherein, The correction of images with color cast anomalies also includes: Obtain the color temperature value to be adjusted; Based on the color temperature value to be adjusted, the indoor calibration diagram, and the outdoor calibration diagram, the calibration diagram corresponding to the color temperature value to be adjusted is calculated.
10. The method according to claim 1, further comprising: If the longer side of the image is greater than a predetermined value, the image is scaled down proportionally until the longer side of the image equals the predetermined value, so as to perform color correction on the scaled-down image.
11. The method according to claim 1, wherein, After performing color cast correction on the image with color cast anomalies, the method further includes: The size of the color-corrected image is cropped.
12. The method according to claim 1, wherein, The first data enhancement process includes: overexposure or underexposure processing.
13. The method according to any one of claims 7 to 9, wherein, The second data enhancement process includes adjusting the color cast value.
14. The method according to claim 1, wherein, The image is of a car as the main subject.
15. An image processing apparatus, comprising: An exposure detection module is adapted to determine whether an image has an exposure abnormality by using the brightness characteristics in the Lab space of the image; An exposure correction module is adapted to perform exposure correction on an image with exposure abnormalities using a first deep learning model when the image has exposure abnormalities. The color cast detection module is adapted to determine whether the image has a color cast anomaly by using the color contrast features in the Lab space of the image; The color cast correction module is adapted to correct the color cast of the image when the image has a color cast abnormality by using a second deep learning model. The first deep learning model is obtained in the following manner: A first test image is acquired, and a first training set is established by performing a first data augmentation process on the first test image. The first training set is preprocessed to obtain the Laplace pyramid set and the truth database; Based on the Laplacian pyramid set and the truth database, the first U-Net network model is trained to obtain the optimal model as the first deep learning model.
16. The apparatus of claim 15, further comprising: The image cropping module is suitable for cropping the size of images after color cast correction.
17. A computing device, comprising: At least one processor; as well as A memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions including instructions for performing the method as described in any one of claims 1 to 14.
18. A readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform the method as described in any one of claims 1 to 14.
Citation Information
Patent Citations
Image processing method, computing device and storage medium
CN115643386A