Display method, device, non-volatile storage medium, and computer equipment

By determining the personalized gamma curve for each image for brightness processing, the problem of poor results caused by the same gamma curve in the prior art is solved, and the image brightness processing effect is optimized.

CN116072084BActive Publication Date: 2025-08-19LEYARD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310070275.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-12
Publication Date
2025-08-19
Estimated Expiration
2043-01-12

AI Technical Summary

Technical Problem

In the prior art, all images in the video are brightly processed using the same gamma curve, resulting in the failure of the optimal processing effect of different images.

Method used

According to the RGB three primary color values ​​of each image in the target video, the corresponding personalized gamma curve is determined and the brightness process is performed to obtain the best target image.

Benefits of technology

The brightness processing of the most suitable gamma curve is achieved based on the image characteristics, ensuring that each image achieves the best bright color effect, and solving the problem of poor results caused by the same gamma curve.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116072084B_ABST
    Figure CN116072084B_ABST
Patent Text Reader

Abstract

The present invention discloses a display method, apparatus, non-volatile storage medium, and computer equipment. The method comprises: obtaining RGB primary color values of multiple pixels of a first original image, wherein the first original image is a plurality of images included in a target video; determining a first gamma curve corresponding to the first original image based on the RGB primary color values of the multiple pixels of the first original image; performing brightness processing on the first original image according to the first gamma curve to obtain a first target image; and displaying the first target image. The present invention solves the technical problem in the prior art of using the same gamma curve for brightness processing of all images included in a video, resulting in different images not achieving optimal processing effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing and display, and in particular to a display method, device, non-volatile storage medium and computer equipment. Background Art

[0002] In the prior art, when performing bright color processing on an image, a fixed gamma curve is used to process the pixel content of the image, which can achieve the desired bright color effect, such as enhancing contrast and strengthening image color effects. Usually, different desired effects can be achieved by adjusting the gamma curve.

[0003] Existing techniques typically consider the brightness of all frames in a video when performing bright color processing on each frame, determining a fixed gamma curve for bright color processing across all frames. This fixed bright color curve may achieve optimal results for certain types of frames, but may not produce optimal results for other types of frames.

[0004] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention

[0005] Embodiments of the present invention provide a display method, apparatus, non-volatile storage medium, and computer device to at least solve the technical problem in the prior art of using the same gamma curve for bright color processing on all images included in a video, resulting in different images not achieving optimal processing effects.

[0006] According to one aspect of an embodiment of the present invention, a display method is provided, comprising: obtaining RGB three primary color values of multiple pixels of a first original image, wherein the first original image is one of multiple images included in a target video; determining a first gamma curve corresponding to the first original image based on the RGB three primary color values of the multiple pixels of the first original image; performing brightness processing on the first original image based on the first gamma curve to obtain a first target image; and displaying the first target image.

[0007] Optionally, brightness processing is performed on the first original image according to the first gamma curve to obtain a first target image, including: determining the original grayscale value of a pixel to be corrected in the first original image according to the RGB three primary color values of multiple pixels of the first original image, wherein the pixel to be corrected is any pixel in the first original image; and adjusting the brightness of the pixel to be corrected according to the first gamma curve, adjusting the pixel to be corrected from the original grayscale value to the target grayscale value, to obtain the first target image.

[0008] Optionally, adjusting the brightness of the pixel to be corrected according to the first gamma curve, adjusting the pixel to be corrected from the original grayscale value to the target grayscale value, and obtaining a first target image, includes: determining a first grayscale value corresponding to the original grayscale value according to the first gamma curve, wherein the original grayscale value is the value of the independent variable in the first gamma curve, and the first grayscale value is the value of the dependent variable in the first gamma curve; and adjusting the pixel to be corrected from the original grayscale value to the first grayscale value when the first grayscale value is used as the target grayscale value, to obtain the first target image.

[0009] Optionally, adjusting the brightness of the pixel to be corrected according to the first gamma curve, adjusting the pixel to be corrected from the original grayscale value to the target grayscale value, and obtaining the first target image, includes: determining a first grayscale value corresponding to the original grayscale value according to the first gamma curve, wherein the original grayscale value is the value of the independent variable in the first gamma curve, and the first grayscale value is the value of the dependent variable in the first gamma curve; determining a second grayscale value corresponding to the original grayscale value according to the second gamma curve, wherein the original grayscale value is the value of the independent variable in the second gamma curve, and the second grayscale value is the value of the dependent variable in the second gamma curve, the second gamma curve is the gamma curve corresponding to the second original image, and the second original image is the last image before the first original image that corresponds to a different gamma curve from the second original image; obtaining a step number corresponding to the first original image, wherein the step number represents the distance between the first original image and the second original image; determining the target grayscale value according to the first grayscale value, the second grayscale value, and the step number; and adjusting the pixel to be corrected from the original grayscale value to the target grayscale value, and obtaining the first target image.

[0010] Optionally, the target grayscale value is determined based on the first grayscale value, the second grayscale value and the step number, including: obtaining a preset total step number; dividing the difference between the first grayscale value and the second grayscale value by the total step number to obtain a unit change value of the grayscale; multiplying the step number by the unit change value and adding the resultant value to the second grayscale value to obtain the target grayscale value.

[0011] Optionally, obtaining the step number includes: determining the number of images between the second original image and the first original image as the step number.

[0012] Optionally, determining a first gamma curve corresponding to the first original image based on the RGB three primary color values of multiple pixels of the first original image includes: determining multiple pixel value intervals, wherein the multiple pixel value intervals correspond one-to-one to multiple gamma curves; determining multiple numbers of pixel values corresponding one-to-one to the multiple pixel value intervals based on the RGB three primary color values of multiple pixels of the first original image, wherein the number of pixel values represents the number of RGB three primary color values of the multiple pixels of the first original image included in the corresponding pixel value interval; and determining that the gamma curve corresponding to the interval with the largest number of pixel values among the multiple pixel value intervals is the first gamma curve.

[0013] According to another aspect of an embodiment of the present invention, a display device is further provided, including: an acquisition module for acquiring RGB primary color values of multiple pixels of a first original image, wherein the first original image is one of multiple images included in a target video; a first determination module for determining a first gamma curve corresponding to the first original image based on the RGB primary color values of the multiple pixels of the first original image; a second determination module for performing brightness processing on the first original image based on the first gamma curve to obtain a first target image; and a display module for displaying the first target image.

[0014] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided. The non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute any one of the above display methods.

[0015] According to yet another aspect of an embodiment of the present invention, a computer device is provided. The computer device includes a processor, and the processor is configured to run a program. When the program is run, any one of the above display methods is executed.

[0016] In an embodiment of the present invention, different images are assigned different gamma curves for bright color processing. By determining a first gamma curve corresponding to a first original image in a target video, performing bright color processing on the first original image according to the first gamma curve, a first target image after the bright color processing of the first original image is obtained, and the first target image is displayed. This achieves the purpose of determining the most appropriate gamma curve for the original image based on the characteristics of the original image in the target video and using the gamma curve to perform bright color processing on the original image, thereby achieving the technical effect of optimizing the bright color processing effect of the original image. This further solves the technical problem in the prior art of not achieving the optimal processing effect for different images due to using the same gamma curve for bright color processing on all images included in the video. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0018] Figure 1 A hardware structure block diagram of a computer terminal for implementing the display method is shown;

[0019] Figure 2 is a flow chart of a display method according to an embodiment of the present invention;

[0020] Figure 3 is a schematic diagram of a bright color processing curve for a high-brightness image according to an optional embodiment of the present invention;

[0021] Figure 4 is a schematic diagram of a bright color processing curve for a medium-brightness image according to an optional embodiment of the present invention;

[0022] Figure 5 is a schematic diagram of a bright color processing curve for a low-brightness image according to an optional embodiment of the present invention;

[0023] Figure 6 is a schematic diagram of bright color processing of a step image provided by an optional embodiment of the present invention;

[0024] Figure 7 is a structural block diagram of a display device provided according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] According to an embodiment of the present invention, a method embodiment of display is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0028] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG1 shows a hardware structure block diagram of a computer terminal for implementing the display method. Figure 1 As shown, the computer terminal 10 may include one or more (illustrated as 102a, 102b, ..., 102n in the figure) processors (the processor may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices), a memory 104 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0029] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry." The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuitry may be a single, independent processing module, or may be incorporated in whole or in part into any of the other components of the computer terminal 10. As described in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0030] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the display method in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the display method of the above-mentioned application. The memory 104 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely located relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0031] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .

[0032] The present invention provides a method for performing bright color processing on a target video. Each image included in the target video is a frame in the video. When performing bright color processing on the target video, the bright color processing can be performed on all images included in the target video separately. The processed images are then arranged and displayed in their original order to obtain the target video after bright color processing. It should be noted that the embodiments provided by the present invention mainly describe the method for performing bright color processing on a specific image in the target video. All images in the target video can be brightly processed using the method provided by the present invention. Figure 2 FIG. 1 is a flow chart of a display method according to an embodiment of the present invention. Figure 2 As shown, the method includes the following steps:

[0033] Step S202 : obtaining RGB three primary color values of a plurality of pixels of a first original image, wherein the first original image is one of a plurality of images included in a target video.

[0034] In this step, RGB three primary color values of multiple pixels in a first original image in the target video may be obtained. The first original image may be any frame image in the target video.

[0035] Step S204 : determining a first gamma curve corresponding to the first original image according to the RGB three primary color values of a plurality of pixels of the first original image.

[0036] In this step, the first original image includes many pixels. The RGB three primary color values of some pixels in the first original image can be obtained to determine the most suitable gamma curve for the first original image. Alternatively, the most suitable gamma curve for the first original image can be determined based on the RGB three primary color values of all pixels in the first original image.

[0037] Step S206 , performing brightness processing on the first original image according to the first gamma curve to obtain a first target image.

[0038] In this step, the first original image may be processed according to the bright color processing curve that is most suitable for the first original image, and the obtained first target image can achieve the best bright color processing effect of the first original image.

[0039] Step S208: display the first target image.

[0040] In this step, after the first original image is brightened, the first target image can be displayed. After each image included in the target video is brightened according to the method provided by the present invention and displayed, the target video can be displayed and the brightening process of the target video can be achieved.

[0041] Through the above steps, the purpose of determining the most suitable gamma curve for the original image in the target video based on the characteristics of the original image and using the gamma curve to perform bright color processing on the original image can be achieved, thereby achieving the technical effect of optimizing the bright color processing effect of the original image, thereby solving the technical problem in the prior art of using the same gamma curve for bright color processing for all images included in the video, resulting in different images not achieving the optimal processing effect.

[0042] As an optional embodiment, determining a first gamma curve corresponding to the first original image based on the RGB three primary color values of multiple pixels of the first original image includes: determining multiple pixel value intervals, wherein the multiple pixel value intervals correspond one-to-one to multiple gamma curves; determining multiple numbers of pixel values corresponding one-to-one to the multiple pixel value intervals based on the RGB three primary color values of multiple pixels of the first original image, wherein the number of pixel values represents the number of RGB three primary color values of the multiple pixels of the first original image included in the corresponding pixel value interval; and determining that the gamma curve corresponding to the interval with the largest number of pixel values among the multiple pixel value intervals is the first gamma curve.

[0043] Optionally, the bright color processing curve is also called a gamma curve. There are three types of gamma curves: a bright color processing curve for a high-brightness image, a bright color processing curve for a medium-brightness image, and a bright color processing curve for a low-brightness image. In the curve, the independent variable X is the grayscale of the input pixel to be processed, and the dependent variable Y is the grayscale of the pixel after processing. Figure 3 is a schematic diagram of a bright color processing curve for a high-brightness image according to an optional embodiment of the present invention. Figure 3 As shown in the figure, when most of the pixel values of a frame image are concentrated in high grayscale values, the processing curve with a higher high grayscale processing slope among the three gamma curves is used, that is, the high-brightness image bright color processing curve. In this way, the interval of high grayscale bright color values is expanded and stretched, thereby obtaining a higher bright color distinction. In this way, for bright field images, the details can be seen more clearly. Figure 4 is a schematic diagram of a bright color processing curve for a medium brightness image according to an optional embodiment of the present invention. Figure 4 As shown in the figure, this curve is a medium-brightness bright color processing curve. When most of the pixel values of a frame are concentrated in the medium gray value, a processing curve with a higher medium gray processing slope is used. This will expand and increase the interval of the medium gray bright color value, thereby obtaining a higher bright color distinction. In this way, for the medium gray field image, the details can be seen more clearly. Figure 5 is a schematic diagram of a bright color processing curve for a low-brightness image according to an optional embodiment of the present invention. Figure 5 As shown in the figure, this curve is the bright color curve for low-gray dark image processing. When most of the pixel values of a frame image are concentrated in low grayscale values, a processing curve with a higher low-gray processing slope is used. In this way, the interval of low-gray bright color values is expanded and stretched, thereby obtaining a higher bright color distinction. In this way, for dark field images, the details can be seen more clearly.

