CN118379949A - Image display method, device, electronic equipment and storage medium - Google Patents
Image display method, device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN118379949A CN118379949A CN202410584438.2A CN202410584438A CN118379949A CN 118379949 A CN118379949 A CN 118379949A CN 202410584438 A CN202410584438 A CN 202410584438A CN 118379949 A CN118379949 A CN 118379949A
- Authority
- CN
- China
- Prior art keywords
- image
- gamma value
- display device
- displayed
- target display
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000012937 correction Methods 0.000 claims description 64
- 238000006243 chemical reaction Methods 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 18
- 239000003086 colorant Substances 0.000 abstract description 9
- 230000000694 effects Effects 0.000 abstract description 7
- 238000010586 diagram Methods 0.000 description 12
- 230000004075 alteration Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 6
- 230000009286 beneficial effect Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000003384 imaging method Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000004737 colorimetric analysis Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000003595 spectral effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G3/00—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
- G09G3/20—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2340/00—Aspects of display data processing
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2340/00—Aspects of display data processing
- G09G2340/06—Colour space transformation
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Color Image Communication Systems (AREA)
- Controls And Circuits For Display Device (AREA)
- Processing Of Color Television Signals (AREA)
Abstract
The application relates to the technical field of image display, and provides an image display method, an image display device, electronic equipment and a storage medium. The method comprises the following steps: acquiring an image to be displayed; determining a first standard gamma value corresponding to an image color space of an image to be displayed, and correcting the gamma value of the image to be displayed based on the first standard gamma value to obtain a first intermediate image; converting the first intermediate image from the image color space to a device color space of the target display device to obtain a second intermediate image; and determining the gamma value of the target display device, and correcting the gamma value of the second intermediate image based on the gamma value of the target display device to obtain a target image. According to the scheme, when the images to be displayed are displayed on different display devices, the effect that the display colors are unified or similar can be achieved.
Description
Technical Field
The present application relates to the field of image display technologies, and in particular, to an image display method, an image display device, an electronic device, and a storage medium.
Background
Gamma values (Gamma values) and Color Space (Color Space) are two closely related concepts in image processing and display technology that are related to each other but each has different emphasis. In colorimetry, various color models are established, and a certain color is represented by one-dimensional, two-dimensional, three-dimensional or even four-dimensional space coordinates, and a color range or a color space can be defined by the coordinate system. The gamma value of the display device mainly describes the non-linear relation of the image signal strength to the actual display.
Currently, the gamma value and color space of different display devices may be different, and the gamma value and color space directly affect the final display color of the image, so that the color displayed by the same image in different display devices may be different, which may bring about a bad experience for the user. Therefore, there is a need for an image display method that can improve the problem.
Disclosure of Invention
In view of the foregoing, it is desirable to provide an image display method, an image display device, an electronic apparatus, and a storage medium.
The embodiment of the application provides an image display method, which comprises the following steps:
Acquiring an image to be displayed;
determining a first standard gamma value corresponding to an image color space of the image to be displayed, and correcting the gamma value of the image to be displayed based on the first standard gamma value to obtain a first intermediate image;
converting the first intermediate image from the image color space to a device color space of a target display device to obtain a second intermediate image;
And determining the gamma value of the target display device, correcting the gamma value of the second intermediate image based on the gamma value of the target display device, and obtaining a target image to display the target image through the target display device.
An embodiment of the present application provides an image display apparatus including:
the first acquisition module is used for acquiring an image to be displayed;
The first determining module is used for determining a first standard gamma value corresponding to the image color space of the image to be displayed, correcting the gamma value of the image to be displayed based on the first standard gamma value, and obtaining a first intermediate image;
A first conversion module, configured to convert the first intermediate image from the image color space to a device color space of a target display device, to obtain a second intermediate image;
a second determining module, configured to determine a gamma value of the target display device, and correct the gamma value of the second intermediate image based on the gamma value of the target display device, to obtain a target image;
and the first display module is used for displaying the target image through the target display equipment.
The embodiment of the application provides electronic equipment, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the steps of the image display method provided by any embodiment of the application when executing the computer program.
An embodiment of the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the image display method provided by any embodiment of the present application.
According to the image display method, the device, the electronic equipment and the storage medium, the gamma value of the image to be displayed can be corrected based on the first standard gamma value to obtain the first intermediate image, the first intermediate image can be converted into the equipment color space of the target display equipment from the image color space to obtain the second intermediate image, the gamma value of the second intermediate image can be corrected based on the gamma value of the target display equipment to obtain the target image, the image to be displayed can be converted into the equipment color space of the target display equipment to obtain the target image through the three corrections (or compensations), and chromatic aberration caused by different color spaces and display ranges of the image to be displayed and the target display equipment is compensated, so that the effect that the display colors are uniform or similar can be achieved when the image to be displayed is displayed on different display equipment.
Drawings
FIG. 1 is a diagram showing the relationship between the input luminance value and the output luminance value corresponding to different gamma values in one embodiment;
FIG. 2 is a schematic diagram of luminance linearization actually displayed when the gamma value of an image and the gamma value of a display device are reciprocal in one embodiment;
FIG. 3 is a schematic diagram of color gamuts of different color spaces in one embodiment;
FIG. 4 is a flow chart of an image display method according to an embodiment;
FIG. 5 is a schematic diagram of an image display device according to an embodiment;
fig. 6 is a schematic structural diagram of an electronic device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
Color space conversion is extremely widely spread during image processing, for example, image color conversion is required during imaging such as: converting from an RGB color space to a YUV color space; for another example, the image color needs to be converted during the display process, such as: conversion from sRGB color space to P3 color space, etc.
Each color space contains a unique gamma value for that color space, which non-linearly maps luminance. The pixel value of each pixel includes not only chrominance information but also luminance information, such as: pixel values that do not contain any color, only luminance: black (0, 0), white (255, 255, 255), when the RGB values are equal, the pixel has no chromaticity information and only luminance information, but different luminance values, the corresponding white saturation is different, rgb= (0, 0) indicates that the saturation of the pixel value white is 0, and rgb= (255, 255, 255) indicates that the white saturation of the pixel value is 100, from which the influence of the saturation (or luminance value) on the color can be seen. Since the gamma value is typically an exponential function, the brightness is mapped non-linearly, as shown in fig. 1, so the effect of different gamma values on color is also different.
In the existing display device, each display device includes a built-in gamma module, and performs DeGamma operations on the image to linearize the actually displayed brightness, in which, in theory, the gamma value of the built-in gamma module of the display device and the gamma value of the image should be in a reciprocal relationship, so that the actually displayed brightness can be linearized, as shown in fig. 2. However, the gamma value of the existing display device is a specified function, and there are several alternatives as follows: 2.2, 2.0, 2.4, etc., so that if the gamma value of the display device is not reciprocal to the gamma value of the image, the actually displayed brightness is not linear, and thus the color of the image is affected and the color of the image is not the original color of the image.
Since the gamma values of the display devices cannot be dynamically adjusted, the brightness actually displayed is not linear enough, and the color spaces of different display devices are different, and the different color spaces correspond to different gamma values, the colors displayed by the same picture in different display devices are different. For example, the color space of an image is sRGB, and the color spaces of two different display devices for displaying the image are 135% sRGB and P3, respectively, so that the red (255, 0) of the original image is displayed in the 135% sRGB and P3 color spaces according to (255, 0), and the representation of red is different in the different color spaces, as shown in fig. 3, because the corresponding colors of (255, 0) are different.
In view of this, the present disclosure provides an image display method applicable to an image display scene, which may be performed by an image display apparatus, which may be implemented in software and/or hardware, and which may be integrated on an electronic device. The electronic device may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
In this embodiment, as shown in fig. 4, the method includes the following steps:
Step 401, an image to be displayed is acquired.
Specifically, the image to be displayed may be any image to be displayed on the target display device.
Step 402, determining a first standard gamma value corresponding to an image color space of an image to be displayed, and correcting the gamma value of the image to be displayed based on the first standard gamma value to obtain a first intermediate image.
Specifically, the image color space is a color space corresponding to an image to be displayed.
Color space is a way to define colors, which provides a framework describing how colors are represented in a three-dimensional coordinate system (typically red, green, blue or spectral values, saturation and brightness, etc.).
Specifically, the first standard gamma value is a unique, standard gamma value corresponding to an image color space specified by the International Color Consortium (ICC). For example, the standard gamma value for sRGB is 2.2.
Specifically, there are various specific ways of determining the first standard gamma value, and a typical example will be described below, but the present application is not limited thereto.
In some embodiments, determining a first standard gamma value corresponding to an image color space of an image to be displayed includes: analyzing the image to be displayed to obtain a corresponding ICC color characteristic file; a first standard gamma value is extracted from the ICC color profile.
In particular, an ICC Profile (ICC Profile) is a set of data describing characteristics of a color input, output device, or some color space, named by its specifications made by the International Color Consortium (ICC) host. Such files are widely used for color management to achieve consistency of color between a device and a document to provide optimal color performance on a target device or to simulate color performance of a document on a target device on other devices.
The ICC color profile includes a first standard gamma value, and thus, the first standard gamma value can be extracted therefrom.
It can be understood that the first standard gamma value can be obtained quickly and simply by extracting the first standard gamma value from the ICC color profile, which is beneficial to reducing the difficulty of obtaining the first standard gamma value.
Of course, in other embodiments, the image to be displayed may be input into the trained first recognition model, and the first standard gamma value output by the first recognition model may be obtained.
Specifically, if the first standard gamma value is different from the gamma value of the image to be displayed, correcting the gamma value of the image to be displayed based on the first standard gamma value to obtain a first intermediate image. If the first standard gamma value is the same as the gamma value of the image to be displayed, the image to be displayed is the first intermediate image.
It will be appreciated that a gamma module is typically built into an imaging device to adjust the gamma value, resulting in the gamma value of the image (i.e., the actual gamma value) and the first standard gamma value being potentially different. If the difference between the gamma value of the image and the first standard gamma value is ignored in the process of converting the image to be displayed into the device color space of the target display device, the gamma value of the image is directly considered to be the same as the first standard gamma value, the accuracy of the color space conversion can be affected, namely the difference between the color of a certain pixel determined by the certain pixel after the color space conversion under the device color space and the actual color of the pixel is enlarged. However, in the embodiment of the present disclosure, by setting the first intermediate image obtained by correcting the gamma value of the image to be displayed based on the first standard gamma value, the gamma value of the image to be displayed may be compensated, so that the gamma value of the compensated image to be displayed (i.e., the first intermediate image) is the same as the first standard gamma value (or the difference between the gamma value of the first intermediate image and the first standard gamma value is within the first preset tolerance range), which is beneficial to improving the accuracy of color space conversion and compensating for the color difference caused by the difference between the color space of the image to be displayed and the color space and the display range of the target display device.
Step 403, converting the first intermediate image from the image color space to the device color space of the target display device, resulting in a second intermediate image.
Specifically, the device color space is a color space corresponding to the target display device.
In particular, one skilled in the art may convert the first intermediate image from the image color space to the device color space of the target display device in any possible manner, which is not limited by the present disclosure. For example, but not limited to, converting the first intermediate image from an image color space to an intermediate color space (e.g., XYZ color space, etc.) and then from the intermediate color space to a device color space.
Step 404, determining a gamma value of the target display device, and correcting the gamma value of the second intermediate image based on the gamma value of the target display device to obtain a target image.
Specifically, there are various specific ways of determining the gamma value (i.e., the actual gamma value) of the target display device, and a typical example will be described below, but the present application is not limited thereto.
In some embodiments, determining the gamma value of the target display device includes: acquiring a driving file of a target display device; the gamma value of the target display device is determined based on the drive file.
In particular, the driver files are software components in the computer system that control and manage the functions of the display device (e.g., display, graphics card). These drivers ensure efficient communication between the operating system and the display hardware, enabling the display to properly display images, video, and other graphical output.
It can be understood that the gamma value of the target display device is determined by the driving file, so that the second standard gamma value can be quickly and simply obtained, which is beneficial to reducing the difficulty in obtaining the gamma value of the target display device.
Of course, in other embodiments, the display parameters of the display device may be input into the trained second recognition model, and the gamma value of the target display device output by the second recognition model may be obtained.
Specifically, the gamma value of the second intermediate image is a second standard gamma value. The second standard gamma value is a unique standard gamma value corresponding to a device color space specified by the International Color Consortium (ICC).
Specifically, a reference gamma value is determined, wherein the reference gamma value is reciprocal to a gamma value of the target display device. And if the second standard gamma value is different from the reference gamma value, correcting the gamma value of the second intermediate image based on the gamma value of the target display device to obtain a target image. If the second standard gamma value is the same as the reference gamma value, the second intermediate image is the target image.
It will be appreciated that, as described above, a gamma module is typically built into the display device to adjust the gamma value, resulting in the gamma value (i.e., the actual gamma value) of the target display device and the second standard gamma value being possibly different. If the difference between the gamma value of the target display device and the second standard gamma value is ignored in the process of converting the image to be displayed into the device color space of the target display device, the gamma value of the target display device and the second standard gamma value are directly considered to be the same, the accuracy of the color space conversion can be affected, namely the difference between the color of a pixel point determined by a certain pixel after the color space conversion under the device color space and the actual color of the pixel point can be increased. However, in the embodiment of the present disclosure, by setting the gamma value of the second intermediate image based on the gamma value of the target display device to correct the gamma value of the second intermediate image to obtain the target image, the gamma value of the second intermediate image may be compensated, so that the gamma value of the compensated second intermediate image (i.e., the target image) is the same as the reference gamma value (or the difference between the gamma value of the target image and the reference gamma value is within the second preset tolerance range), which is beneficial to improving the accuracy of color space conversion and to compensating for chromatic aberration caused by different color spaces and display ranges of the image to be displayed and the target display device.
Alternatively, the gamma value of the target image and the gamma value of the target display device are reciprocal. This linearizes the brightness of the display.
Step 405, displaying the target image through the target display device.
In the image display method, the gamma value of the image to be displayed can be corrected based on the first standard gamma value to obtain the first intermediate image, the first intermediate image can be converted from the image color space to the device color space of the target display device to obtain the second intermediate image, the gamma value of the second intermediate image can be corrected based on the gamma value of the target display device to obtain the target image, the image to be displayed can be converted to the device color space of the target display device to obtain the target image through the three corrections (or compensations), and chromatic aberration caused by different color spaces and display ranges of the image to be displayed and the target display device can be compensated, so that the effect that the display colors are unified or similar can be achieved when the image to be displayed is displayed on different display devices.
In some embodiments, correcting the gamma value of the image to be displayed based on the first standard gamma value to obtain a first intermediate image includes:
determining a first correction coefficient based on the first standard gamma value and the gamma value of the image to be displayed;
and correcting the gamma value of the image to be displayed based on the first correction coefficient to obtain a first intermediate image.
Optionally, determining the first correction coefficient based on the first standard gamma value and the gamma value of the image to be displayed includes: and calculating the logarithm of a first standard gamma value taking the gamma value of the image to be displayed as the bottom to obtain a first correction coefficient.
Specifically, the first correction coefficient may be calculated using the following formula:
γ1=logImgGammaImgCSGmma
wherein γ1 is a first correction coefficient, imgGamma is a gamma value of an image to be displayed, and IMGCSGAMMA is a first standard gamma value.
Of course, in other examples, the first standard gamma value and the gamma value of the image to be displayed may be input into the trained first correction model, and the first correction coefficient output by the first correction model may be obtained.
Specifically, the gamma value of the image to be displayed is compensated by a first correction coefficient gamma 1, and the gamma value is corresponding to the image color space, so as to obtain a first intermediate image, wherein the first intermediate image is a standard color space diagram corresponding to the image color space.
Illustratively, the gamma value of the image to be displayed (Img) is compensated by the first correction coefficient γ1 with the gamma value of the image to be displayed as a base and the first correction coefficient γ1 as a power, as shown in the following formula, to obtain a first intermediate image (Img 1):
Img1=Img^γ1
In the scheme, the gamma value of the image to be displayed is corrected, so that the difference between the gamma value of the image to be displayed and the first standard gamma value can be compensated, and the accuracy of the whole color space conversion is improved. The first correction coefficient is obtained quickly and accurately.
In some embodiments, correcting the gamma value of the second intermediate image based on the gamma value of the target display device results in a target image, comprising:
Determining a second correction coefficient based on the gamma value of the target display device and the gamma value of the second intermediate image;
And correcting the gamma value of the second intermediate image based on the second correction coefficient to obtain a target image.
Optionally, determining the second correction coefficient based on the gamma value of the target display device and the gamma value of the second intermediate image includes:
determining the reciprocal of the gamma value of the second intermediate image to obtain a first reciprocal;
determining the reciprocal of the gamma value of the target display device to obtain a second reciprocal;
and calculating the logarithm of the first reciprocal taking the second reciprocal as the bottom to obtain a second correction coefficient.
Specifically, the second correction coefficient may be calculated using the following formula:
Wherein DisGamma is the gamma value of the target display device, DISCSGAMMA is the gamma value of the second intermediate image (i.e., the second standard gamma value).
Of course, in other examples, the gamma value of the target display device and the gamma value of the second intermediate image may be input to the trained second correction model, and the second correction coefficient output by the second correction model may be acquired.
Specifically, the first intermediate image (Img 1) is subjected to color space conversion, and is converted into a color space of the target display device, and the second intermediate image (Img 2) is obtained after conversion, and is a standard color space diagram of the target display device.
Specifically, the gamma value of the target display device is not necessarily the second standard gamma value corresponding to the device color space, but the converted second intermediate image (denoted Img 2) is the standard color space diagram, so that the second intermediate image (denoted Img 2) needs to be compensated and mapped to the display device to obtain the target image (denoted Img 3), so that the gamma value of the target image and the gamma value of the target display device can be inversed.
For example, the gamma value of the second intermediate image may be corrected using the following formula:
In the scheme, the gamma value of the second intermediate image is corrected, so that the difference between the gamma value of the target display device and the gamma value of the second intermediate image can be compensated, and the accuracy of the whole color space conversion is improved. And the method for acquiring the second correction coefficient is quick and accurate.
The image display method provided by the embodiment of the present disclosure will be described in detail with reference to one detailed example.
Since the gamma value of the image to be displayed is not necessarily the first standard gamma value of the image color space, the gamma value of the image to be displayed (note ImgGamma) is converted with the first standard gamma value of the image color space corresponding to the image (note IMGCSGAMMA), and the first correction coefficient γ1 is obtained.
γ1=logImgGammaImgCSGmma
And (3) compensating the gamma value (ImgGamma) of the image (recorded as Img) to be displayed by a first correction coefficient gamma 1, and corresponding the gamma value to the standard color space corresponding to the image to obtain a first intermediate image (recorded as Img 1).
Img1=Img^γ1
And DeGamma, acquiring the target display device through a driving file of the target display device.
The gamma value of the target display device (note DisGamma) is converted with a second standard gamma value of the color space of the device (note DISCSGAMMA) to find a second correction coefficient γ2.
And performing color space conversion on the first intermediate image (shown in figure Img 1), converting the first intermediate image into a device color space, and obtaining a second intermediate image (shown in figure Img 2), wherein the first intermediate image (shown in figure Img 1) is a standard color space diagram of the image to be displayed, and the second intermediate image (shown in figure Img 2) is a standard color space diagram of the target display device.
Since the gamma value of the target display device is not necessarily the second standard gamma value of the device color space, but the second intermediate image (denoted Img 2) is a map of the standard color space corresponding to the target display device, the second intermediate image (denoted Img 2) needs to be compensated and mapped to the target display device to obtain the target image (denoted Img 3).
It should be understood that, although the steps in the flowchart of fig. 1 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 1 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the sub-steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of other steps or sub-steps of other steps.
In one embodiment, as shown in fig. 5, there is provided an image display apparatus including:
a first obtaining module 510, configured to obtain an image to be displayed;
The first determining module 520 is configured to determine a first standard gamma value corresponding to an image color space of an image to be displayed, and correct the gamma value of the image to be displayed based on the first standard gamma value, so as to obtain a first intermediate image;
A first conversion module 530, configured to convert the first intermediate image from the image color space to a device color space of the target display device, to obtain a second intermediate image;
a second determining module 540, configured to determine a gamma value of the target display device, and correct the gamma value of the second intermediate image based on the gamma value of the target display device, to obtain a target image;
the first display module 550 is configured to display the target image through the target display device.
Optionally, the first determining module 520 includes a first determining sub-module for determining a first standard gamma value corresponding to an image color space of an image to be displayed, the first determining sub-module being specifically configured to,
Analyzing the image to be displayed to obtain a corresponding ICC color characteristic file;
a first standard gamma value is extracted from the ICC color profile.
Optionally, the second determining module 540 comprises a second determining sub-module for determining a gamma value of the target display device, the second determining sub-module being specifically adapted to,
Acquiring a driving file of a target display device;
The gamma value of the target display device is determined based on the drive file.
Optionally, the first determining module 520 includes a first correcting sub-module for correcting the gamma value of the image to be displayed based on the first standard gamma value to obtain a first intermediate image, where the first correcting sub-module includes:
a first determination unit configured to determine a first correction coefficient based on a first standard gamma value and a gamma value of an image to be displayed;
and the first correction unit is used for correcting the gamma value of the image to be displayed based on the first correction coefficient to obtain a first intermediate image.
Optionally, the first determining unit is specifically configured to calculate a logarithm of a first standard gamma value with a gamma value of an image to be displayed as a base, to obtain the first correction coefficient.
Optionally, the second determining module 540 includes a second correction sub-module for correcting the gamma value of the second intermediate image based on the gamma value of the target display device, to obtain the target image, where the second correction sub-module includes:
A second determination unit configured to determine a second correction coefficient based on a gamma value of the target display device and a gamma value of the second intermediate image;
and the second correction unit is used for correcting the gamma value of the second intermediate image based on the second correction coefficient to obtain a target image.
The second determination unit is provided for, in particular,
Determining the reciprocal of the gamma value of the second intermediate image to obtain a first reciprocal;
determining the reciprocal of the gamma value of the target display device to obtain a second reciprocal;
and calculating the logarithm of the first reciprocal taking the second reciprocal as the bottom to obtain a second correction coefficient.
In the image display device, the gamma value of the image to be displayed can be corrected based on the first standard gamma value to obtain the first intermediate image, the first intermediate image can be converted from the image color space to the device color space of the target display device to obtain the second intermediate image, the gamma value of the second intermediate image can be corrected based on the gamma value of the target display device to obtain the target image, the image to be displayed can be converted to the device color space of the target display device to obtain the target image through the three corrections (or compensations), and chromatic aberration caused by different color spaces and display ranges of the image to be displayed and the target display device can be compensated, so that when the image to be displayed is displayed on different display devices, the effect that the display colors are unified or similar can be achieved.
For specific limitations of the image display apparatus, reference may be made to the above limitations of the image display method, and no further description is given here. The respective modules in the above-described image display apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, an electronic device is provided, which may be a terminal, and an internal structure diagram thereof may be as shown in fig. 6. The electronic device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic device includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the electronic device is used for conducting wired or wireless communication with an external terminal, and the wireless communication can be achieved through WIFI, an operator network, near Field Communication (NFC) or other technologies. The computer program is executed by a processor to implement an image display method. The display screen of the electronic equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the electronic equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 6 is merely a block diagram of a portion of the structure associated with the present inventive arrangements and is not limiting of the electronic device to which the present inventive arrangements are applied, and that a particular electronic device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the image display apparatus provided by the present application may be implemented in the form of a computer program that is executable on an electronic device as shown in fig. 6. The memory of the electronic device may store various program modules constituting the image display apparatus, such as the first acquisition module 510, the first determination module 520, the first conversion module 530, the second determination module 540, and the first display module 550 shown in fig. 5. The computer program constituted by the respective program modules causes the processor to execute the steps in the image display method of the respective embodiments of the present application described in the present specification.
For example, the electronic device shown in fig. 6 may perform acquisition of an image to be displayed through an acquisition module 510 in the apparatus shown in fig. 5; the electronic device may determine a first standard gamma value corresponding to an image color space of the image to be displayed through the first determining module 520, and correct the gamma value of the image to be displayed based on the first standard gamma value, to obtain a first intermediate image; the electronic device may perform a conversion of the first intermediate image from the image color space to a device color space of the target display device via the first conversion module 530, resulting in a second intermediate image; the electronic device may perform determining a gamma value of the target display device through the second determining module 540, and correct the gamma value of the second intermediate image based on the gamma value of the target display device, to obtain a target image; the electronic device may perform displaying the target image through the target display device through the first display module 550.
In one embodiment, an electronic device is provided comprising a memory storing a computer program and a processor that when executing the computer program performs the steps of: acquiring an image to be displayed; determining a first standard gamma value corresponding to an image color space of an image to be displayed, and correcting the gamma value of the image to be displayed based on the first standard gamma value to obtain a first intermediate image; converting the first intermediate image from the image color space to a device color space of the target display device to obtain a second intermediate image; determining a gamma value of the target display device, and correcting the gamma value of the second intermediate image based on the gamma value of the target display device to obtain a target image; the target image is displayed by the target display device.
In one embodiment, the processor when executing the computer program further performs the steps of:
optionally, determining a first standard gamma value corresponding to an image color space of an image to be displayed includes:
analyzing the image to be displayed to obtain a corresponding ICC color characteristic file;
a first standard gamma value is extracted from the ICC color profile.
Optionally, determining the gamma value of the target display device includes:
acquiring a driving file of a target display device;
The gamma value of the target display device is determined based on the drive file.
Optionally, correcting the gamma value of the image to be displayed based on the first standard gamma value to obtain a first intermediate image, including:
determining a first correction coefficient based on the first standard gamma value and the gamma value of the image to be displayed;
and correcting the gamma value of the image to be displayed based on the first correction coefficient to obtain a first intermediate image.
Optionally, determining the first correction coefficient based on the first standard gamma value and the gamma value of the image to be displayed includes:
And calculating the logarithm of a first standard gamma value taking the gamma value of the image to be displayed as the bottom to obtain a first correction coefficient.
Optionally, correcting the gamma value of the second intermediate image based on the gamma value of the target display device to obtain the target image includes:
Determining a second correction coefficient based on the gamma value of the target display device and the gamma value of the second intermediate image;
And correcting the gamma value of the second intermediate image based on the second correction coefficient to obtain a target image.
Optionally, determining the second correction coefficient based on the gamma value of the target display device and the gamma value of the second intermediate image includes:
determining the reciprocal of the gamma value of the second intermediate image to obtain a first reciprocal;
determining the reciprocal of the gamma value of the target display device to obtain a second reciprocal;
and calculating the logarithm of the first reciprocal taking the second reciprocal as the bottom to obtain a second correction coefficient.
In the electronic device, the gamma value of the image to be displayed can be corrected based on the first standard gamma value to obtain the first intermediate image, the first intermediate image can be converted from the image color space to the device color space of the target display device to obtain the second intermediate image, the gamma value of the second intermediate image can be corrected based on the gamma value of the target display device to obtain the target image, the image to be displayed can be converted to the device color space of the target display device to obtain the target image through the three corrections (or compensations), and chromatic aberration caused by different color spaces and display ranges of the image to be displayed and the target display device can be compensated, so that the effect that the display colors are unified or similar can be achieved when the image to be displayed is displayed on different display devices.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring an image to be displayed; determining a first standard gamma value corresponding to an image color space of an image to be displayed, and correcting the gamma value of the image to be displayed based on the first standard gamma value to obtain a first intermediate image; converting the first intermediate image from the image color space to a device color space of the target display device to obtain a second intermediate image; determining a gamma value of the target display device, and correcting the gamma value of the second intermediate image based on the gamma value of the target display device to obtain a target image; the target image is displayed by the target display device.
In one embodiment, the processor when executing the computer program further performs the steps of:
optionally, determining a first standard gamma value corresponding to an image color space of an image to be displayed includes:
analyzing the image to be displayed to obtain a corresponding ICC color characteristic file;
a first standard gamma value is extracted from the ICC color profile.
Optionally, determining the gamma value of the target display device includes:
acquiring a driving file of a target display device;
The gamma value of the target display device is determined based on the drive file.
Optionally, correcting the gamma value of the image to be displayed based on the first standard gamma value to obtain a first intermediate image, including:
determining a first correction coefficient based on the first standard gamma value and the gamma value of the image to be displayed;
and correcting the gamma value of the image to be displayed based on the first correction coefficient to obtain a first intermediate image.
Optionally, determining the first correction coefficient based on the first standard gamma value and the gamma value of the image to be displayed includes:
And calculating the logarithm of a first standard gamma value taking the gamma value of the image to be displayed as the bottom to obtain a first correction coefficient.
Optionally, correcting the gamma value of the second intermediate image based on the gamma value of the target display device to obtain the target image includes:
Determining a second correction coefficient based on the gamma value of the target display device and the gamma value of the second intermediate image;
And correcting the gamma value of the second intermediate image based on the second correction coefficient to obtain a target image.
Optionally, determining the second correction coefficient based on the gamma value of the target display device and the gamma value of the second intermediate image includes:
determining the reciprocal of the gamma value of the second intermediate image to obtain a first reciprocal;
determining the reciprocal of the gamma value of the target display device to obtain a second reciprocal;
and calculating the logarithm of the first reciprocal taking the second reciprocal as the bottom to obtain a second correction coefficient.
In the above storable medium, the gamma value of the image to be displayed can be corrected based on the first standard gamma value to obtain the first intermediate image, the first intermediate image can be converted from the image color space to the device color space of the target display device to obtain the second intermediate image, the gamma value of the second intermediate image can be corrected based on the gamma value of the target display device to obtain the target image, and the image to be displayed can be converted to the device color space of the target display device to obtain the target image through the above three corrections (or offsets), so as to compensate for chromatic aberration caused by different color spaces and display ranges of the image to be displayed and the target display device, and as such, when the image to be displayed is displayed on different display devices, the effect that the display color is relatively uniform or similar can be achieved.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, or the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static random access memory (Static Random Access Memory, SRAM), dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.
Claims (10)
1. An image display method, comprising:
Acquiring an image to be displayed;
determining a first standard gamma value corresponding to an image color space of the image to be displayed, and correcting the gamma value of the image to be displayed based on the first standard gamma value to obtain a first intermediate image;
converting the first intermediate image from the image color space to a device color space of a target display device to obtain a second intermediate image;
determining a gamma value of the target display device, and correcting the gamma value of the second intermediate image based on the gamma value of the target display device to obtain a target image;
and displaying the target image through the target display device.
2. The method of claim 1, wherein determining a first standard gamma value corresponding to an image color space of the image to be displayed comprises:
Analyzing the image to be displayed to obtain a corresponding ICC color characteristic file;
Extracting the first standard gamma value from the ICC color profile.
3. The method of claim 1, wherein the determining the gamma value of the target display device comprises:
Acquiring a driving file of the target display device;
And determining the gamma value of the target display device based on the driving file.
4. The method according to claim 1, wherein correcting the gamma value of the image to be displayed based on the first standard gamma value results in a first intermediate image, comprising:
determining a first correction coefficient based on the first standard gamma value and the gamma value of the image to be displayed;
And correcting the gamma value of the image to be displayed based on the first correction coefficient to obtain the first intermediate image.
5. The method of claim 4, wherein the determining a first correction factor based on the first standard gamma value and the gamma value of the image to be displayed comprises:
And calculating the logarithm of the first standard gamma value with the gamma value of the image to be displayed as the base to obtain the first correction coefficient.
6. The method according to claim 1, wherein correcting the gamma value of the second intermediate image based on the gamma value of the target display device results in a target image, comprising:
Determining a second correction coefficient based on the gamma value of the target display device and the gamma value of the second intermediate image;
and correcting the gamma value of the second intermediate image based on the second correction coefficient to obtain the target image.
7. The method of claim 6, wherein the determining a second correction coefficient based on the gamma value of the target display device and the gamma value of the second intermediate image comprises:
determining the reciprocal of the gamma value of the second intermediate image to obtain a first reciprocal;
determining the reciprocal of the gamma value of the target display device to obtain a second reciprocal;
And calculating the logarithm of the first reciprocal taking the second reciprocal as the base to obtain the second correction coefficient.
8. An image display device, the device comprising:
the first acquisition module is used for acquiring an image to be displayed;
The first determining module is used for determining a first standard gamma value corresponding to the image color space of the image to be displayed, correcting the gamma value of the image to be displayed based on the first standard gamma value, and obtaining a first intermediate image;
A first conversion module, configured to convert the first intermediate image from the image color space to a device color space of a target display device, to obtain a second intermediate image;
a second determining module, configured to determine a gamma value of the target display device, and correct the gamma value of the second intermediate image based on the gamma value of the target display device, to obtain a target image;
and the first display module is used for displaying the target image through the target display equipment.
9. An electronic device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410584438.2A CN118379949A (en) | 2024-05-11 | 2024-05-11 | Image display method, device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410584438.2A CN118379949A (en) | 2024-05-11 | 2024-05-11 | Image display method, device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118379949A true CN118379949A (en) | 2024-07-23 |
Family
ID=91901394
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410584438.2A Pending CN118379949A (en) | 2024-05-11 | 2024-05-11 | Image display method, device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118379949A (en) |
-
2024
- 2024-05-11 CN CN202410584438.2A patent/CN118379949A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8654141B2 (en) | Techniques for adapting a color gamut | |
KR102478606B1 (en) | Image display device and method for displaying image | |
KR100886099B1 (en) | Apparatus for automatically computing image correction curve and Method thereof | |
KR20190055289A (en) | Method of converting color gamut and display device employing the same | |
CN111429827B (en) | Display screen color calibration method and device, electronic equipment and readable storage medium | |
KR20080045132A (en) | Hardware-accelerated color data processing | |
EP3873091A1 (en) | Color gamut matching method and apparatus, display terminal and readable storage medium | |
CN107564493B (en) | Color gamut compression method and device and display equipment | |
US11380284B2 (en) | Color space mapping method, equipment, computer readable storage medium, and device | |
CN111312141B (en) | Color gamut adjusting method and device | |
CN107113411A (en) | A kind of method for displaying image and equipment and its recording medium based on metadata | |
JPWO2008133195A1 (en) | Image quality adjustment capability measurement method, apparatus and program, and image quality adjustment method, apparatus and program | |
CN116843566A (en) | Tone mapping method, tone mapping device, display device and storage medium | |
CN111338627B (en) | Front-end webpage theme color adjustment method and device | |
CN118379949A (en) | Image display method, device, electronic equipment and storage medium | |
US11361476B2 (en) | Efficient color mapping systems and methods | |
US8086033B2 (en) | Device, method, and program storage medium for color conversion, device, method, and program storage medium for color conversion coefficient generation | |
US10735703B2 (en) | Electronic device and associated image processing method | |
US8630488B2 (en) | Creating a duotone color effect using an ICC profile | |
JP7252400B2 (en) | Image processing device | |
US11769464B2 (en) | Image processing | |
CN113556525B (en) | Color temperature adjusting method, device, computer equipment and storage medium | |
US10447895B1 (en) | Method and system for expanding and enhancing color gamut of a digital image | |
US20240282007A1 (en) | Method of generating color correction model, method of correcting color, apparatus for generating color correction model, apparatus for correcting color, computer readable medium, and display device | |
US20240257777A1 (en) | Display calibration and color preset generation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication |