Image processing method and device, image display method and device, electronic equipment and medium
By acquiring image features, determining the target grayscale mapping relationship and combining power consumption control, the problem of high power consumption of the light emitting diode display screen is solved, and the effect of maintaining or improving image quality while reducing power consumption is achieved.
Patent Information
- Application Number
- CN202410028814.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-08
- Publication Date
- 2025-07-08
AI Technical Summary
The prior art is difficult to maintain screen display quality while reducing the power consumption of the light emitting diode display screen, such as loss of image details, weakened contrast and color distortion.
By acquiring image features of the to-processed image, a target grayscale mapping relationship is determined, which is based on a plurality of historical images associated with the to-processed image, and the to-processed image is processed to obtain an enhanced image, and in combination with the power consumption control process, the display device is driven to display the final image.
While reducing power consumption, the quality of images and visual effects are improved, and the adaptive image quality enhancement and image display of multiple scene types are achieved.
Smart Images

Figure CN120278889A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of image processing technology and display technology, and more particularly, to an image processing method, an image display method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] With the rapid development of display technology, light-emitting diode (LED) displays have emerged, such as organic light-emitting diode (OLED), Micro LED, Mini LED, etc. An LED display includes a plurality of pixel points, and each pixel point includes a semiconductor material and a light-emitting material. The working principle of an LED is that under the drive of an electric field, the semiconductor material and the light-emitting material emit light through carrier injection and recombination. This way of emitting light results in a relatively high power consumption of the LED display. Summary of the Invention
[0003] In view of this, the present disclosure provides an image processing method, an image display method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
[0004] According to one aspect of the present disclosure, there is provided an image processing method, including: obtaining an image to be processed; determining a target gray-scale mapping relationship for the image to be processed according to the image features of the image to be processed, the target gray-scale mapping relationship being determined based on a plurality of historical images associated with the image to be processed, the historical images including images having the same image scene as the image to be processed; and processing the image to be processed using the target gray-scale mapping relationship to obtain an enhanced image.
[0005] According to another aspect of the present disclosure, there is provided an image display method, including: obtaining an enhanced image; performing power consumption control processing on the enhanced image to obtain an image to be displayed; and driving a display device to display the image to be displayed; the enhanced image is obtained by processing using an image processing method.
[0006] According to another aspect of the present disclosure, there is provided an image processing apparatus, including: an obtaining module, configured to obtain an image to be processed; a determining module, configured to determine a target gray-scale mapping relationship for the image to be processed according to the image features of the image to be processed, the target gray-scale mapping relationship being determined based on a plurality of historical images associated with the image to be processed, the historical images including images having the same image scene as the image to be processed; and a processing module, configured to process the image to be processed using the target gray-scale mapping relationship to obtain an enhanced image.
[0007] According to another aspect of the present disclosure, there is provided an image display device, including: an acquisition module configured to acquire an enhanced image; a power consumption reduction processing module configured to perform power consumption control processing on the enhanced image to obtain an image to be displayed; and a driving device configured to drive the display device to display the image to be displayed; wherein the enhanced image is obtained by using an image processing device.
[0008] According to another aspect of the present disclosure, there is provided an electronic device, including: one or more processors; a memory configured to store one or more instructions, wherein when the one or more instructions are executed by the one or more processors, the one or more processors are caused to implement the method as described in the present disclosure.
[0009] According to another aspect of the present disclosure, there is provided a computer-readable storage medium having executable instructions stored thereon, wherein when the executable instructions are executed by a processor, the processor is caused to implement the method as described in the present disclosure.
[0010] According to another aspect of the present disclosure, there is provided a computer program product, wherein the computer program product includes computer-executable instructions that are used to implement the method as described in the present disclosure when executed. Description of the Drawings
[0011] Through the following description of the embodiments of the present disclosure with reference to the drawings, the above and other objects, features, and advantages of the present disclosure will become clearer. In the drawings:
[0012] Figure 1 Schematically shown is a system architecture to which an image processing method and an image display method according to an embodiment of the present disclosure can be applied;
[0013] Figure 2 Schematically shown is a flowchart of an image processing method according to an embodiment of the present disclosure;
[0014] Figure 3 Schematically shown is an example diagram of an image processing process according to an embodiment of the present disclosure;
[0015] Figure 4 Schematically shown is an example diagram of a process of determining a target gray-scale mapping relationship for an image to be processed according to the image features of the image to be processed according to an embodiment of the present disclosure;
[0016] Figure 5A Schematically shown is an example diagram of a historical image according to an embodiment of the present disclosure;
[0017] Figure 5B Schematically shown is an example diagram of a gray-scale mapping relationship according to an embodiment of the present disclosure;
[0018] Figure 5C Schematically shows an example schematic diagram of a historical image according to another embodiment of the present disclosure;
[0019] Figure 5D Schematically shows an example schematic diagram of a grayscale mapping relationship according to another embodiment of the present disclosure;
[0020] Figure 5E Schematically shows an example schematic diagram of a historical image according to another embodiment of the present disclosure;
[0021] Figure 5F Schematically shows an example schematic diagram of a grayscale mapping relationship according to another embodiment of the present disclosure;
[0022] Figure 6 Schematically shows an example schematic diagram of a clustering process according to an embodiment of the present disclosure;
[0023] Figures 7A to 7H Schematically shows an example schematic diagram of a grayscale mapping relationship according to an embodiment of the present disclosure;
[0024] Figure 8 Schematically shows an example schematic diagram of a process of selecting a target grayscale mapping relationship matching a to-be-processed image from M grayscale mapping relationships according to target statistical features according to an embodiment of the present disclosure;
[0025] Figure 9 Schematically shows an example schematic diagram of a process of determining a target grayscale mapping relationship for a to-be-processed image according to the image features of the to-be-processed image according to an embodiment of the present disclosure;
[0026] Figure 10A Schematically shows an example schematic diagram of a deep learning model training process according to an embodiment of the present disclosure;
[0027] Figure 10B Schematically shows an example schematic diagram of a deep learning model training process according to another embodiment of the present disclosure;
[0028] Figure 11 Schematically shows a flowchart of an image display method according to an embodiment of the present disclosure;
[0029] Figure 12A Schematically shows an example schematic diagram of an image display process according to an embodiment of the present disclosure;
[0030] Figure 12B Schematically shows an example schematic diagram of an image display process according to an embodiment of the present disclosure;
[0031] Figure 13 Schematically shows an example schematic diagram of a power consumption adjustment process according to an embodiment of the present disclosure;
[0032] Figure 14 A block diagram schematically showing an image processing apparatus according to an embodiment of the present disclosure;
[0033] Figure 15 A block diagram schematically showing an image display apparatus according to an embodiment of the present disclosure; and
[0034] Figure 16 It is a block diagram of an electronic device suitable for implementing an image processing method and an image display method according to an embodiment of the present disclosure. Detailed implementation manners
[0035] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the following detailed description, for the sake of explanation, many specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure. However, it is obvious that one or more embodiments can also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts of the present disclosure.
[0036] The terms used herein are merely for describing specific embodiments and are not intended to limit the present disclosure. The terms "including", "comprising", etc. used herein indicate the presence of the described features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0037] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0038] In the case of using expressions such as "at least one of A, B, and C", generally, it should be interpreted according to the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include, but is not limited to, a system having only A, only B, only C, having A and B, having A and C, having B and C, and / or having A, B, and C).
[0039] In the technical solution of the present disclosure, the acquisition, storage, and application of the user's personal information involved all comply with the provisions of relevant laws and regulations, take necessary confidentiality measures, and do not violate public order and good customs.
[0040] In the technical solution of the present disclosure, before obtaining or collecting the user's personal information, the authorization or consent of the user has been obtained.
[0041] In one example, the power consumption can be reduced by decreasing the display brightness of a light-emitting diode display screen. However, since decreasing the brightness may lead to a decline in the display quality of the screen, for example, problems such as loss of image details, weakening of contrast, and color distortion, it is difficult to achieve power consumption reduction while ensuring the display quality of the screen.
[0042] To this end, the present disclosure provides an image processing solution. For example, obtaining an image to be processed; determining a target gray-scale mapping relationship for the image to be processed according to the image features of the image to be processed, where the target gray-scale mapping relationship is determined based on a plurality of historical images associated with the image to be processed, and the historical images include images having the same image scene as the image to be processed; and processing the image to be processed using the target gray-scale mapping relationship to obtain an enhanced image.
[0043] Figure 1 Schematically shows a system architecture to which the image processing method and the image display method according to embodiments of the present disclosure can be applied. It should be noted that Figure 1 The shown is only an example of a system architecture to which embodiments of the present disclosure can be applied, to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0044] As Figure 1 shown, the system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0045] A user can use at least one of the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0046] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, and desktop computers, etc.
[0047] Server 105 may be a server that provides various services, such as a background management server (for example only) that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process data such as user requests received, and feedback the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0048] It should be noted that the image processing method and the image display method provided by the embodiments of the present disclosure can generally be executed by the server 105. Correspondingly, the image processing device and the image display device provided by the embodiments of the present disclosure can generally be disposed in the server 105. The image processing method and the image display method provided by the embodiments of the present disclosure can also be executed by a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105. Correspondingly, the image processing device and the image display device provided by the embodiments of the present disclosure can also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105.
[0049] Alternatively, the image processing method and the image display method provided by the embodiments of the present disclosure can also be executed by the first terminal device 101, the second terminal device 102, or the third terminal device 103, or can also be executed by other terminal devices different from the first terminal device 101, the second terminal device 102, or the third terminal device 103. Correspondingly, the image processing device and the image display device provided by the embodiments of the present disclosure can also be disposed in the first terminal device 101, the second terminal device 102, or the third terminal device 103, or can be disposed in other terminal devices different from the first terminal device 101, the second terminal device 102, or the third terminal device 103.
[0050] It should be understood that Figure 1 the numbers of the terminal devices, the network, and the servers in
[0051] are merely illustrative. According to the implementation requirements, there can be any number of terminal devices, networks, and servers.
[0052] Figure 2 The flowchart of the image processing method according to the embodiments of the present disclosure is schematically shown.
[0053] As Figure 2As shown, the image processing method 200 includes operations S210 to S230.
[0054] In operation S210, an image to be processed is obtained.
[0055] In operation S220, according to the image features of the image to be processed, a target gray-scale mapping relationship for the image to be processed is determined. The target gray-scale mapping relationship is determined based on a plurality of historical images associated with the image to be processed.
[0056] In operation S230, the image to be processed is processed using the target gray-scale mapping relationship to obtain an enhanced image.
[0057] The historical image may refer to an image having the same image scene as the image to be processed. The image scene may refer to the specific environment or scenario shown in the historical image. The image scene may include at least one of the following: objects, background, lighting conditions, style, and atmosphere, etc. Objects may refer to various objects appearing in the image. For example, objects may include at least one of the following: people, vehicles, buildings, and natural objects. The background may refer to the surrounding environment and scenery. For example, the background may include at least one of the following: ground, sky, trees, and mountains. Lighting conditions may refer to the parameters used to describe the light in the image. For example, lighting conditions may include at least one of the following: the color, intensity, and lighting direction of the light. Style may include at least one of the following: cartoon style, realistic style, and black-and-white style. Atmosphere may refer to the atmosphere and emotional state presented in the image. For example, the atmosphere may include at least one of the following: warm, sad, and tense.
[0058] M gray-scale mapping relationships may be pre-configured based on a plurality of historical images associated with the image to be processed. The gray-scale mapping relationship can be used to map the original gray-scale value of the image to a new gray-scale value. The specific form of the gray-scale mapping relationship can be configured according to actual business requirements and is not limited herein. The gray-scale mapping relationship may include at least one of the following: linear mapping relationship, non-linear mapping relationship, and histogram equalization. For example, the linear mapping relationship may refer to using a linear function to map the original gray-scale value to a new gray-scale range. The non-linear mapping relationship may refer to using a non-linear function to map the original gray-scale value to a new gray-scale range. For example, the non-linear function may include at least one of the following: logarithmic transformation, power transformation, and gamma correction. Histogram equalization may refer to redistributing the gray-scale values of the image so that the gray-scale histogram of the image is evenly distributed.
[0059] After obtaining the image to be processed, the image to be processed can be processed to obtain the image features of the image to be processed. Image features may refer to the representative features or structures in the image to be processed that can be used to describe the content of the image to be processed. Image features may include at least one of the following: statistical features and local features.
[0060] Statistical features may include at least one of the following: mean (i.e., Mean), variance (i.e., Variance), median (i.e., Median), skewness (i.e., Skewness), kurtosis (i.e., Kurtosis), histogram (i.e., Histogram), entropy (i.e., Entropy), and contrast (i.e., Contrast). For example, the mean can be used to reflect the overall brightness level of the image to be processed. The variance can be used to reflect the contrast or texture complexity of the image to be processed. The median can be used to remove outliers or noise in the image. The skewness can be used to measure the skewness of the distribution of image pixel values. The kurtosis can be used to measure the sharpness of the distribution of image pixel values. The histogram can be used to describe the brightness or color information of the image. The entropy can be used to reflect the complexity or uncertainty of the image to be processed. The contrast can be used to measure the contrast or difference degree between different regions in the image to be processed.
[0061] Local features may include at least one of the following: edge features, corner features, blob features, color features, and scale-invariant feature transform (SIFT). For example, edge features can be used to represent the features of object boundaries in the image to be processed. Corner features can be used to represent the corners in the image to be processed. Blob features can be used to represent local blobs or textures in the image to be processed. Color features can be used to describe the color distribution of different regions in the image to be processed. Scale-invariant feature transform can refer to a rotation- and scale-invariant local feature descriptor.
[0062] After obtaining the image features of the image to be processed, the target gray mapping relationship for the image to be processed can be determined from M pre-configured gray mapping relationships according to the image features of the image to be processed. For example, when the image features include statistical features, the target gray mapping relationship can be determined from M pre-configured gray mapping relationships based on at least one of the mean, variance, median, skewness, kurtosis, histogram, entropy, and contrast. Alternatively, when the image features include local features, the target gray mapping relationship can be determined from M pre-configured gray mapping relationships based on at least one of the edge features, corner features, blob features, color features, and scale-invariant feature transform.
[0063] Image enhancement may refer to the process of enhancing the useful information in an image and improving the visual effect of the image. For example, the image to be processed can be processed using the target gray mapping relationship to obtain an enhanced image. Alternatively, the image to be processed can be processed based on at least one of histogram equalization, spatial domain filtering, frequency domain filtering, sharpening, noise reduction, color enhancement, contrast enhancement, and multi-scale enhancement to obtain an enhanced image.
[0064] According to an embodiment of the present disclosure, by analyzing the image features of the image to be processed and determining the target gray-scale mapping relationship based on the image features, since the target gray-scale mapping relationship is determined based on a plurality of historical images associated with the image to be processed, the target gray-scale mapping relationship can be applied to process the image to be processed, which is beneficial to improving the efficiency and accuracy of subsequent image processing. On this basis, since the enhanced image is obtained by processing the image to be processed using the target gray-scale mapping relationship, the enhanced image can better represent the detailed information in the image to be processed, thereby improving the quality and visual effect of the image.
[0065] Reference is made below Figure 3 , Figure 4 , Figures 5A to 5F , Figure 6 , Figures 7A to 7H , Figure 8 , Figure 9 , Figure 10A and Figure 10B , to further illustrate the image processing method 200 according to an embodiment of the present invention.
[0066] Figure 3 Schematically shows an example diagram of an image processing process according to an embodiment of the present disclosure.
[0067] As Figure 3 shown, in 300, the luminance component image 302 of the original image 301 can be determined. The image format of the original image may include at least one of the following: Joint Photographic Experts Group format (JPEG), Tag Image File Format (TIFF), Portable Network Graphics format (PNG), Portable Document Format (PDF), Graphics Interchange Format (GIF), Bitmap format (BMP), and Tagged Graphics format (TGA), etc.
[0068] The original image 301 may refer to a color image in the Red Green Blue (RGB) color space, that is, each pixel in the original image 301 includes a red component, a green component, and a blue component. The luminance component image 302 may refer to the Y-channel image in the YUV color space obtained after converting the color image, that is, the luminance component image 302 that selects the Y channel as the channel to be processed includes the luminance information of the original image 301.
[0069] The specific method for determining the luminance component image 302 of the original image 301 can be configured according to actual business requirements and is not limited herein. For example, the method for determining the luminance component image 302 may include at least one of the following: a determination method based on weighted average and a determination method based on a color space conversion formula. The determination method based on weighted average may refer to a method of obtaining the luminance value of a grayscale image by performing weighted averaging on the red component, green component, and blue component using different weight coefficients. The determination method based on a color space conversion formula may refer to a method of obtaining the luminance value of a grayscale image by processing the red component, green component, and blue component using a preset linear transformation formula. Various conversion methods can be used as long as they can convert an RGB image to the YUV space.
[0070] After obtaining the luminance component image 302, the luminance component image 302 can be downsampled to obtain the image to be processed 303. Downsampling may refer to a process of reducing the amount of data to be processed by downsampling the luminance component image 302 in the horizontal and vertical directions according to a preset sampling rule. The preset sampling rule can be configured according to actual business requirements and is not limited herein. For example, the preset sampling rule may be to sample the luminance component image 302 at a preset sampling interval. The preset sampling interval may be 1 pixel.
[0071] After obtaining the image to be processed 303, according to the image features of the image to be processed 303, the target grayscale mapping relationship 304 for the image to be processed 303 can be determined from M pre-configured grayscale mapping relationships. After obtaining the target grayscale mapping relationship 304, the image to be processed 303 in the Y channel can be grayscale mapped using the target grayscale mapping relationship 304 to obtain the enhanced image 305 with enhanced contrast.
[0072] According to an embodiment of the present disclosure, by determining the luminance component image of the original image, the luminance information in the original image is retained while the color information is discarded, thereby reducing the computational complexity. On this basis, by downsampling the luminance component image, the resolution of the luminance component image is reduced, thereby further reducing the data volume of the luminance component image, which is beneficial to improving the efficiency of subsequent image processing.
[0073] Figure 4 Schematically shows an example diagram of a process for determining a target grayscale mapping relationship for an image to be processed according to the image features of the image to be processed according to an embodiment of the present disclosure.
[0074] As Figure 4As shown in the figure, in 400, the M grayscale mapping relationships may include grayscale mapping relationship 4031, grayscale mapping relationship 4032, …, grayscale mapping relationship 403M. The grayscale mapping relationship may be a display Look Up Table (LUT). Before determining the target grayscale mapping relationship for the image to be processed 401, it is necessary to obtain the M grayscale mapping relationships in advance. The following will be combined with Figures 5A to 5F , Figure 6 , Figures 7A to 7H to further illustrate the method of obtaining the M grayscale mapping relationships.
[0075] Since the image to be processed 401 may belong to a certain specific scene type, and each specific scene type has a corresponding grayscale mapping relationship, after obtaining the image to be processed 401, the image features of the image to be processed 401 can be determined, and the corresponding grayscale mapping relationship can be selected according to the image features. For example, the image features of the image to be processed 401 may include statistical features. The target grayscale mapping relationship that matches the image to be processed 401 can be selected from the M grayscale mapping relationships according to the target statistical feature 402. For example, the grayscale mapping relationship 4032 can be determined as the target grayscale mapping relationship. The target grayscale mapping relationship may refer to the grayscale mapping relationship that is most suitable for processing the image to be processed, and can achieve a better image quality enhancement effect compared to other grayscale mapping relationships.
[0076] In one example, histogram equalization processing can be performed on multiple historical images to determine the grayscale mapping relationships of the multiple historical images respectively, and obtain multiple grayscale mapping relationships. For example, for each historical image, histogram equalization processing can be performed on the historical image to obtain an intermediate image. According to the intermediate image, the grayscale mapping relationship is determined. By adjusting the mapping relationship of pixel values, while reducing the brightness, the difference between pixels can be increased through contrast enhancement technology, so that the picture is clearer and more vivid, and the visualization effect of the image is improved.
[0077] The essence of histogram equalization is the cumulative distribution function of the probability histogram. The cumulative distribution function is a monotonically increasing function with a value range belonging to [0, 1]. The value range can be used to control the boundary problem, and the trend can be used to control the size relationship. Histogram equalization processing may refer to an image processing technology for image enhancement and contrast adjustment. By redistributing the pixel values of the historical image, the histogram of the historical image is evenly distributed over the entire grayscale range, so that an intermediate image with enhanced contrast and details of the historical image can be obtained. By performing histogram equalization processing on the historical image, the darker areas in the historical image are stretched to increase the contrast, while the brighter areas are compressed to avoid overexposure, so that the details in the intermediate image are more prominent and the contrast is more obvious.
[0078] On this basis, the intermediate image obtained by histogram equalization processing can be converted into a gray-scale mapping relationship. The gray-scale values of the respective pixels included in the intermediate image after equalization can be determined according to the histogram of the historical image. The conversion process of the gray-scale mapping relationship is shown in the following formulas (1) and (2).
[0079]
[0080] Among them, r k represents the gray-scale level, r k ∈[0, 1], k ∈ [0, l - 1], n k represents the number of pixels with the gray-scale level of r k , N represents the number of pixels in the image, P r (r k ) represents the probability that the k-th gray-scale level appears.
[0081]
[0082] Among them, T(r) represents the transformation function. Assuming that the gray-scale levels of the historical image are 0 to 255, the cumulative distribution function of the probability histogram is a monotonically increasing curve with the domain belonging to [0, 255] and the range belonging to [0, 1]. By mapping the range of this curve to 0 to 255, a 1×256-dimensional gray-scale mapping relationship from r k to s k is obtained.
[0083] Figure 5A FIG. schematically shows an example schematic diagram of a historical image according to an embodiment of the present disclosure; Figure 5B FIG. schematically shows an example schematic diagram of a gray-scale mapping relationship according to an embodiment of the present disclosure.
[0084] As Figure 5A and Figure 5B shown, taking the scene type of the historical image 501 as "car" as an example, the gray-scale mapping relationship 502 of the historical image 501 can be used to represent the original gray-scale levels of the historical image 501 with the horizontal axis interval located in [0, 255], and the vertical axis represents the adjusted gray-scale levels of the historical image 501 with the interval located in [0, 255].
[0085] Figure 5C FIG. schematically shows an example schematic diagram of a historical image according to another embodiment of the present disclosure; Figure 5D FIG. schematically shows an example schematic diagram of a gray-scale mapping relationship according to another embodiment of the present disclosure.
[0086] As Figure 5C and Figure 5DAs shown, taking the scene type of the historical image 503 as "train" as an example, the gray-scale mapping relationship 504 of the historical image 503 can be used to represent the original gray-scale levels of the historical image 503 with the horizontal axis ranging from [0, 255], and the vertical axis represents the adjusted gray-scale levels of the historical image 503 with the range of [0, 255].
[0087] Figure 5E Schematically shows an example diagram of a historical image according to another embodiment of the present disclosure; Figure 5F Schematically shows an example diagram of a gray-scale mapping relationship according to another embodiment of the present disclosure.
[0088] As Figure 5E and Figure 5F As shown, taking the scene type of the historical image 501 as "airplane" as an example, the gray-scale mapping relationship 506 of the historical image 505 can be used to represent the original gray-scale levels of the historical image 505 with the horizontal axis ranging from [0, 255], and the vertical axis represents the adjusted gray-scale levels of the historical image 505 with the range of [0, 255].
[0089] In one example, each historical image can correspond to a unique gray-scale mapping relationship respectively. Conversely, multiple historical images can correspond to the same gray-scale mapping relationship. Therefore, each gray-scale mapping relationship can correspond to multiple historical images respectively, that is, each gray-scale mapping relationship can be used to process historical images of the same scene type.
[0090] After obtaining multiple gray-scale mapping relationships, M can be used as the number of clustering centers to cluster the multiple gray-scale mapping relationships to obtain M first clustering results. Clustering can be used to divide the objects in the multiple gray-scale mapping relationships into different groups or clusters, so that the objects within the same group or cluster have a high similarity, while the objects between different groups or clusters have a low similarity. The clustering center can refer to the representative point or center point of each group or cluster during the clustering process. The number of M can be preset according to the actual application scenario.
[0091] The specific clustering algorithm can be configured according to the actual business requirements and is not limited here. For example, the clustering algorithm can include at least one of the following: K-means clustering algorithm, Hierarchical clustering algorithm, Density-based clustering algorithm, Mean-Shift clustering algorithm, and Spectral clustering algorithm. The following will further illustrate the process of obtaining M first clustering results in conjunction with Figure 6 to further illustrate the process of obtaining M first clustering results.
[0092] Figure 6 Schematically shows an example schematic diagram of the clustering process according to an embodiment of the present disclosure.
[0093] As Figure 6 shown, schematically shows an example of clustering multiple gray-scale mapping relationships with M as the number of clustering centers based on the K-means clustering algorithm to obtain M first clustering results. The K-means clustering algorithm belongs to an unsupervised learning algorithm and is used to divide multiple gray-scale mapping relationships into different clusters. For example, according to the number of clustering centers, multiple gray-scale mapping relationships are divided into M clusters, so that the distance between each gray-scale mapping relationship and the center point (i.e., centroid) of the belonging cluster is minimized.
[0094] In 600, dots are used to represent gray-scale mapping relationships. Dots with the same shade of gray represent the same scene category. For example, each dot in region 601 has the same shade of gray, which indicates that the gray-scale mapping relationships represented by each dot in region 601 belong to the same scene category. Each dot in region 602 has the same shade of gray, which indicates that the gray-scale mapping relationships represented by each dot in region 602 belong to the same scene category.
[0095] Dots with different shades of gray represent different scene categories. For example, each dot in region 601 and each dot in region 602 have different shades of gray, which indicates that the gray-scale mapping relationships represented by each dot in region 601 and the gray-scale mapping relationships represented by each dot in region 602 belong to different scene categories.
[0096] According to an embodiment of the present disclosure, since multiple gray-scale mapping relationships are obtained by performing histogram equalization processing on multiple historical images, by performing clustering analysis on the multiple gray-scale mapping relationships, gray-scale mapping relationships corresponding to the clustering centers of the M first clustering results can be obtained, which is beneficial to providing a basis for determining the target gray-scale mapping relationship in the subsequent process. On this basis, by selecting the target gray-scale mapping relationship that matches the image to be processed according to the target statistical features, the degree of automation of image processing can be improved, and thus the efficiency and accuracy of image processing can be improved.
[0097] After obtaining the M first clustering results, gray-scale mapping relationships corresponding to the clustering centers of the M first clustering results can be determined to obtain M gray-scale mapping relationships. For example, it can be set that M = 8, that is, the number of clustering centers is 8. Then, after clustering multiple gray-scale mapping relationships, 8 first clustering results can be obtained. For each of the 8 first clustering results, its clustering center can be determined, and the gray-scale mapping relationship corresponding to the historical image of the clustering center can be determined as the gray-scale mapping relationship that can approximately describe all historical images in this category. Thus, 8 gray-scale mapping relationships can be obtained. The following will be combined withFigures 7A to 7H Further illustrate eight grayscale mapping relationships.
[0098] Figures 7A to 7H Schematically shows an example schematic diagram of a grayscale mapping relationship according to an embodiment of the present disclosure.
[0099] As Figures 7A to 7H shown, the grayscale mapping relationships 701 to 708 are all monotonically increasing curves with a domain belonging to [0, 255] and a range belonging to [0, 255].
[0100] The grayscale mapping relationship 701 can be used to represent the grayscale mapping relationship corresponding to the cluster center 1 of the first clustering result 1. The grayscale mapping relationship 702 can be used to represent the grayscale mapping relationship corresponding to the cluster center 2 of the first clustering result 2. The grayscale mapping relationship 703 can be used to represent the grayscale mapping relationship corresponding to the cluster center 3 of the first clustering result 3. The grayscale mapping relationship 704 can be used to represent the grayscale mapping relationship corresponding to the cluster center 4 of the first clustering result 4.
[0101] The grayscale mapping relationship 705 can be used to represent the grayscale mapping relationship corresponding to the cluster center 5 of the first clustering result 5. The grayscale mapping relationship 706 can be used to represent the grayscale mapping relationship corresponding to the cluster center 6 of the first clustering result 6. The grayscale mapping relationship 707 can be used to represent the grayscale mapping relationship corresponding to the cluster center 7 of the first clustering result 7. The grayscale mapping relationship 708 can be used to represent the grayscale mapping relationship corresponding to the cluster center 8 of the first clustering result 8.
[0102] In one example, by using a central processing unit (CPU) to pre - represent multiple historical images using the number of grayscale mapping relationships of the cluster centers, the field - programmable gate array (FPGA) only needs to store the number of grayscale mapping relationships of the cluster centers and implement the subsequent determination of the target grayscale mapping relationship, thereby saving the storage space of the field - programmable gate array. In addition, since the field - programmable gate array has a slow processing speed for integral operations, by avoiding its direct histogram equalization processing, the computational amount of the field - programmable gate array is reduced, and thus the efficiency of image processing is improved.
[0103] In one example, each of the multiple historical images can be divided into multiple image blocks. For example, according to the number of image blocks to be divided, traverse the pixels of the historical image to obtain the number of pixel regions equal to the number of image blocks. According to the number of pixel regions, extract the corresponding pixel regions in the historical image as an image block. For example, for each historical image, the historical image can be divided into 5 * 5 historical image blocks, that is, 25 historical image blocks.
[0104] After obtaining multiple image patches for each historical image, for the n-th statistical feature among the N statistical features, the n-th statistical feature value of each of the multiple image patches can be determined to obtain multiple n-th statistical feature values, that is, statistical feature calculations are performed on the multiple image patches of each historical image respectively. The N statistical features can include at least one of the following: mean, variance, median, skewness, kurtosis, histogram, entropy, contrast, and mode. For example, a historical image includes P pixels, and each of the P pixels has a gray value. In this case, the mode can be determined based on the gray value with the largest quantity among the P gray values.
[0105] For each historical image, the statistical feature values can be calculated for 25 historical image patches of this historical image respectively. For example, taking the 1st statistical feature as the mean and the 2nd statistical feature as the variance as an example, the mean of each of the 25 historical image patches can be determined as the 1st statistical feature value of each of the 25 historical image patches. On this basis, the 1st statistical features of each of the 25 historical image patches can be cascaded to obtain the 1st statistical feature value of this historical image. The variance of each of the 25 historical image patches can be determined as the 2nd statistical feature value of each of the 25 historical image patches. On this basis, the 2nd statistical feature values of each of the 25 historical image patches can be cascaded to obtain the 2nd statistical feature value of this historical image.
[0106] After obtaining multiple n-th statistical feature values, with M as the number of clustering centers, the multiple n-th statistical feature values for the same statistical feature can be clustered respectively, so as to divide the multiple n-th statistical feature values belonging to the same statistical feature into different clusters to obtain M second clustering results.
[0107] According to the embodiments of the present disclosure, by dividing multiple historical images into multiple image patches and calculating multiple statistical feature values for each image patch respectively, more specific and detailed image features can be extracted to obtain a more comprehensive feature data representation, which helps to improve the accuracy of subsequent image processing. By performing clustering analysis on multiple n-th statistical feature values, different image features can be identified and the target statistical features with the most representativeness and distinctiveness can be determined, which can more accurately describe the characteristics of historical images, thereby providing a basis for determining the target gray mapping relationship for the to-be-processed image subsequently.
[0108] In one example, after obtaining the M second clustering results of each statistical feature, the M second clustering results of the statistical feature can be compared with the M first clustering results of the grayscale mapping relationship to obtain multiple similarity degrees. The comparison method of the clustering results can be configured according to actual business requirements and is not limited herein. For example, the comparison method can include at least one of the following: a comparison method based on Jaccard similarity, a comparison method based on Rand index, and a comparison method based on Mutual Information.
[0109] After obtaining multiple similarity degrees, the highest similarity degree can be determined according to the multiple similarity degrees. The statistical feature corresponding to the highest similarity degree is determined as the target statistical feature, thereby enabling the correspondence between the statistical feature and the grayscale mapping relationship.
[0110] According to an embodiment of the present disclosure, by comparing the similarity degrees between the M second clustering results and the M first clustering results, the most suitable target statistical feature can be adaptively determined, which is beneficial to improving the efficiency of subsequent image processing. By selecting the statistical feature with the highest similarity degree, the accuracy of subsequent image processing can be improved, thereby improving the quality and visualization effect of the enhanced image.
[0111] In one example, the M first clustering results represent M categories, that is, each first clustering result can represent a category respectively, and each first clustering result can include different numbers of historical images. The category can refer to the scene category represented by the historical image. The scene category can include at least one of the following: object, background, lighting condition, style, and atmosphere, etc.
[0112] After obtaining the M first clustering results, for the m-th first clustering result among the M first clustering results and for the n-th statistical feature among the N statistical features, the n-th feature value of each of the m-th number of historical images included in the m-th first clustering result can be determined. On this basis, the n-th feature value of the m-th first clustering result can be determined according to the n-th feature value of each of the m-th number of historical images. m ∈ [1,..., M]. For example, if the m-th first clustering result includes 100 historical images, the n-th feature value of each of the 100 historical images can be determined, and based on the n-th feature value of each of the 100 historical images, the n-th feature value of the m-th first clustering result can be determined.
[0113] Repeat the above operations for each of the M first clustering results, and the n-th eigenvalue of each first clustering result can be obtained. After obtaining the n-th eigenvalue of each first clustering result, the M n-th eigenvalues can be sorted according to the magnitudes of the n-th eigenvalues to obtain the n-th eigenvalue sequence. The n-th eigenvalue sequence includes the M n-th eigenvalues arranged in ascending order.
[0114] After obtaining the n-th eigenvalue sequence, for the M n-th eigenvalues arranged in ascending order in the n-th eigenvalue sequence, the n-th distance between every two adjacent n-th eigenvalues can be calculated to obtain a plurality of n-th distances. On this basis, the cumulative value of the plurality of n-th distances can be determined to obtain the n-th distance sum.
[0115] Repeat the above operations for each of the N statistical features, and the distance sum of each statistical feature can be obtained, that is, N distance sums. After obtaining the N distance sums, the maximum distance sum among the N distance sums can be determined, which indicates that the statistical feature corresponding to the maximum distance sum can distinguish the M categories sufficiently, that is, it can be used as the statistical feature most matching the category. Therefore, the maximum distance sum can be determined as the target distance sum. On this basis, the statistical feature corresponding to the target distance sum can be determined as the target statistical feature, so as to subsequently select the target gray mapping relationship for processing the image to be processed according to the target statistical feature.
[0116] Taking M = 8 and the N statistical features including the first statistical feature (i.e., mean), the second statistical feature (i.e., mean), and the third statistical feature (i.e., standard deviation) as an example, the determination process of the target statistical feature is described below.
[0117] For the first statistical feature, for the first of the 8 first clustering results, the first eigenvalue of each of the first number of historical images included in the first first clustering result can be determined. On this basis, the first eigenvalue of the first first clustering result can be determined according to the first eigenvalues of the first number of historical images. By analogy, the first eigenvalues of the 8 first clustering results can be determined one by one.
[0118] The 8 first eigenvalues can be sorted according to the magnitudes of the first eigenvalues to obtain the first eigenvalue sequence. On this basis, the first distance between every two adjacent first eigenvalues in the first eigenvalue sequence can be calculated to obtain 7 first distances, and the first distance sum of the first statistical feature can be determined according to the 7 first distances. For example, if the first eigenvalue sequence is [32, 50, 131, 158, 170, 200, 210, 233], the first distance sum can be obtained as 211.
[0119] By analogy, the second distance sum of the second statistical feature and the third distance sum of the third statistical feature can be determined one by one. The determination method of the n-th distance sum can be shown in the following formula (3).
[0120]
[0121] where s n represents the n-th distance sum, M represents the number of clustering centers, and T n represents the n-th eigenvalue sequence, and T nj represents the j-th n-th eigenvalue in the n-th eigenvalue sequence, and T n(j+1) represents the (j + 1)-th n-th eigenvalue in the n-th eigenvalue sequence, and T n(j+1) -T nj represents the n-th distance between the (j + 1)-th n-th eigenvalue and the j-th n-th eigenvalue.
[0122] According to the embodiments of the present disclosure, by calculating the distance sum of the n-th eigenvalues of each category and determining the target distance sum with the largest value among the N distance sums, the most representative and distinguishable distance sum can be found, and the corresponding target statistical feature can be further determined, thereby providing a basis for the subsequent determination of the target gray mapping relationship.
[0123] Figure 8 Schematically shows an example diagram of the process of selecting a target gray mapping relationship matching the image to be processed from M gray mapping relationships according to the target statistical feature according to the embodiments of the present disclosure.
[0124] As Figure 8 shown, in 800, for the target statistical feature, the statistical distributions of the M gray mapping relationships can be determined respectively to obtain the statistical feature values of the M gray mapping relationships. In one example, among multiple historical images, the representative images corresponding to the clustering centers of the M first clustering results can be determined to obtain M representative images. For the target statistical feature, the statistical feature values of the M representative images are determined as the statistical feature values of the M gray mapping relationships, that is, the statistical feature value 803_1 of the gray mapping relationship 804_1, the statistical feature value 803_2 of the gray mapping relationship 804_2,..., the statistical feature value 803_M of the gray mapping relationship 804_M.
[0125] According to the embodiments of the present disclosure, by determining the representative image corresponding to the clustering center of the first clustering result and extracting its statistical feature value as the statistical feature value of the gray mapping relationship, representative and distinguishable image features can be obtained and can be used for subsequent gray adjustment of the image, thereby improving the accuracy and efficiency of image processing.
[0126] In one example, after obtaining the image 801 to be processed, the target statistical feature value 802 of the image 801 to be processed can be determined for the target statistical feature. After obtaining the target statistical feature value 802, based on the target statistical feature value 802, among the statistical feature values 803_1 of the gray mapping relationship 804_1, the statistical feature values 803_2 of the gray mapping relationship 804_2,..., the statistical feature values 803_M of the gray mapping relationship 804_M, the statistical feature value that matches the target statistical feature value 802 can be determined, that is, it can be determined within which interval of the statistical feature values the target statistical feature value 802 is located. On this basis, the gray mapping relationship corresponding to the statistical feature value that matches the target statistical feature value 802 can be determined as the target gray mapping relationship.
[0127] For example, if the target statistical feature value 802 matches the statistical feature value 803_2, the gray mapping relationship 804_2 corresponding to this statistical feature value 803_2 can be selected to perform image enhancement processing on the image 801 to be processed, thereby achieving scene-category adaptive image enhancement.
[0128] According to the embodiments of the present disclosure, by comparing the target statistical feature value of the image to be processed and the statistical feature values of each gray mapping relationship, the most matching gray mapping relationship can be automatically selected as the target gray mapping relationship, improving the flexibility and adaptability of determining the target gray mapping relationship, and thus being beneficial to improving the quality and effect of image processing.
[0129] Figure 9 A schematic diagram exemplarily shows a process of determining a target gray mapping relationship for an image to be processed according to the image features of the image to be processed according to the embodiments of the present disclosure.
[0130] As Figure 9 shown, in 900, after obtaining the image 901 to be processed, the image 901 to be processed can be divided to obtain a plurality of image blocks. On this basis, the plurality of image blocks can be cascaded to obtain a cascaded plurality of image blocks 902. Cascading can refer to the process of combining a plurality of image blocks in a predetermined order to form a larger image block or an image. Inputting the cascaded plurality of image blocks 902 into the trained deep learning model 903 can obtain the target gray mapping relationship 906.
[0131] In one example, the image 901 to be processed can be divided to obtain image blocks of P×Q, where P is the number of rows and Q is the number of columns. For example, P = 2 and Q = 4. On this basis, the P×Q image blocks can be cascaded to obtain a column of cascaded plurality of image blocks 902 with a dimension of 1×PQ.
[0132] According to an embodiment of the present disclosure, by dividing the image to be processed to obtain a plurality of cascaded image patches, a large image can be effectively decomposed into multiple local regions, which is beneficial to improving the processing speed of subsequent deep learning models. Since the target gray-scale mapping relationship is obtained by inputting a plurality of image patches into a trained deep learning model, it is possible to automatically determine the target gray-scale mapping relationship suitable for the current scene type in different scene types, thereby improving the scene adaptation ability of the image processing method, and further being beneficial to improving the effect and accuracy of subsequent image processing.
[0133] In one example, inputting the plurality of cascaded image patches 902 into a trained deep learning model 903 to obtain the target gray-scale mapping relationship 906 may include the following operations.
[0134] Extract the image features of the plurality of image patches 902 and process the image features to obtain M weights 904. The weights of the image features can be used to represent the importance or contribution degree of different image features in the task, and can be used to adjust or weight the relative importance of different image features. Using the M weights 904, weight the M unweighted gray-scale mapping relationships to obtain M weighted gray-scale mapping relationships. Weighting may refer to the process of multiplying the unweighted gray-scale mapping relationship by the corresponding weight. Combine the M weighted gray-scale mapping relationships to obtain the target gray-scale mapping relationship. Combining may refer to the process of combining the M weighted gray-scale mapping relationships after weighting to form a new feature vector. The combining method may include at least one of the following: splicing and fusion.
[0135] In one example, as Figure 9 shown, the deep learning model 903 may include a weight generation module 9031, a weighting module 9032, and a combining module 9033. Inputting the plurality of cascaded image patches 902 into a trained deep learning model 903 to obtain the target gray-scale mapping relationship 906 may further include the following operations.
[0136] Input the plurality of cascaded image patches 902 into the weight generation module 9031. The weight generation module 9031 may extract the image features of the plurality of cascaded image patches 902 to obtain the image features. On this basis, the weight generation module 9031 may process the image features to obtain M weights 904.
[0137] In one example, the weight generation module 9031 can be implemented by a Transformer network. The Transformer network uses an attention mechanism during training, enabling it to calculate the degree of correlation (i.e., weights) between each position in the input data and all other positions, and to perform weighted aggregation of the features of each position based on these weights. By introducing a self-attention mechanism, the Transformer network can consider all position information in the input data simultaneously, effectively capturing long-range dependencies in the input data.
[0138] The Transformer network can include M processing blocks (i.e., Blocks) in cascade. For each of the M processing blocks, it includes an encoder (i.e., Encoder) and a decoder (i.e., Decoder). The encoder can be used to process multiple image blocks to obtain one-dimensional image features, and the decoder can be used to process these image features to obtain M weights.
[0139] For example, the encoder can include a first self-attention layer and a first feedforward layer. The first self-attention layer interacts each position in the input sequence with all other positions to calculate the context representation vector for each position. The first feedforward layer then maps the context representation vector of each position to another vector space to capture higher-level features. The decoder can include a second self-attention layer, an encoder-decoder attention layer, and a second feedforward layer. The encoder-decoder attention layer interacts the input at the current position of the decoder with all positions of the encoder to obtain information related to the target sequence, i.e., M weights of 1×M dimension.
[0140] By using the M weights of 1×M dimension to weight the M trainable weighted grayscale mapping relationships, the M weighted grayscale mapping relationships are obtained. For example, the M weights 904 are input into the weighting module 9032, and the weighting module 9032 uses the M weights 904 to weight the M unweighted grayscale mapping relationships to obtain the M weighted grayscale mapping relationships. The M weighted grayscale mapping relationships can include the weighted grayscale mapping relationship 9051, the weighted grayscale mapping relationship 9052,..., the weighted grayscale mapping relationship 905M.
[0141] By combining the weighted M gray-scale mapping relationships, a weighted gray-scale mapping relationship can be obtained. For example, the weighted gray-scale mapping relationship 9051, the weighted gray-scale mapping relationship 9052, …, the weighted gray-scale mapping relationship 905M are input into the combining module 9033, and the combining module 9033 combines the M weighted gray-scale mapping relationships to obtain the target gray-scale mapping relationship 906.
[0142] According to an embodiment of the present disclosure, by extracting the image features of multiple image patches and processing the image features, M weights can be obtained, and the corresponding weights can be extracted according to the features of the image patches, so as to accurately reflect the importance and contribution degree of the image patches in the overall image to be processed. By weighting different gray-scale mapping relationships according to the weights, the information of important image patches can be highlighted, thereby improving the pertinence and effect of image processing. On this basis, by effectively integrating and combining the weighted gray-scale mapping relationships, a more representative and comprehensive target gray-scale mapping relationship can be obtained, providing a more comprehensive and accurate basis for the subsequent image processing process.
[0143] Figure 10A Schematically shows an example schematic diagram of the deep learning model training process according to an embodiment of the present disclosure.
[0144] As Figure 10A shown, in 1000A, the deep learning model can be trained based on a supervised training (i.e., Supervised Learning) method to obtain a trained deep learning model. The supervised training method may mean that the input sample image needs to carry a gray-scale mapping relationship label, and the gray-scale mapping relationship label can be used to represent the expected output gray-scale mapping relationship. For example, the gray-scale mapping relationship label can be the gray-scale mapping relationship obtained after histogram mapping of the luminance component image of the original image.
[0145] The sample image 1001 is input into the deep learning model 1002 to obtain the output gray-scale mapping relationship 1003. Determine the first difference 1005 between the output gray-scale mapping relationship 1003 and the gray-scale mapping relationship label 1004 of the sample image 1001. For example, based on the first loss function, the output gray-scale mapping relationship 1003 and the gray-scale mapping relationship label 1004 can be used to obtain the first difference 1005. The first loss function can be configured according to actual business requirements and is not limited herein. For example, the first loss function may include at least one of the following: Mean Squared Error Loss (MSE Loss), Mean Absolute Error Loss (MAE Loss), and L2 norm.
[0146] Adjust the parameters of the weight generation module and the values of the M initial gray-scale mapping relationships so that the first difference 1005 converges. Take the deep learning model 1002 when the first difference 1005 converges as the trained deep learning model, and take the M initial gray-scale mapping relationships when the first difference 1005 converges as the M unweighted gray-scale mapping relationships.
[0147] According to an embodiment of the present disclosure, by training a deep learning model using an output gray-scale mapping relationship and a gray-scale mapping relationship label, the obtained trained deep learning model can automatically determine a target gray-scale mapping relationship, thereby improving the efficiency and accuracy of image processing.
[0148] Figure 10B Schematically shows an example schematic diagram of a deep learning model training process according to another embodiment of the present disclosure.
[0149] As Figure 10B shown, in 1000B, a deep learning model can be trained based on an unsupervised learning method to obtain a trained deep learning model. Unsupervised learning may mean that the input sample images do not need to carry gray-scale mapping relationship labels, but the deep learning model itself discovers patterns and structures in the sample images.
[0150] After obtaining the sample image 1001, the sample image 1001 can be input into the deep learning model 1002 to obtain an output gray-scale mapping relationship 1003. The output gray-scale mapping relationship 1003 is used to process the sample image 1001 to obtain an enhanced image 1006. Determine a second difference 1009 between the image quality evaluation index 1007 of the enhanced image 1006 and the image quality evaluation index 1008 of the sample image 1001. For example, based on a second loss function, the image quality evaluation index 1007 and the image quality evaluation index 1008 can be used to obtain the second difference 1009. The second loss function can be configured according to actual business requirements and is not limited herein. For example, the second loss function may include at least one of the following: mean square error loss function, mean absolute error loss function, and L2 norm.
[0151] Adjust the parameters of the weight generation module in the deep learning model 1002 and the values of the M initial gray-scale mapping relationships so that the second difference 1009 converges. Take the deep learning model when the second difference 1009 converges as the trained deep learning model, and take the M initial gray-scale mapping relationships when the second difference 1009 converges as the M unweighted gray-scale mapping relationships.
[0152] According to an embodiment of the present disclosure, by training a deep learning model using the image quality evaluation index of the enhanced image and the image quality evaluation index of the sample image, the quality of the enhanced image can be made to approach that of the sample image, and image quality loss can be avoided. Since the trained deep learning model can automatically determine the target gray mapping relationship, the efficiency and accuracy of image processing are improved.
[0153] In one example, after obtaining the output gray mapping relationship, the output gray mapping relationship can be used to process the sample image to obtain an enhanced image. The image quality evaluation index of the enhanced image and the image quality evaluation index of the sample image can be determined respectively to facilitate the image quality assessment (Image Quality Assessment, IQA) of the enhanced image and the sample image.
[0154] The image quality evaluation index can be used to measure the visual quality of an image. The image quality evaluation index can include at least one of the following: No-Reference Image Quality Assessment (NR-IQA) index, Full-Reference Image Quality Assessment (FR-IQA) index, and Reduced-Reference Image Quality Assessment (RR-IQA) index.
[0155] Full reference image quality assessment may refer to evaluating the quality of an image by comparing the differences between the reference image and the image to be evaluated, with the reference image as a reference. Reduced reference quality assessment may refer to evaluating the quality of an image by obtaining partial feature information from the reference image and based on the differences between the partial feature information and the image to be evaluated, with the reference image as a reference. For example, the full reference image quality assessment index and the reduced reference quality assessment index may include at least one of the following: Mean Square Error (MSE), Peak Signal-to-Noise Ratio (PSNR), and Structural Similarity Index (SSIM).
[0156] No-reference image quality assessment can refer to assessing the quality of an image by analyzing the characteristics of the image to be evaluated itself without using a reference image as a reference. For example, image quality evaluation metrics can include at least one of the following: contrast, sharpness-related metrics, noise-related metrics, brightness-related metrics, and color-related metrics. For example, the contrast can be evaluated by the variance of the entire image. Sharpness-related metrics can include sharpness and false color. For example, an edge detection operator can be used to evaluate sharpness. Alternatively, the false color can be evaluated by the UV difference in the texture region.
[0157] Noise-related metrics can include dynamic noise and static noise. For example, the variance of the luminance component can be used to evaluate dynamic noise. Alternatively, the variance of the 18-degree gray wall part in the image can be used to evaluate static noise. Brightness-related metrics can include brightness, AE convergence, local overexposure or underexposure. For example, the average brightness of the entire image can be used to evaluate brightness. Alternatively, the AE convergence can be evaluated based on the change in brightness values within a preset time period. Alternatively, local overexposure or underexposure can be evaluated by counting the number of pixels with too high or too low heights. Color-related metrics can include white balance and saturation. For example, the chromaticity value of the entire image can be used to evaluate white balance. Alternatively, the white balance can be evaluated based on the mean saturation of each pixel in the entire image.
[0158] By using a server to pre-train a deep learning model, a trained deep learning model is obtained, and in actual applications, the central processing unit uses the trained deep learning model to obtain a target gray mapping relationship suitable for processing the image to be processed, thereby improving the effect of image enhancement. In addition, since the field-programmable gate array only needs to use the target gray mapping relationship to process the image to be processed, the efficiency of image processing is improved.
[0159] The above are only exemplary embodiments, but are not limited thereto. Other image processing methods known in the art can also be included, as long as they can improve the efficiency and accuracy of subsequent image processing, as well as the quality and visual effect of the image.
[0160] Figure 11 A flowchart of an image display method according to an embodiment of the present disclosure is schematically shown.
[0161] As Figure 11 shown, the image display method 1100 includes operations S1110 to S1130.
[0162] In operation S1110, an enhanced image is obtained.
[0163] In operation S1120, power consumption control processing is performed on the enhanced image to obtain an image to be displayed.
[0164] In operation S1130, the display device is driven to display the image to be displayed.
[0165] The enhanced image can be obtained by processing using the image processing method 200. For example, before executing the image display method 1100, an image to be processed can be acquired, and according to the image characteristics of the image to be processed, a target gray-scale mapping relationship for the image to be processed can be determined, and the image to be processed can be processed using the target gray-scale mapping relationship to obtain the enhanced image.
[0166] After obtaining the enhanced image, power consumption control processing can be performed on the enhanced image to obtain the image to be displayed. Power consumption control can refer to balancing the relationship between the effect of image enhancement and power consumption to ensure that the display device can provide good performance under limited resources. The specific power consumption control method can be configured according to actual service requirements and is not limited herein. For example, the power consumption control method can include at least one of the following: a power consumption control method based on algorithm optimization, a power consumption control method based on a low-power mode, a power consumption control method based on dynamic parameter adjustment, a power consumption control method based on hardware support, and a power consumption control method based on energy efficiency analysis.
[0167] For example, power consumption control processing can be performed on the enhanced image to obtain a first intermediate image. The enhanced image can be a luminance component image. The first intermediate image can be a chrominance component image. After obtaining the first intermediate image, the enhanced image and the first intermediate image can be combined to obtain a second intermediate image. The second intermediate image can be an image in the YUV color space. After obtaining the second intermediate image, color space conversion processing can be performed on the second intermediate image to obtain the image to be displayed. The image to be displayed can be an image in the RGB color space.
[0168] After obtaining the image to be displayed, the display device can be driven to display the image to be displayed. The display device can be configured according to actual service requirements and is not limited herein. For example, the display device can include at least one of the following: a liquid crystal display (LCD), a light emitting diode display (LED), an organic light emitting diode display, a Micro LED display, a Mini LED display, an electronic ink screen (i.e., E-ink), and a curved display, etc.
[0169] According to an embodiment of the present disclosure, by performing power consumption control processing on the enhanced image and driving the display device to display the image to be displayed obtained through the power consumption control processing, multi-scenario type adaptive image quality enhancement and image display can be achieved, and the power consumption of image display can be reduced while ensuring the picture display quality, thereby improving the visual effect of image display.
[0170] The following refers toFigure 12A , Figure 12B and Figure 13 , the image display method 1100 according to an embodiment of the present invention will be further described.
[0171] Figure 12A FIG. schematically shows an example diagram of an image display process according to an embodiment of the present disclosure.
[0172] As Figure 12A shown, in 1200A, the video stream to be processed may include Q-frame images to be processed. After obtaining the video stream to be processed, for the q-th image to be processed in the Q-frame images to be processed, image processing may be performed on the q-th image to be processed to obtain a q-th enhanced image 1202 corresponding to the q-th image to be processed. The q-th enhanced image 1202 has the same size as the q-th image to be processed. After obtaining the q-th enhanced image 1202, the q-th enhanced image 1202 may be displayed on the OLED display screen 1203.
[0173] Repeatedly performing the above operations for each image to be processed in the Q-frame images to be processed can achieve real-time processing of the video stream to be processed and real-time playback of the display screen of the OLED display screen 1203, thereby achieving low-power display.
[0174] Figure 12B FIG. schematically shows an example diagram of an image display process according to an embodiment of the present disclosure.
[0175] As Figure 12B shown, in 1200B, an enhanced image may be obtained and the enhanced image 1204 may be input to the display device 1203 to drive the display device 1203 to display the image to be displayed 1205.
[0176] For example, the display device 1203 may include a decoding chip 12031, an FPGA chip 12032, a display chip 12033, and a display screen 12034. The decoding chip 12031 decodes the enhanced image 1204 to obtain a decoded image. The FPGA chip 12032 performs power consumption control processing on the decoded image to obtain the image to be displayed 1205. The display chip 12033 performs conversion processing on the image to be displayed 1205 to facilitate converting the image to be displayed 1205 into the driving voltage of each LED on the display screen 12034, thereby achieving driving the display device 1203 to display the image to be displayed 1205.
[0177] Figure 13 FIG. schematically shows an example diagram of a power consumption adjustment process according to an embodiment of the present disclosure.
[0178] As Figure 13As shown, after performing image processing on the image to be processed, the target gray-scale mapping relationship of the image to be processed can be obtained. By using this target gray-scale mapping relationship to process the image to be processed, an enhanced image with enhanced contrast can be obtained. To further reduce the image mean of the enhanced image, power consumption control processing can be performed on the enhanced image. In 1300, a Gamma mapping example is shown. The formula for Gamma mapping is shown in the following formula (4).
[0179] Y = I γ (4)
[0180] Wherein, Y represents the pixel value of a pixel point in the image to be displayed, and I represents the pixel value of a pixel point in the enhanced image. When γ is greater than 1, the Gamma mapping is a "concave-down" curve 1300 in the coordinate system.
[0181] The Gamma mapping can map the pixel value of a pixel point in the enhanced image to the pixel value of a pixel point in the image to be displayed. The range of the pixel value of a pixel point in the enhanced image is [0, 255], and the range of the pixel value of a pixel point in the image to be displayed is [0, 255]. By setting different γ values through the Gamma mapping, different degrees of brightness reduction can be achieved, so that the pixel mean of the image to be displayed is reduced, thereby reducing the power consumption of image display.
[0182] As the value of γ increases, the "concave-down" degree of the curve 1300 increases, the pixel mean of the image to be displayed is smaller, and the more the power consumption is reduced, but the more the picture quality is reduced. Therefore, the specific value of γ can be configured according to actual service requirements and is not limited herein. For example, the value range of γ can be [1, 2.5].
[0183] The above are only exemplary embodiments, but are not limited thereto. Other image display methods known in the art may also be included, as long as the power consumption of image display can be reduced while ensuring the picture display quality.
[0184] Figure 14 A block diagram of an image processing apparatus according to an embodiment of the present disclosure is schematically shown.
[0185] As Figure 14 shown, the image processing apparatus 1400 may include a first acquisition module 1410, a determination module 1420, and a processing module 1430.
[0186] The first acquisition module 1410 is configured to acquire an image to be processed.
[0187] A determination module 1420 is configured to determine a target gray-scale mapping relationship for the image to be processed according to the image features of the image to be processed. The target gray-scale mapping relationship is determined based on a plurality of historical images associated with the image to be processed, and the historical images include images having the same image scene as the image to be processed.
[0188] A processing module 1430 is configured to process the image to be processed by using the target gray-scale mapping relationship to obtain an enhanced image.
[0189] Figure 15 A block diagram of an image display device according to an embodiment of the present disclosure is schematically shown.
[0190] As Figure 15 shown, the image display device 1500 may include a second acquisition module 1510, a power consumption reduction processing module 1520, and a driving device 1530.
[0191] The second acquisition module 1510 is configured to acquire the enhanced image.
[0192] The power consumption reduction processing module 1520 is configured to perform power consumption control processing on the enhanced image to obtain an image to be displayed.
[0193] The driving device 1530 drives the display device to display the image to be displayed. The enhanced image is obtained by using the image processing device 1400.
[0194] Any multiple of the modules according to the embodiments of the present disclosure, or at least part of the functions of any multiple of them, may be implemented in one module. Any one or more of the modules according to the embodiments of the present disclosure may be split into multiple modules for implementation. Any one or more of the modules according to the embodiments of the present disclosure may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on a substrate, a system in a package, an application specific integrated circuit (ASIC), or may be implemented by any other reasonable manner of integrating or packaging circuits, or in any one of the three implementation manners of software, hardware, and firmware, or in a suitable combination of any several of them. Alternatively, one or more of the modules according to the embodiments of the present disclosure may be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding functions may be executed.
[0195] For example, any one or more of the first acquisition module 1410, the determination module 1420, and the processing module 1430, or any one or more of the second acquisition module 1510, the energy consumption reduction processing module 1520, and the driving device 1530 may be combined and implemented in one module, or any one of them may be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the first acquisition module 1410, the determination module 1420, and the processing module 1430, or at least one of the second acquisition module 1510, the energy consumption reduction processing module 1520, and the driving device 1530 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or may be implemented by any other reasonable means such as integrating or packaging circuits, etc., in hardware or firmware, or implemented in any one of the three implementation manners of software, hardware, and firmware, or in an appropriate combination of any several of them. Alternatively, at least one of the first acquisition module 1410, the determination module 1420, and the processing module 1430, or at least one of the second acquisition module 1510, the energy consumption reduction processing module 1520, and the driving device 1530 may be at least partially implemented as a computer program module, and when the computer program module is run, it can execute the corresponding functions.
[0196] It should be noted that the part of the image processing device in the embodiments of the present disclosure corresponds to the part of the image processing method in the embodiments of the present disclosure. For the description of the part of the image processing device, please refer to the part of the image processing method specifically, and details will not be repeated here. The part of the image display device in the embodiments of the present disclosure corresponds to the part of the image display method in the embodiments of the present disclosure. For the description of the part of the image display device, please refer to the part of the image display method specifically, and details will not be repeated here.
[0197] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0198] According to an embodiment of the present disclosure, an electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the method as described above.
[0199] According to an embodiment of the present disclosure, a non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions are used to cause a computer to execute the method as described above.
[0200] According to an embodiment of the present disclosure, a computer program product includes a computer program which, when executed by a processor, implements the method as described above.
[0201] Figure 16 is a block diagram of an electronic device suitable for implementing an image processing method and an image display method according to an embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as, for example, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as, for example, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely exemplary and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0202] As Figure 16 shown, the electronic device 1600 includes a computing unit 1601 which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1602 or a computer program loaded from a storage unit 1608 into a random access memory (RAM) 1603. In the RAM 1603, various programs and data required for the operation of the electronic device 1600 can also be stored. The computing unit 1601, the ROM 1602, and the RAM 1603 are connected to each other via a bus 1604. An input / output (I / O) interface 1605 is also connected to the bus 1604.
[0203] A plurality of components in the electronic device 1600 are connected to the I / O interface 1605, including: an input unit 1606, such as a keyboard, a mouse, etc.; an output unit 1607, such as various types of displays, speakers, etc.; a storage unit 1608, such as a magnetic disk, an optical disk, etc.; and a communication unit 1609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1609 allows the electronic device 1600 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0204] The computing unit 1601 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1601 executes the various methods and processes described above, such as the image processing method. For example, in some embodiments, the image processing method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 1608. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 1600 via the ROM 1602 and / or the communication unit 1609. When the computer program is loaded into the RAM 1603 and executed by the computing unit 1601, one or more steps of the image processing method described above can be executed. Alternatively, in other embodiments, the computing unit 1601 can be configured to execute the image processing method by any other suitable means (e.g., by means of firmware).
[0205] The various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), system-on-a-chip systems (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a dedicated or general-purpose programmable processor, that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0206] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data mining device, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code can be executed entirely on the machine, partially on the machine, as an independent software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0207] In the context of this disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0208] To provide for interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide for interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic, speech, or tactile input).
[0209] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0210] A computer system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
[0211] It should be understood that the various forms of the process shown above can be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solution disclosed in the present disclosure can be achieved, and no limitation is imposed herein.
[0212] The above specific embodiments do not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub - combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present disclosure shall be included within the protection scope of the present disclosure.
Claims
1. An image processing method, comprising: Obtaining an image to be processed; Determining a target gray mapping relationship for the image to be processed according to the image features of the image to be processed, where the target gray mapping relationship is determined based on a plurality of historical images associated with the image to be processed; the historical images include images having the same image scene as the image to be processed; And Processing the image to be processed by using the target gray mapping relationship to obtain an enhanced image.
2. The method according to claim 1, wherein, The image features of the image to be processed include target statistical features; The determining the target gray mapping relationship for the image to be processed according to the image features of the image to be processed includes: Selecting, from M gray mapping relationships, a target gray mapping relationship that matches the image to be processed according to the target statistical features, where M is an integer greater than 1; Wherein, the M gray mapping relationships are obtained by the following operations: By performing histogram equalization processing on the plurality of historical images, determining the gray mapping relationship of each of the plurality of historical images to obtain a plurality of gray mapping relationships; Taking M as the number of clustering centers, clustering the plurality of gray mapping relationships to obtain M first clustering results; and Determining the gray mapping relationships corresponding to the clustering centers of the M first clustering results respectively to obtain the M gray mapping relationships.
3. The method according to claim 2, wherein, The target statistical features are determined by the following operations: Dividing each of the plurality of historical images into a plurality of image blocks; For the nth statistical feature among N statistical features, determining the nth statistical feature value of each of the plurality of image blocks, where n ∈ [1,... N], and N is an integer greater than 1, to obtain a plurality of nth statistical feature values; Taking M as the number of clustering centers, clustering the plurality of nth statistical feature values to obtain M second clustering results; According to the M second clustering results, determining the target statistical features for the plurality of historical images among the N statistical features.
4. The method according to claim 3, wherein, The determining the target statistical features for the plurality of historical images among the N statistical features according to the M second clustering results includes: Determining the M second clustering results of each of the N statistical features, comparing them with the M first clustering results to obtain a plurality of similarities; Taking the statistical feature corresponding to the highest similarity among the plurality of similarities as the target statistical feature.
5. The method according to claim 2, wherein The M first clustering results represent M categories; the target statistical features are determined by the following operations: For the nth statistical feature among N statistical features, determining the nth feature value of the plurality of historical images belonging to each category, where n ∈ [1,... N], and N is an integer greater than 1, to obtain M nth feature values; Determining, in order of magnitude, the plurality of distances between adjacent two of the M nth feature values among the M nth feature values, and determining the sum of the distances of the plurality of distances to obtain N sums of distances; Determining the target sum of distances having the largest value among the N sums of distances; And Determining the target statistical feature among the N statistical features corresponding to the target sum of distances.
6. The method according to any one of claims 2 to 5, wherein, Among the M gray-scale mapping relationships, selecting a target gray-scale mapping relationship that matches the to-be-processed image according to the target statistical feature includes: Determining a target statistical feature value of the to-be-processed image; Determining the statistical feature values of the M gray-scale mapping relationships respectively, and the statistical feature values that match the target statistical feature value; and Selecting the gray-scale mapping relationship corresponding to the matched statistical feature value as the target gray-scale mapping relationship; Wherein, the statistical feature value characterizes the statistical distribution of each of the M gray-scale mapping relationships for the target statistical feature.
7. The method according to claim 6, wherein, The statistical feature value is obtained by the following operations: Determining, among the multiple historical images, representative images corresponding to the cluster centers of the M first clustering results respectively, to obtain M representative images; And For the target statistical feature, determining the statistical feature values of the M representative images respectively as the statistical feature values of the M gray-scale mapping relationships.
8. The method according to claim 1, wherein, Determining a target gray-scale mapping relationship for the to-be-processed image according to the image feature of the to-be-processed image includes: Dividing the to-be-processed image to obtain a plurality of cascaded image blocks; and Inputting the plurality of image blocks into a trained deep learning model to obtain the target gray-scale mapping relationship.
9. The method according to claim 8, wherein, Inputting the plurality of image blocks into a trained deep learning model to obtain the target gray-scale mapping relationship includes: Extracting the image features of the plurality of image blocks and processing the image features to obtain M weights; Using the M weights to weight M unweighted gray-scale mapping relationships to obtain M weighted gray-scale mapping relationships; and Combining the M weighted gray-scale mapping relationships to obtain the target gray-scale mapping relationship.
10. The method according to claim 9, wherein The trained deep learning model is obtained by the following operations: Inputting a sample image into the deep learning model to obtain an output gray-scale mapping relationship; Determining a first difference between the output gray-scale mapping relationship and the gray-scale mapping relationship label of the sample image; Adjusting the parameters of the weight generation module and the values of the M initial gray-scale mapping relationships to converge the first difference; And Taking the deep learning model in the case where the first difference converges as the trained deep learning model, and taking the M initial gray-scale mapping relationships in the case where the first difference converges as the M unweighted gray-scale mapping relationships.
11. The method according to claim 8, wherein, The trained deep learning model is obtained by the following operations: Inputting a sample image into the deep learning model to obtain an output gray-scale mapping relationship; Processing the sample image by using the output gray-scale mapping relationship to obtain an enhanced image; Determining a second difference between the image quality evaluation index of the enhanced image and the image quality evaluation index of the sample image; Adjusting the parameters of the weight generation module and the values of the M initial gray-scale mapping relationships to converge the second difference; And Taking the deep learning model in the case where the second difference converges as the trained deep learning model, and taking the M initial gray-scale mapping relationships in the case where the second difference converges as the M unweighted gray-scale mapping relationships.
12. The method according to claim 11, wherein, The image quality evaluation index includes at least one of the following: Contrast; Clarity-related indicators; Noise-related indicators; Brightness-related indicators; and Color-related indicators.
13. The method according to any one of claims 1 to 12, wherein, The obtaining of the image to be processed includes: Determining a luminance component image of the original image; and Downsampling the luminance component image to obtain the image to be processed.
14. An image display method, including: Obtaining an enhanced image; Performing power consumption control processing on the enhanced image to obtain an image to be displayed; And Driving a display device to display the image to be displayed; Wherein, the enhanced image is processed by using the method according to any one of claims 1 to 13.
15. An image processing apparatus, including: A first obtaining module, configured to obtain an image to be processed; A determining module, configured to determine a target gray-scale mapping relationship for the image to be processed according to the image features of the image to be processed, where the target gray-scale mapping relationship is determined based on a plurality of historical images associated with the image to be processed, and the historical images include images having the same image scene as the image to be processed; And A processing module, configured to process the image to be processed by using the target gray-scale mapping relationship to obtain an enhanced image.
16. An image display apparatus, including: A second obtaining module, configured to obtain an enhanced image; A power consumption reduction processing module, configured to perform power consumption control processing on the enhanced image to obtain an image to be displayed; And A driving device, configured to drive a display device to display the image to be displayed; Wherein, the enhanced image is obtained by using the apparatus according to claim 15.
17. An electronic device, including: One or more processors; A storage device, configured to store one or more programs, Wherein, when the one or more programs are executed by the one or more processors, the one or more processors are caused to execute the method according to any one of claims 1 to 14.
18. A computer-readable storage medium, on which executable instructions are stored, and when the instructions are executed by a processor, the processor is caused to execute the method according to any one of claims 1 to 14.
19. A computer program product, including a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 14 is implemented.