[0044] When determining the first gamma curve corresponding to the first original image, multiple pixel value intervals can be obtained first, and each pixel value interval corresponds to a gamma curve. According to the RGB three-primary color values of multiple pixels in the obtained first original image, it can be statistically determined that the red value of each pixel among the multiple pixels corresponds to a certain interval among the multiple pixel value intervals, the green value of each pixel among the multiple pixels corresponds to a certain interval among the multiple pixel value intervals, and the blue value of each pixel among the multiple pixels corresponds to a certain interval among the multiple pixel value intervals. At this time, the number of RGB three-primary color values of the multiple pixels, that is, the number of pixel values, is three times the number of pixels. Finally, it can be determined that among the multiple pixel value intervals, the gamma curve corresponding to the pixel value interval with the largest number of included pixel values is the first gamma curve. For example, the pixel value intervals can include three, namely 0 - P, P - N, and N - M, where P < N < M; the number of pixels with red values in the three intervals are Kr, Qr, and Tr respectively, the number of pixels with green values in the three intervals are Kg, Qg, and Tg respectively, and the number of pixels with blue values in the three intervals are Kb, Qb, and Tb respectively; Kr, Kg, and Kb can be added together, Qr, Qg, and Qb can be added together, and Tr, Tg, and Tb can be added together; when Kr + Kg + Kb is the largest, the number of pixel values in the pixel value interval 0 - P is the largest, the image is concentrated in the low-gray image, and the gamma curve corresponding to the pixel value interval 0 - P, that is, the low-brightness bright-color processing curve, is the first gamma curve; when Qr + Qg + Qb is the largest, the number of pixel values in the pixel value interval P - N is the largest, the image is concentrated in the medium-gray image, and the gamma curve corresponding to the pixel value interval P - N, that is, the medium-brightness bright-color processing curve, is the first gamma curve; when Tr + Tg + Tb is the largest, the number of pixel values in the pixel value interval N - M is the largest, then the image is concentrated in the high-gray image, and the gamma curve corresponding to the pixel value interval N - M, that is, the high-brightness bright-color processing curve, is the first gamma curve.

[0045] As an optional embodiment, performing brightness processing on the first original image according to the first gamma curve to obtain the first target image includes: determining the original gray value of the pixel to be corrected in the first original image according to the RGB three-primary color values of multiple pixels in the first original image, where the pixel to be corrected is any pixel in the first original image; adjusting the brightness of the pixel to be corrected according to the first gamma curve, and adjusting the pixel to be corrected from the original gray value to the target gray value to obtain the first target image.

[0046] Optionally, after determining the first gamma curve corresponding to the first original image, each pixel in the first original image may be subjected to brightening processing. The original grayscale value of the pixel to be corrected may be determined based on the RGB primary color values of the pixel to be corrected. Brightening processing may then be performed on the pixel to be corrected based on the first gamma curve and the original grayscale value. After grayscale value adjustment is performed on each pixel to be corrected in the first original image, a first target image after brightening processing of the first original image may be obtained.

[0047] As an optional embodiment, the brightness of the pixel to be corrected is adjusted according to the first gamma curve, and the pixel to be corrected is adjusted from the original grayscale value to the target grayscale value to obtain a first target image, including: determining a first grayscale value corresponding to the original grayscale value according to the first gamma curve, wherein the original grayscale value is the value of the independent variable in the first gamma curve, and the first grayscale value is the value of the dependent variable in the first gamma curve; when the first grayscale value is used as the target grayscale value, the pixel to be corrected is adjusted from the original grayscale value to the first grayscale value to obtain the first target image.

[0048] Optionally, after determining the first gamma curve, the original grayscale value can be used as the independent variable of the first gamma curve, and the grayscale value of the dependent variable corresponding to the original grayscale value on the first gamma curve can be determined as the first grayscale value. The first grayscale value can be directly used as the target grayscale value, and the grayscale value of the pixel to be corrected can be directly adjusted from the original grayscale value to the first grayscale value. When the differences between the frames included in the target video are not significant, the brightness adjustment method of this optional embodiment can achieve the technical effect of achieving optimal brightness processing for each frame in the video with a low computational load.

[0049] As an optional embodiment, adjusting the brightness of a pixel to be corrected according to a first gamma curve, adjusting the pixel to be corrected from an original grayscale value to a target grayscale value, and obtaining a first target image, includes: determining a first grayscale value corresponding to the original grayscale value according to the first gamma curve, wherein the original grayscale value is a value of an independent variable in the first gamma curve, and the first grayscale value is a value of a dependent variable in the first gamma curve; determining a second grayscale value corresponding to the original grayscale value according to a second gamma curve, wherein the original grayscale value is a value of an independent variable in the second gamma curve, and the second grayscale value is a value of a dependent variable in the second gamma curve, the second gamma curve is a gamma curve corresponding to a second original image, and the second original image is the last image before the first original image that corresponds to a different gamma curve from the second original image; obtaining a step number corresponding to the first original image, wherein the step number represents a distance between the first original image and the second original image; determining a target grayscale value according to the first grayscale value, the second grayscale value, and the step number; and adjusting the pixel to be corrected from the original grayscale value to the target grayscale value, and obtaining the first target image.

[0050] As an optional embodiment, obtaining the step number includes: determining the number of images between the second original image and the first original image as the step number.

