Image optimization method and device, storage medium and electronic device
By dividing the image area and matching the target color gamut, the problem of poor image display effect caused by global fixed color gamut in the prior art is solved, and higher color richness and scene color restoration are achieved.
Patent Information
- Application Number
- CN202210199646.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-01
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2042-03-01
Smart Images

Figure CN114581289B_ABST
Abstract
Description
Background Art
[0002] As mobile terminals become smarter, people's requirements for display effects are getting higher and higher.
[0003] In the prior art, the display effect of the display screen is achieved by adjusting the display effect parameters in the early stage, and the color gamut corresponding to each parameter can only be displayed in a global fixed mode, resulting in a poor display effect of the output image.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The purpose of the present disclosure is to provide an image optimization method, an image optimization device, a computer-readable medium and an electronic device, thereby improving the display effect of the image at least to a certain extent.
[0006] According to a first aspect of the present disclosure, there is provided an image optimization method, comprising: acquiring an image to be processed, and dividing the image to be processed into regions to obtain an initial image of each region; matching a corresponding target color gamut for the initial image of each region; and performing a color gamut conversion on the image to be processed according to the target color gamut corresponding to each region to obtain a target image.
[0007] According to a second aspect of the present disclosure, there is provided an image optimization device, comprising: a division module, used to acquire an image to be processed, and divide the image to be processed into regions to obtain initial images of each of the regions; a matching module, used to match the initial images of each of the regions with corresponding target color gamuts; and a conversion module, used to perform color gamut conversion on the image to be processed according to the target color gamuts corresponding to each of the regions to obtain a target image.
[0008] According to a third aspect of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented.
[0009] According to a fourth aspect of the present disclosure, an electronic device is provided, characterized in that it includes: one or more processors; and a memory for storing one or more programs, which enables the one or more processors to implement the above method when the one or more programs are executed by the one or more processors.
[0010] An image optimization method provided by an embodiment of the present disclosure obtains an image to be processed, divides the image to be processed into regions to obtain initial images of each region; matches the initial images of each region with a corresponding target color gamut; and performs color gamut conversion on the image to be processed according to the target color gamut corresponding to each region to obtain a target image. Compared with the prior art, different color gamuts are matched for the initial images of different regions of the image to be processed, so that the color richness of the obtained target image is higher, the real scene color restoration of the image is improved, and the display effect of the image is improved.
[0011] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0013] Figure 1 A schematic diagram showing an exemplary system architecture to which embodiments of the present disclosure may be applied;
[0014] Figure 2 A flowchart of an image optimization method in an exemplary embodiment of the present disclosure is schematically shown;
[0015] Figure 3 A flowchart for matching a target color gamut in an exemplary embodiment of the present disclosure is schematically shown;
[0016] Figure 4 A schematic diagram schematically illustrates a region division in an exemplary embodiment of the present disclosure;
[0017] Figure 5 A flowchart for updating a target image in an exemplary embodiment of the present disclosure is schematically shown;
[0018] Figure 6 A flowchart for describing in detail an image optimization method in an exemplary embodiment of the present disclosure is schematically shown;
[0019] Figure 7 A flowchart schematically illustrates a method for optimizing an image after setting color compensation in an exemplary embodiment of the present disclosure;
[0020] Figure 8 The figure schematically shows the composition of the image optimization device in the exemplary embodiment of the present disclosure.
[0021] Fig. 9 A schematic diagram showing an electronic device to which the embodiments of the present disclosure can be applied; DETAILED DESCRIPTION
[0022] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0023] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0024] Figure 1 The schematic diagram of the system architecture is shown, and the system architecture 100 may include a terminal 110 and a server 120. The terminal 110 may be a terminal device such as a smart phone, a tablet computer, a desktop computer, a laptop computer, etc. The server 120 generally refers to a background system that provides image optimization related services in this exemplary embodiment, and may be a server or a cluster formed by multiple servers. The terminal 110 and the server 120 may be connected via a wired or wireless communication link to perform data exchange.
[0025] In one implementation, the image optimization method may be performed by the terminal 110. For example, after a user uses the terminal 110 to shoot an image or the user selects an image from an album of the terminal 110, the terminal 110 optimizes the image and outputs a target image.
[0026] In one implementation, the image optimization method may be performed by the server 120. For example, after a user uses the terminal 110 to take a picture or the user selects an image from the photo album of the terminal 110, the terminal 110 uploads the image to the server 120, and the server 120 optimizes the image and returns the target image to the terminal 110.
[0027] As can be seen from the above, the execution subject of the image optimization method in this exemplary embodiment may be the terminal 110 or the server 120, and the present disclosure does not limit this.
[0028] The exemplary embodiment of the present disclosure also provides an electronic device for executing the above-mentioned image optimization method, and the electronic device may be the above-mentioned terminal 110 or the server 120. Generally, the electronic device may include a processor and a memory, the memory is used to store executable instructions of the processor, and the processor is configured to execute the above-mentioned image optimization method by executing the executable instructions.
[0029] In the related technology, when displaying images, it is based on the overall color gamut. Once the color gamut is set, it is displayed globally. For example, when playing a video, the overall color gamut of the picture is a single one. This effect causes some scenes, such as night or landscape interfaces, to have some details that are blurred or have a single color. Since the size of the mobile phone camera photosensitive device limits the light input, the details of the photos taken are not good and the color gamut is single when displayed.
[0030] Based on the above shortcomings, this disclosure first proposes a new image optimization method. Figure 2 The image optimization method in this exemplary embodiment is described. Figure 2 An exemplary process of the image optimization method is shown, which may include:
[0031] Step S210, obtaining an image to be processed, and dividing the image to be processed into regions to obtain initial images of each region;
[0032] Step S220, matching the initial image of each area with a corresponding target color gamut;
[0033] Step S230, performing color gamut conversion on the image to be processed according to the target color gamut corresponding to each of the regions to obtain a target image.
[0034] Based on the above method, compared with the existing technology, different color gamuts are matched for the initial images of different areas of the image to be processed, so that the color richness of the obtained target image is higher, the real scene color restoration of the image is improved, and the display effect of the image is improved.
[0035] Below Figure 2 Each step in the procedure is described in detail.
[0036] refer to Figure 2 In step S210, an image to be processed is obtained, and the image to be processed is divided into regions to obtain initial images of each region.
[0037] In an exemplary implementation of the present disclosure, when the above-mentioned image to be processed is divided into regions, image edge segmentation can be used to complete it, wherein the edge is a collection of grayscale mutation pixels in the image, and differentials can be used for detection. For example, the Roberts operator, Prewitt operator, Sobel operator can be used to complete the region division, and the Marr-Hilderth edge detector and Canny edge detector can also be used to complete the region division, which is not specifically limited in this exemplary implementation.
[0038] In another exemplary implementation of the present disclosure, when dividing the above-mentioned image to be processed into regions, the image can be divided into regions by using image threshold segmentation, morphological watershed algorithm, etc.
[0039] Specifically, when performing region division, the feature extraction of the above-mentioned image to be processed can be first performed to obtain feature information, wherein the feature information can be image grayscale value features, target boundary features, texture features, morphological features, information entropy, energy functional, etc., which are not specifically limited in this example implementation.
[0040] The regions may include background regions and target regions, and may also be divided more finely. For example, if there are people, animals, etc. in the image, the regions where the person images are located and the regions where the animal images are located may be divided into separate regions to obtain the initial images corresponding to each region.
[0041] For example, when using the grayscale value feature of the above image to segment the image, the target area and the background area of the image have a very obvious brightness difference. A brightness value can be set, and the area below the value is considered to be the background area, and the area above the value is considered to be the target area. The above brightness value confirmation method can be implemented by using a threshold segmentation algorithm, such as OTSU, iterative method, maximum entropy method, etc.
[0042] It should be noted that when dividing the image to be processed into regions, there are many ways to adopt the method, and the size and refinement of the region division can also be customized according to user needs, which is not specifically limited in this example implementation.
[0043] In an example implementation of the present disclosure, it is possible to respond to a user's operation of turning on an image optimization function, thereby obtaining an image to be processed, and dividing the image to be processed into regions to obtain initial images of each region. At this time, if the user does not turn on the image optimization function, the image to be processed will not be optimized, and the image to be processed will be directly displayed as the target image.
[0044] In step S220, the initial image of each area is matched with a corresponding target color gamut.
[0045] In an exemplary embodiment of the present disclosure, after obtaining the above initial image, referring to Figure 3 As shown, matching the corresponding target color gamut for the initial image of each region may include steps S310 to S330, specifically:
[0046] In step S310, a feature image corresponding to the initial image of each region is obtained.
[0047] It can be based on the initial corresponding feature images of the above-mentioned each area, wherein the feature image is obtained by extracting features from the above-mentioned initial image, and the feature image includes image grayscale value features, target boundary features, texture features, morphological features, information entropy, energy functional and other features of the initial image.
[0048] In this example implementation, the above-mentioned feature extraction methods may include grayscale co-occurrence matrix method, Fourier power spectrum method, histogram method, cumulative histogram method, color clustering method, etc., and may also be implemented using image extraction models. It may also be customized according to user needs and Xining, and is not specifically limited in this example implementation.
[0049] In step S320, a mapping relationship between the feature image and the color gamut is obtained;
[0050] In step S330, a target color gamut corresponding to the initial image in each of the regions is determined according to the feature image and the mapping relationship.
[0051] In an example implementation of the present disclosure, a database may be established, which includes a mapping relationship between a feature image and a color gamut, and the mapping relationship may be obtained by looking up a table. After obtaining the mapping relationship, the target color gamut of each initial image may be determined according to the corresponding relationship between the feature image and the initial image and the mapping relationship.
[0052] In another example implementation of the present disclosure, a machine learning model may be used to obtain a corresponding mapping relationship and determine a target color gamut corresponding to each region. For example, a target color gamut matching model may be used to determine the target color gamut corresponding to each of the above regions.
[0053] Among them, the above-mentioned target color gamut matching model is mainly a neural network model based on deep learning. For example, the target color gamut matching model can be based on a feedforward neural network. The feedforward network can be implemented as an acyclic graph, in which nodes are arranged in layers. Generally, the feedforward network topology includes an input layer and an output layer, and the input layer and the output layer are separated by at least one hidden layer. The hidden layer transforms the input received by the input layer into a representation useful for generating an output in the output layer. The network nodes are fully connected to the nodes in the adjacent layers via edges, but there are no edges between the nodes in each layer. The data received at the nodes of the input layer of the feedforward network is propagated (i.e., "feedforward") to the nodes of the output layer via an activation function, and the activation function calculates the state of the nodes of each continuous layer in the network based on coefficients ("weights"), and the coefficients are respectively associated with each of the edges connecting these layers. The output of the application detection model can take various forms, and the present disclosure is not limited to this. The application detection model can also include other neural network models, such as convolutional neural network (CNN) models, recurrent neural network (RNN) models, and generative adversarial networks (GAN) models, but is not limited thereto, and other neural network models known to those skilled in the art can also be used.
[0054] The target color gamut matching model needs to be obtained through training with training data. An initial model can be obtained first. The training of the initial model using the training algorithm mentioned above may include the following steps: selecting a network topology; using a set of training data representing the problem modeled by the network; and adjusting the weights until the network model exhibits the minimum error for all instances of the training data set. For example, during the supervised learning training process for a neural network, the output generated by the network in response to the input representing an instance in the training data is compared with the "correct" labeled output of the instance; an error signal representing the difference between the output and the labeled output is calculated; and when the error signal is propagated backward through the layers of the network, the weights associated with the connection are adjusted to minimize the error. When the error of each output generated from the instance of the training data set is minimized, the initial model is considered to be "trained" and defined as the target color gamut matching model.
[0055] The training data include characteristic images and standard color gamuts corresponding to the characteristic images, wherein the annotated color gamuts corresponding to the characteristic images can be annotated manually.
[0056] In this example embodiment, after obtaining the above-mentioned target color gamut matching model, the above-mentioned feature image can be input into the above-mentioned target color gamut matching model to obtain the target color gamut corresponding to the feature image, and then the target color gamut corresponding to each of the above-mentioned initial images is determined according to the correspondence between the above-mentioned feature image and the initial image.
[0057] In a disclosed example implementation, the types of the target color gamut may include sRGB color gamut, HDR color gamut, P3 color gamut, Adobe RGB color gamut, etc., which are not specifically limited in this example implementation.
[0058] In step S230, the color gamut of the image to be processed is converted according to the target color gamut corresponding to each of the regions to obtain a target image.
[0059] In an exemplary embodiment of the present disclosure, after determining the target color gamut corresponding to each of the above regions, the above image to be processed can be converted to obtain the target image. Specifically, the initial color gamut corresponding to the graphics of each region is determined; the initial image of the region where the initial color gamut is different from the target color gamut is converted to obtain the target image. That is, the region where the initial color gamut and the target color gamut are the same is not converted to reduce the workload of the processor.
[0060] In an example implementation of the present disclosure, a color gamut conversion intermediate image can be first performed on the image to be processed according to the target color gamut corresponding to each area, and then the connection between the areas with different color gamuts in the intermediate image is blurred to obtain the target image. After the blurring, the connection between the areas with different color gamuts can be made smoother, so that the image display effect is better.
[0061] For example, refer to Figure 4 As shown, if the above-mentioned area includes area A, area B, area C and area D, the color gamut matched by area A is the sRGB color gamut, the color gamut matched by area B is the HDR color gamut, the color gamut matched by area C is the P3 color gamut, and the color gamut matched by area D is the Adobe RGB color gamut. At this time, the area 401 where the areas with different color gamuts are connected can be blurred, thereby making the connection between the areas with different color gamuts smoother, so that the image display effect is better.
[0062] In an exemplary embodiment of the present disclosure, referring to Figure 5 As shown, the image optimization method may further include an auxiliary processing process. Specifically, the process from step S510 to step S520 may be performed for the initial image of each region.
[0063] In step S510, a reference image matching the region is acquired from a database according to the feature image.
[0064] In an example implementation of the present disclosure, a reference image having a similarity with the initial image greater than or equal to a preset value can be searched in a cloud server based on the feature image. In this example implementation, the similarity includes shape similarity and color similarity, wherein the color similarity can be determined using the error value of the pixel point.
[0065] In this example implementation, the preset value may be 0.8, 0.9, etc., and may also be customized according to user needs, which is not specifically limited in this example implementation.
[0066] In step S520, color compensation is performed on the target image according to the reference image to update the target image.
[0067] In this example implementation, if there is a reference image whose similarity is also greater than or equal to a preset value, the difference between the pixel value of the initial image and the pixel value of the corresponding area of the reference image can be determined. When the error value meets the preset conditions, the reference image can be used to perform color compensation on the target image to obtain the target image.
[0068] Specifically, the pixel value of the reference image and the pixel value of the target image may be weighted averaged to obtain the pixel value of the target image.
[0069] In this example implementation, the reference images stored in the cloud server are all images with a high degree of true restoration. Using the reference images to update the target image can make the output target image have a higher degree of true restoration.
[0070] In this example implementation, refer to Figure 6 As shown, the above image optimization method is described in detail. First, step S610 can be executed to display the image to be processed, and then step S620 can be executed to determine whether the image optimization function is turned on. If so, step S630 is executed to extract features of the image to be processed, and then step S640 is executed to divide the image to be processed into regions. Specifically, the image to be processed is divided into regions according to the feature information obtained by the above feature extraction, and then step S650 is executed to perform color gamut calibration on each region, that is, the initial image of each region matches the target color gamut, and the initial color gamut corresponding to the graphics of each region is determined, and the region where the target color gamut is different from the initial color gamut is determined, and then step S660 is executed to perform color gamut conversion on the region where the target color gamut is different from the initial color gamut. Then step S670 is executed to perform blur processing on the region where the regions with different color gamuts are connected to obtain the target image. If the image optimization function is not turned on, step S631 is directly executed to output the image to be processed as the target image.
[0071] In an exemplary embodiment of the present disclosure, referring to Figure 7 As shown, after executing step S640 and before executing step S670, step S680 may be further executed to obtain a reference image corresponding to the initial image in the cloud server, and then step S690 may be executed to perform color compensation using the reference image.
[0072] In summary, in this exemplary embodiment, different color gamuts are matched for the initial images of different areas of the image to be processed, so that the color richness of the obtained target image is higher, the real scene color restoration of the image is improved, and the display effect of the image is improved. Furthermore, a reference image with a higher degree of real restoration corresponding to the initial image is obtained in the cloud server to perform color compensation on the target image to update the target image, which can improve the real restoration of the output target image and improve the display effect of the target image.
[0073] It should be noted that the above figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0074] For further reference, Figure 8 As shown, in the implementation of this example, an image optimization device 800 is also provided, including a division module 810, a matching module 820 and a conversion module 830. Among them:
[0075] The division module 810 can be used to obtain an image to be processed, and divide the image to be processed into regions to obtain initial images of each region; specifically, extract features from the image to be processed to obtain feature information; and divide the image to be processed into regions according to the feature information.
[0076] The matching module 820 can be used to match the corresponding target color gamut for the initial image of each of the areas. Specifically, obtain the feature image corresponding to the initial image of each of the areas; obtain the mapping relationship between the feature image and the color gamut; and determine the target color gamut corresponding to the initial image in each of the areas based on the feature image and the mapping relationship.
[0077] The conversion module 830 can be used to perform color gamut conversion on the image to be processed according to the target color gamut corresponding to each of the regions to obtain a target image. Specifically, the initial color gamut corresponding to the graphics of each of the regions is determined; and the initial image of the region where the initial color gamut is not consistent with the target color gamut is converted into the target image.
[0078] The conversion module 830 may also perform color gamut conversion on the image to be processed to obtain an intermediate image according to the target color gamut corresponding to each of the regions; and perform blurring processing on the connection between regions with different color gamuts in the intermediate image to obtain the target image.
[0079] In an exemplary embodiment, the above-mentioned image optimization device may further include an updating module, which may be used to perform the following operations for the initial image of each region: obtaining a reference image adapted to the region in a database according to the feature image; performing color compensation on the target image according to the reference image to update the target image. Specifically, determining the error between the pixel value of the initial image of the region and the pixel value of the reference image; in response to the error satisfying a preset condition, performing color compensation on the target image using the reference image to update the target image.
[0080] The specific details of each module in the above device have been described in detail in the implementation method of the method part. The undisclosed details can be found in the implementation method of the method part, so they will not be repeated here.
[0081] Below Fig. 9 The mobile terminal 900 in FIG. 1 is taken as an example to exemplify the structure of the electronic device. It should be understood by those skilled in the art that, in addition to the components specifically used for mobile purposes, Fig. 9 The construction in can also be applied to fixed type equipment.
[0082] like Fig. 9 As shown, the mobile terminal 900 may specifically include: a processor 901, a memory 902, a bus 903, a mobile communication module 904, an antenna 1, a wireless communication module 905, an antenna 2, a display screen 906, a camera module 907, an audio module 908, a power module 909 and a sensor module 910.
[0083] The processor 901 may include one or more processing units, for example, the processor 910 may include an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor and / or an NPU (Neural-Network Processing Unit), etc. The image optimization method in this exemplary embodiment may be executed by an AP, a GPU or a DSP, and when the method involves processing related to a neural network, it may be executed by an NPU.
[0084] The encoder can encode (i.e. compress) an image or video, for example, the target image can be encoded into a specific format to reduce the data size for easy storage or transmission. The decoder can decode (i.e. decompress) the encoded data of the image or video to restore the image or video data, such as reading the encoded data of the target image, decoding it through the decoder to restore the data of the target image, and then perform relevant processing on the data for image optimization. The mobile terminal 200 can support one or more encoders and decoders. In this way, the mobile terminal 900 can process images or videos in multiple encoding formats, such as: JPEG (Joint Photographic Experts Group), PNG (Portable Network Graphics), BMP (Bitmap) and other image formats, MPEG (Moving Picture Experts Group) 1, MPEG2, H.263, H.264, HEVC (High Efficiency Video Coding) and other video formats.
[0085] The processor 901 may be connected to the memory 902 or other components via a bus 903 .
[0086] The memory 902 may be used to store computer executable program codes, which include instructions. The processor 901 executes various functional applications and data processing of the mobile terminal 900 by running the instructions stored in the memory 902. The memory 902 may also store application data, such as images, videos, and other files.
[0087] The communication function of the mobile terminal 200 can be implemented by the mobile communication module 904, antenna 1, wireless communication module 905, antenna 2, modulation and demodulation processor and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The mobile communication module 904 can provide 2G, 3G, 4G, 5G and other mobile communication solutions applied to the mobile terminal 900. The wireless communication module 905 can provide wireless communication solutions such as wireless LAN, Bluetooth, near field communication, etc. applied to the mobile terminal 900.
[0088] The display screen 906 is used to implement display functions, such as displaying user interfaces, images, videos, etc. The camera module 907 is used to implement shooting functions, such as shooting images, videos, etc. The audio module 908 is used to implement audio functions, such as playing audio, collecting voice, etc. The power module 909 is used to implement power management functions, such as charging the battery, powering the device, monitoring the battery status, etc. The sensor module 910 may include a depth sensor 9101, a pressure sensor 9102, a gyroscope sensor 9103, an air pressure sensor 9104, etc., to implement corresponding sensing detection functions.
[0089] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0090] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium on which a program product capable of implementing the above-mentioned method of the present specification is stored. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of the present specification.
[0091] It should be noted that the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0092] In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0093] In addition, program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0094] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0095] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An image optimization method, characterized in that: include: Acquire an image to be processed, and divide the image to be processed into regions to obtain initial images of each region; Matching the corresponding target color gamut for the initial image of each of the regions, including: obtaining a feature image corresponding to the initial image of each of the regions; obtaining a mapping relationship between the feature image and the color gamut; and determining the target color gamut corresponding to the initial image in each of the regions according to the feature image and the mapping relationship; Performing color gamut conversion on the image to be processed according to the target color gamut corresponding to each of the regions to obtain a target image; The method further comprises: For each region’s initial image, perform the following operations: Acquiring a reference image adapted to the region in a database according to the feature image; Performing color compensation on the target image according to the reference image to update the target image.
2. The method according to claim 1, characterized in that Performing color compensation on the target image according to the reference image to update the target image comprises: determining an error between pixel values of the initial image of the region and pixel values of the reference image; In response to the error satisfying a preset condition, the target image is color compensated using the reference image to update the target image.
3. The method according to claim 1, characterized in that The step of converting the color gamut of the image to be processed to obtain the target image according to the target color gamut corresponding to each of the regions comprises: Determine an initial color gamut corresponding to the graphics of each of the regions; The target image is obtained by performing color gamut conversion on the initial image in the area where the initial color gamut is inconsistent with the target color gamut.
4. The method according to claim 1, characterized in that: The step of converting the color gamut of the image to be processed to obtain the target image according to the target color gamut corresponding to each of the regions comprises: Performing color gamut conversion on the image to be processed according to the target color gamut corresponding to each of the regions to form an intermediate image; The target image is obtained by performing blur processing on the connection between the regions with different color gamuts in the intermediate image.
5. The method according to claim 1, characterized in that The region division of the image to be processed comprises: Extracting features from the image to be processed to obtain feature information; The image to be processed is divided into regions according to the feature information.
6. An image optimization device, characterized in that: include: A division module, used for acquiring an image to be processed, and dividing the image to be processed into regions to obtain initial images of each region; A matching module, used for matching the corresponding target color gamut for the initial image of each of the regions, comprising: obtaining a feature image corresponding to the initial image of each of the regions; obtaining a mapping relationship between the feature image and the color gamut; and determining the target color gamut corresponding to the initial image in each of the regions according to the feature image and the mapping relationship; A conversion module, used for performing color gamut conversion on the image to be processed according to the target color gamut corresponding to each of the regions to obtain a target image; The device is also used to perform the following operations for the initial image of each area: obtaining a reference image adapted to the area in a database according to the feature image; and performing color compensation on the target image according to the reference image to update the target image.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the image optimization method according to any one of claims 1 to 5 is implemented.
8. An electronic device, characterized in that: include: one or more processors; as well as A memory for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the image optimization method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Space color gamut mapping method and space color gamut mapping device
CN107578384A
Image processing apparatus, display apparatus, and image processing system and method, for displaying image data
US20150243248A1