[0051] Optionally, when the difference between each frame of the target video is significant, the processing difference between two consecutive frames is too large, resulting in a flickering effect in the video. This optional embodiment provides a progressive bright color processing method, such that when the gamma curve corresponding to the image jumps, the bright color processing gradually transitions from the previous gamma curve to the next gamma curve. When performing bright color processing on the target video, the original images need to be processed sequentially according to the order of the images. The images in the target video are played continuously, and the first original image can be any one of them. Before the first original image, there can be an image processed using a bright color curve different from the first gamma curve. If the first original image and all previous original images are brightly processed using the first gamma curve, then the grayscale value of the dependent variable corresponding to the original grayscale value as the independent variable on the first gamma curve is the processed target grayscale value. However, if the image before the first original image is brightly processed using a curve different from the first gamma curve, the impact of the previous curve on the bright color processing of the first original image is considered. When processing a first original image, the original grayscale values of pixels in the first original image are required. Furthermore, a gamma curve corresponding to an image preceding the first original image and closest to the first original image, which was brightened using a different gamma curve, is obtained. This gamma curve is referred to as the second gamma curve. When determining a target grayscale value based on the original grayscale values, the grayscale value corresponding to the original grayscale value on the first gamma curve is determined to be the first grayscale value, and the grayscale value corresponding to the original grayscale value on the second gamma curve is determined to be the second grayscale value. Furthermore, the number of images between the first original image and the second original image, which is closest to the first original image and brightened using the second gamma curve, is obtained. In other words, the second original image is the last image preceding the first original image to be brightened using the second gamma curve. The number of images between the second original image and the first original image is referred to as the step number. Based on the first grayscale value, the second grayscale value, and the step number, the target grayscale value corresponding to the original grayscale value after processing can be determined.

[0052] As an optional embodiment, the target grayscale value is determined based on the first grayscale value, the second grayscale value and the step number, including: obtaining a preset total step number; dividing the difference between the first grayscale value and the second grayscale value by the total step number to obtain a unit change value of the grayscale; multiplying the step number by the unit change value and adding the resultant value to the second grayscale value to obtain the target grayscale value.

[0053] Optionally, a pre-set total number of steps can be obtained. The total number of steps can be a manually set number of progressive steps, that is, how many progressive steps are required to transition from completely adopting the second gamma curve to completely adopting the first gamma curve for bright color processing. The absolute value of the difference between the first grayscale value and the second grayscale value divided by the total number of steps is the unit change value of the grayscale for each progressive step. The number of steps is multiplied by the unit change value, and then added to the first grayscale value to obtain the target grayscale value corresponding to the original grayscale value. It should be noted that the difference between the first grayscale value and the second grayscale value mentioned in this application document has a fixed meaning of the first grayscale value minus the second grayscale value, rather than the second grayscale value minus the first grayscale value. Figure 6 is a schematic diagram of step-by-step image bright color processing according to an optional embodiment of the present invention. The second gamma curve is a curve for bright color processing of high-brightness images, the first gamma curve is a curve for bright color processing of low-brightness images, the first grayscale value determined on the first gamma curve by the original grayscale value is a, the second grayscale value determined on the second gamma curve is b, and the total number of steps is n. Figure 6 As shown, the range between a and b can be divided into n steps, and the unit change value is (ab) / n. In this case, the unit change value is negative. When the first original image is the next image after the second original image, the target grayscale value is a + (ab) / n. When there is an image corresponding to the first gamma curve between the first and second original images, the target grayscale value is a + (ab) / n + (ab) / n. However, if the first original image uses the high-brightness image brightening curve, and the second original image does not fully use the low-brightness image brightening curve, and the second original image switches to a low-grayscale image during the transition from the high-brightness image brightening curve to the low-brightness image brightening curve, then (ab) / n is subtracted. For example, continuing with the above example, when the first original image is a low-grayscale image, the X value is a + (ab) / n + (ab) / n - (ab) / n.

[0054] It should be noted that for the aforementioned method embodiments, for simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that the present invention is not limited by the order of the actions described, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0055] Through the description of the above embodiments, those skilled in the art can clearly understand that the display method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0056] According to an embodiment of the present invention, a display device for implementing the above display method is also provided. Figure 7 is a structural block diagram of a display device provided according to an embodiment of the present invention, such as Figure 7 As shown, the display device includes: an acquisition module 72, a first determination module 74, a second determination module 76 and a display module 78. The display device is described below.

[0057] The acquisition module 72 is configured to acquire RGB three primary color values of a plurality of pixels of a first original image, wherein the first original image is one of a plurality of images included in a target video.

[0058] The first determining module 74 is connected to the acquiring module 72 and is configured to determine a first gamma curve corresponding to the first original image according to RGB primary color values of a plurality of pixels of the first original image.

[0059] The second determining module 76 is connected to the first determining module 74 and is configured to perform brightness processing on the first original image according to the first gamma curve to obtain a first target image.

[0060] The display module 78 is connected to the second determining module 76 and is configured to display the first target image.

[0061] It should be noted that the acquisition module 72, first determination module 74, second determination module 76, and display module 78 described above correspond to steps S202 to S206 in the embodiment. The examples and application scenarios implemented by these modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules, as part of the device, can be run in the computer terminal 10 provided in the embodiment.

[0062] An embodiment of the present invention may provide a computer device. Optionally, in this embodiment, the computer device may be located in at least one of a plurality of network devices in a computer network. The computer device includes a memory and a processor.

[0063] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the display method and device in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned display method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely located relative to the processor, and these remote memories can be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0064] The processor can call information and applications stored in the memory through the transmission device to execute the following steps: obtaining RGB three primary color values of multiple pixels of a first original image, wherein the first original image is one of multiple images included in a target video; determining a first gamma curve corresponding to the first original image based on the RGB three primary color values of the multiple pixels of the first original image; performing brightness processing on the first original image based on the first gamma curve to obtain a first target image; and displaying the first target image.

[0065] Optionally, the processor may also execute program code for the following steps: performing brightness processing on the first original image according to a first gamma curve to obtain a first target image, including: determining an original grayscale value of a pixel to be corrected in the first original image according to RGB primary color values of a plurality of pixels in the first original image, wherein the pixel to be corrected is any pixel in the first original image; adjusting the brightness of the pixel to be corrected according to the first gamma curve, adjusting the pixel to be corrected from the original grayscale value to the target grayscale value, to obtain the first target image.

[0066] Optionally, the processor may also execute program code for the following steps: adjusting the brightness of the pixel to be corrected according to the first gamma curve, adjusting the pixel to be corrected from the original grayscale value to the target grayscale value, and obtaining a first target image, including: determining a first grayscale value corresponding to the original grayscale value according to the first gamma curve, wherein the original grayscale value is the value of the independent variable in the first gamma curve, and the first grayscale value is the value of the dependent variable in the first gamma curve; and when the first grayscale value is used as the target grayscale value, adjusting the pixel to be corrected from the original grayscale value to the first grayscale value, and obtaining the first target image.

[0067] Optionally, the processor may further execute program code for the following steps: adjusting the brightness of the pixel to be corrected according to the first gamma curve, adjusting the pixel to be corrected from an original grayscale value to a target grayscale value, and obtaining a first target image, including: determining a first grayscale value corresponding to the original grayscale value according to the first gamma curve, wherein the original grayscale value is a value of an independent variable in the first gamma curve, and the first grayscale value is a value of a dependent variable in the first gamma curve; determining a second grayscale value corresponding to the original grayscale value according to the second gamma curve, wherein the original grayscale value is a value of an independent variable in the second gamma curve, and the second grayscale value is a value of a dependent variable in the second gamma curve, the second gamma curve is a gamma curve corresponding to a second original image, and the second original image is the last image before the first original image that corresponds to a different gamma curve from the second original image; obtaining a step number corresponding to the first original image, wherein the step number represents a distance between the first original image and the second original image; determining a target grayscale value according to the first grayscale value, the second grayscale value, and the step number; and adjusting the pixel to be corrected from the original grayscale value to the target grayscale value, and obtaining the first target image.

[0068] Optionally, the processor may also execute the program code of the following steps: determining the target grayscale value based on the first grayscale value, the second grayscale value and the step number, including: obtaining a preset total step number; dividing the difference between the first grayscale value and the second grayscale value by the total step number to obtain a unit change value of the grayscale; multiplying the step number by the unit change value and then adding the result to the second grayscale value to obtain the target grayscale value.

[0069] Optionally, the processor may further execute program code of the following steps: obtaining a step number, including: determining the number of images between the second original image and the first original image as the step number.

[0070] Optionally, the processor may also execute program code for the following steps: determining a first gamma curve corresponding to the first original image based on the RGB three primary color values of multiple pixels of the first original image, including: determining multiple pixel value intervals, wherein the multiple pixel value intervals correspond one-to-one to multiple gamma curves; determining multiple numbers of pixel values corresponding one-to-one to the multiple pixel value intervals based on the RGB three primary color values of multiple pixels of the first original image, wherein the number of pixel values represents the number of RGB three primary color values of multiple pixels of the first original image included in the corresponding pixel value interval; and determining that the gamma curve corresponding to the interval with the largest number of pixel values among the multiple pixel value intervals is the first gamma curve.

[0071] An embodiment of the present invention provides a display solution. By using different gamma curves for bright color processing corresponding to different images, a first gamma curve corresponding to a first original image in a target video is determined, and bright color processing is performed on the first original image according to the first gamma curve to obtain a first target image after the bright color processing of the first original image. The first target image is then displayed. This achieves the purpose of determining the most appropriate gamma curve for the original image based on its characteristics and using the gamma curve for bright color processing of the original image, thereby achieving the technical effect of optimizing the bright color processing effect of the original image. This further solves the technical problem in the prior art of using the same gamma curve for bright color processing of all images in a video, which results in different images not achieving the optimal processing effect.

[0072] A person skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a non-volatile storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0073] The embodiment of the present invention further provides a non-volatile storage medium. Optionally, in this embodiment, the non-volatile storage medium can be used to store the program code executed by the display method provided in the embodiment.

[0074] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0075] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: obtaining RGB three primary color values of multiple pixels of a first original image, wherein the first original image is one of multiple images included in a target video; determining a first gamma curve corresponding to the first original image based on the RGB three primary color values of the multiple pixels of the first original image; performing brightness processing on the first original image according to the first gamma curve to obtain a first target image; and displaying the first target image.

[0076] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: performing brightness processing on the first original image according to a first gamma curve to obtain a first target image, including: determining the original grayscale value of a pixel to be corrected in the first original image according to RGB primary color values of multiple pixels of the first original image, wherein the pixel to be corrected is any pixel in the first original image; adjusting the brightness of the pixel to be corrected according to the first gamma curve, adjusting the pixel to be corrected from the original grayscale value to the target grayscale value, to obtain the first target image.

[0077] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: adjusting the brightness of the pixel to be corrected according to the first gamma curve, adjusting the pixel to be corrected from the original grayscale value to the target grayscale value, and obtaining a first target image, including: determining a first grayscale value corresponding to the original grayscale value according to the first gamma curve, wherein the original grayscale value is the independent variable value in the first gamma curve, and the first grayscale value is the dependent variable value in the first gamma curve; when the first grayscale value is used as the target grayscale value, adjusting the pixel to be corrected from the original grayscale value to the first grayscale value, and obtaining the first target image.

[0078] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: adjusting the brightness of the pixel to be corrected according to the first gamma curve, adjusting the pixel to be corrected from the original grayscale value to the target grayscale value, and obtaining a first target image, including: determining a first grayscale value corresponding to the original grayscale value according to the first gamma curve, wherein the original grayscale value is the value of the independent variable in the first gamma curve, and the first grayscale value is the value of the dependent variable in the first gamma curve; determining a second grayscale value corresponding to the original grayscale value according to the second gamma curve, wherein the original grayscale value is the value of the independent variable in the first gamma curve, and the first grayscale value is the value of the dependent variable in the first gamma curve; The value is the value of the independent variable in the second gamma curve, the second grayscale value is the value of the dependent variable in the second gamma curve, the second gamma curve is the gamma curve corresponding to the second original image, and the second original image is the last image before the first original image and corresponds to a different gamma curve than the second original image; the step number corresponding to the first original image is obtained, wherein the step number represents the distance between the first original image and the second original image; the target grayscale value is determined according to the first grayscale value, the second grayscale value, and the step number; and the pixel to be corrected is adjusted from the original grayscale value to the target grayscale value to obtain the first target image.

[0079] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: determining a target grayscale value based on the first grayscale value, the second grayscale value and the step number, including: obtaining a preset total step number; dividing the difference between the first grayscale value and the second grayscale value by the total step number to obtain a unit change value of the grayscale; multiplying the step number by the unit change value and adding the resultant value to the second grayscale value to obtain a target grayscale value.

[0080] Optionally, in this embodiment, the non-volatile storage medium is configured to store program codes for executing the following steps: obtaining a step number, including: determining the number of images between the second original image and the first original image as the step number.

[0081] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: determining a first gamma curve corresponding to the first original image based on the RGB three primary color values of multiple pixels of the first original image, including: determining multiple pixel value intervals, wherein the multiple pixel value intervals correspond one-to-one to multiple gamma curves; determining multiple numbers of pixel values corresponding one-to-one to the multiple pixel value intervals based on the RGB three primary color values of multiple pixels of the first original image, wherein the number of pixel values represents the number of RGB three primary color values of the multiple pixels of the first original image included in the corresponding pixel value interval; and determining that the gamma curve corresponding to the interval with the largest number of pixel values among the multiple pixel value intervals is the first gamma curve.

[0082] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0083] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

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

[0085] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0086] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0087] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, and other media that can store program code.

[0088] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A display method, characterized in that: include: Obtaining RGB three-primary color values of multiple pixels of a first original image, wherein the first original image is one of multiple images included in a target video; determining a first gamma curve corresponding to the first original image according to RGB three primary color values of a plurality of pixels of the first original image; Performing brightness processing on the first original image according to the first gamma curve to obtain a first target image; displaying the first target image; Wherein, determining the first gamma curve corresponding to the first original image based on the RGB three primary color values of multiple pixels of the first original image includes: determining multiple pixel value intervals, wherein the multiple pixel value intervals correspond one-to-one to multiple gamma curves; determining the number of multiple pixel values corresponding one-to-one to the multiple pixel value intervals based on the RGB three primary color values of multiple pixels of the first original image, wherein the number of pixel values represents the number of RGB three primary color values of multiple pixels of the first original image included in the corresponding pixel value interval; and determining that the gamma curve corresponding to the interval with the largest number of pixel values among the multiple pixel value intervals is the first gamma curve.

2. The method according to claim 1, characterized in that The performing brightness processing on the first original image according to the first gamma curve to obtain a first target image includes: Determining an original grayscale value of a pixel to be corrected in the first original image according to RGB primary color values of a plurality of pixels in the first original image, wherein the pixel to be corrected is any pixel in the first original image; The brightness of the pixel to be corrected is adjusted according to the first gamma curve, and the pixel to be corrected is adjusted from the original grayscale value to the target grayscale value to obtain the first target image.

3. The method according to claim 2, characterized in that The step of adjusting the brightness of the pixel to be corrected according to the first gamma curve, adjusting the pixel to be corrected from the original grayscale value to the target grayscale value, and obtaining the first target image includes: Determining a first grayscale value corresponding to the original grayscale value according to the first gamma curve, wherein the original grayscale value is an independent variable value in the first gamma curve, and the first grayscale value is a dependent variable value in the first gamma curve; In the case where the first grayscale value is used as the target grayscale value, the pixel to be corrected is adjusted from the original grayscale value to the first grayscale value to obtain the first target image.

4. The method according to claim 2, characterized in that The step of adjusting the brightness of the pixel to be corrected according to the first gamma curve, adjusting the pixel to be corrected from the original grayscale value to the target grayscale value, and obtaining the first target image includes: Determining a first grayscale value corresponding to the original grayscale value according to the first gamma curve, wherein the original grayscale value is an independent variable value in the first gamma curve, and the first grayscale value is a dependent variable value in the first gamma curve; Determining a second grayscale value corresponding to the original grayscale value according to a second gamma curve, wherein the original grayscale value is an independent variable value in the second gamma curve, the second grayscale value is a dependent variable value in the second gamma curve, the second gamma curve is a gamma curve corresponding to a second original image, and the second original image is the last image before the first original image and corresponds to a different gamma curve than the second original image; Obtaining a step number corresponding to the first original image, wherein the step number represents a distance between the first original image and the second original image; determining the target grayscale value according to the first grayscale value, the second grayscale value, and the step number; The pixel to be corrected is adjusted from the original grayscale value to the target grayscale value to obtain the first target image.

5. The method according to claim 4, characterized in that The step of determining the target grayscale value according to the first grayscale value, the second grayscale value, and the step number includes: Get the total number of preset steps; Dividing the difference between the first grayscale value and the second grayscale value by the total number of steps to obtain a unit change value of the grayscale; The target grayscale value is obtained by multiplying the step number by the unit change value and adding the resultant result to the second grayscale value.

6. The method according to claim 4, characterized in that The obtaining of the step number includes: The number of images between the second original image and the first original image is determined as the step number.

7. A display device, characterized in that: include: an acquisition module, configured to acquire RGB three primary color values of a plurality of pixels of a first original image, wherein the first original image is one of a plurality of images included in a target video; a first determining module, configured to determine a first gamma curve corresponding to the first original image according to RGB primary color values of a plurality of pixels of the first original image; a second determining module, configured to perform brightness processing on the first original image according to the first gamma curve to obtain a first target image; A display module, configured to display the first target image; Among them, the first determination module is further used to determine multiple pixel value intervals, wherein the multiple pixel value intervals correspond one-to-one to multiple gamma curves; determine the number of multiple pixel values that correspond one-to-one to the multiple pixel value intervals based on the RGB three primary color values of multiple pixels of the first original image, wherein the number of pixel values represents the number of RGB three primary color values of multiple pixels of the first original image included in the corresponding pixel value interval; and determine that the gamma curve corresponding to the interval with the largest number of pixel values among the multiple pixel value intervals is the first gamma curve.

8. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored program, wherein when the program is executed, the device where the non-volatile storage medium is located is controlled to execute the display method according to any one of claims 1 to 6.

9. A computer device, characterized in that: include: memory and processor, The memory stores a computer program; The processor is configured to execute a computer program stored in the memory, and when the computer program is executed, the processor is enabled to execute the display method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Display panel drive method and drive system and display device comprising drive system

    CN108962126A