Image adjustment method, device and computer storage medium

By selecting frame buffer mode or non-frame buffer mode to process images based on bandwidth utilization information, and adjusting image brightness in conjunction with a brightness adjustment curve, the problem of excessive bandwidth occupancy in high-resolution image display is solved, improving the smoothness and quality of image display.

CN115131220BActive Publication Date: 2025-11-11CNAUTOCHIPS SHANGHAI CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110327572.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-26
Publication Date
2025-11-11
Estimated Expiration
2041-03-26

AI Technical Summary

Technical Problem

During image display, displaying high-resolution images may lead to excessive bandwidth usage, resulting in problems such as stuttering, tearing, or misalignment.

Method used

By acquiring system bandwidth utilization information, it is determined whether the bandwidth is less than the first threshold. The input image is then processed using either frame buffer mode or non-frame buffer mode. In frame buffer mode, the brightness histogram is statistically analyzed and the brightness is adjusted according to the brightness adjustment curve. In non-frame buffer mode, the brightness is adjusted using a preset brightness adjustment curve.

Benefits of technology

It improves the smoothness and quality of image display, reduces bandwidth consumption, enhances image contrast and detail, and improves display effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115131220B_ABST
    Figure CN115131220B_ABST
Patent Text Reader

Abstract

This application discloses an image adjustment method, apparatus, and computer storage medium. The method includes the following steps: acquiring the input image of the current frame and the system bandwidth utilization information at the current moment; determining whether the bandwidth utilization information is less than a first threshold; if the bandwidth utilization information is less than the first threshold, processing the input image using frame buffer mode to obtain an adjusted image; if the bandwidth utilization information is not less than the first threshold, processing the input image using non-frame buffer mode to obtain an adjusted image. Through the above method, this application can improve the efficiency and quality of image display.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to an image adjustment method, an image adjustment device, and a computer storage medium. Background Technology

[0002] Before an image is displayed on a screen, it needs to undergo steps such as decoding, brightness adjustment, and rendering to ensure that the image displayed on the screen has a better visual experience.

[0003] As people have higher requirements for image quality and the resolution of images and displays continues to improve, more bandwidth is required during the display process, which may lead to image display stuttering, tearing, or misalignment. Summary of the Invention

[0004] This application provides an image adjustment method, an image adjustment device, and a computer storage medium to solve the problem of poor image display quality in related technologies.

[0005] To address the aforementioned technical problems, this application provides an image adjustment method. The method includes: acquiring the input image of the current frame and the system bandwidth utilization information at the current moment; determining whether the bandwidth utilization information is less than a first threshold; if the bandwidth utilization information is less than the first threshold, processing the input image using a frame buffer mode to obtain an adjusted image; if the bandwidth utilization information is not less than the first threshold, processing the input image using a non-frame buffer mode to obtain an adjusted image.

[0006] To address the aforementioned technical problems, this application provides an image adjustment device. This image adjustment device includes a video processing module, a communication module, a frame buffer, a display processing module, and a DMA controller. The DMA controller is coupled to the video processing module and the display processing module. The communication module is coupled to the DMA controller and the frame buffer. During operation, the video processing module executes instructions to cooperate with the communication module, the frame buffer, the display processing module, and the DMA controller in performing the image brightness adjustment method described above.

[0007] To address the aforementioned technical problems, this application provides a computer storage medium. The computer storage medium stores a computer program, which is executed to implement the steps of the image adjustment method described above.

[0008] This application obtains the system's current bandwidth utilization information and determines the processing mode for the input image based on this information: if the bandwidth utilization is less than a first threshold, the input image is processed using a framebuffer mode; if the bandwidth utilization is not less than the first threshold, the input image is processed using a non-framebuffer mode. This allows for the rational configuration of the input image processing mode based on the combined bandwidth utilization information, thereby improving the smoothness and quality of image display. Attached Figure Description

[0009] Figure 1 This is a schematic diagram of the structure of the first embodiment of the image adjustment device provided in this application;

[0010] Figure 2 This is a flowchart illustrating the first embodiment of the image adjustment method provided in this application;

[0011] Figure 3 This is a flowchart illustrating one embodiment of the calculation of brightness adjustment curve based on the brightness histogram of the input image provided in this application;

[0012] Figure 4 This is a flowchart illustrating one embodiment of calculating the brightness adjustment curve of an input image based on a brightness histogram, as provided in this application.

[0013] Figure 5 This is a schematic diagram of an embodiment of the preset brightness adjustment curve provided in this application;

[0014] Figure 6 This is a flowchart illustrating the second embodiment of the image adjustment method provided in this application;

[0015] Figure 7 This is a schematic diagram of local brightness adjustment of an image provided in this application.

[0016] Figure 8 This is a schematic diagram of the structure of an embodiment of the computer storage medium provided in this application. Detailed Implementation

[0017] To enable those skilled in the art to better understand the technical solutions of the present invention, the image adjustment method, image adjustment device, and computer storage medium provided in this application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0018] Please see Figure 1 , Figure 1 This is a schematic diagram of the structure of the first embodiment of the image adjustment device provided in this application.

[0019] In this embodiment, the image adjustment device 10 includes a video processing module 11, a communication module 12, a frame buffer 13, a display processing module 14, and a DMA (Direct Memory Access) controller 15. The communication module 12 is coupled to the DMA controller 15 and the frame buffer 13, and the DMA controller 15 is coupled to the video processing module 11 and the display processing module 14.

[0020] The video processing module 11 includes a video port selection unit 111 and a brightness histogram statistics unit 112. The communication module 12 includes a bandwidth utilization information statistics unit 121. The display processing module 14 includes a brightness adjustment unit 141 and a static random access memory 142.

[0021] The video port selection unit 111 receives the input image and the bandwidth utilization information collected by the bandwidth utilization information statistics unit 121. The video port selection unit 111 determines whether the bandwidth utilization information is less than a first threshold. If the bandwidth utilization information is less than the first threshold, it determines to process the input image using frame buffer mode and sends the input image to the brightness histogram statistics unit 112 according to the first communication protocol to calculate the brightness histogram of the input image. Figure 1 The solid line represents the data flow direction; if the bandwidth utilization information is not less than the first threshold, it is determined that the input image will be processed in a non-frame buffer mode, and the input image will be transmitted to the brightness adjustment unit 141 according to the second communication protocol. Figure 1 The dashed line indicates the direction of data flow.

[0022] The first communication protocol is, for example, the AXI protocol, and the second communication protocol is, for example, the AXI stream protocol. The AXI stream protocol does not involve data reading and writing communication, but only simple sending and receiving, which can reduce transmission latency.

[0023] In frame buffer mode, after receiving the input image, the luminance histogram statistics unit 112 counts the number of pixels corresponding to each luminance value of the input image and generates a luminance histogram based on the number of pixels corresponding to each luminance value.

[0024] After generating the luminance histogram, the video processing module 11 uses the DMA controller 15 to transmit the input image and luminance histogram through the communication module 12 and write them into the frame buffer 13.

[0025] Before displaying the input image, the brightness adjustment unit 141 reads the input image and its corresponding brightness histogram from the frame buffer 13 via the DMA controller 15, and calculates the brightness adjustment curve of the input image based on the brightness histogram. The obtained brightness adjustment curve is stored in the static random access memory 142. The brightness adjustment unit 141 uses the brightness adjustment curve to perform global brightness adjustment on the input image to obtain an adjusted image.

[0026] In non-framebuffered mode, after receiving the input image, the brightness adjustment unit 141 retrieves a preset brightness adjustment curve from the static random access memory 142 and uses the preset brightness adjustment curve to perform global brightness adjustment on the input image to obtain an adjusted image. The preset brightness adjustment curve can be obtained through experience or experimentation and stored in the static random access memory 142.

[0027] Optionally, the display processing module 14 may further include a local brightness adjustment unit 143. After the input image has undergone global brightness adjustment, it can also be input into the local brightness adjustment unit 143 for local brightness adjustment optimization to obtain an adjusted image for display.

[0028] Based on the image adjustment device 10 described above, this application also provides the following embodiments:

[0029] Please see Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the image adjustment method provided in this application. This embodiment includes the following steps:

[0030] S110: Obtain the input image of the current frame and the system bandwidth utilization information at the current moment.

[0031] When acquiring the input image, obtain the system's bandwidth utilization information at the same time.

[0032] The input image can be a frame from an image or video that will be played on the display screen. The input image can be in RGB format, for example. Alternatively, the input image can be in YUV format, where Y represents the luminance component and U and V represent the chrominance components.

[0033] The system can be a System on Chip (SoC), integrating a microprocessor, IP cores, and memory (or external memory interfaces). Specifically, the system may integrate a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a video codec, a memory controller, an Image Signal Processor (ISP), and external interfaces such as DDR interfaces, FLASH interfaces, and display interfaces. The system can have an on-chip network architecture or a bus to facilitate data communication between IP cores.

[0034] The processor and memory need to exchange data frequently, and the bandwidth of the communication link affects the efficiency of data transmission. Higher bandwidth results in higher data transmission efficiency, and vice versa. For example, insufficient bandwidth between the GPU and memory can lead to latency in image reading and writing, thereby reducing the efficiency and quality of image display.

[0035] The bandwidth utilization information can be either the bandwidth occupancy rate or a specific bandwidth occupancy value; this application does not impose any restrictions on this.

[0036] S120: Determine whether the bandwidth utilization information is less than the first threshold.

[0037] By comparing the bandwidth utilization information with the magnitude of the first threshold, the bandwidth load at the current moment can be determined.

[0038] If the bandwidth utilization information is less than the first threshold, it means that the bandwidth resources are sufficient at the current time, so execute S130; if the bandwidth information is not less than the first threshold, it means that the bandwidth resources are tight at the current time, so execute S140.

[0039] S130: The input image is processed using frame buffer mode to obtain an adjusted image.

[0040] When the bandwidth utilization information is less than the first threshold, the mode for processing the input image is determined to be frame buffer mode, and the input image is processed using frame buffer mode to obtain the adjusted image.

[0041] Specifically, in response to bandwidth utilization information being less than a first threshold, the input image is stored in a framebuffer. The input image in the framebuffer is read, and its brightness is adjusted to obtain an adjusted image.

[0042] The frame buffer is an area used to temporarily store the input image. It provides an interface to the display device, abstracting the display buffer and shielding it from the underlying differences in image hardware, allowing upper-level applications to directly read and write to the display buffer in graphics mode. The frame buffer may be located in dynamic random access memory, specifically in DDR (Double Data Rate Synchronous Dynamic Random Access Memory).

[0043] Compared to color, the human eye is more sensitive to brightness. Therefore, before the input image stored in the frame buffer is sent to the screen for display, the brightness of the input image is further adjusted to make the adjusted image more uniform in brightness, thereby achieving a better display effect.

[0044] In this embodiment, a brightness adjustment curve can be used to adjust the brightness of the input image. The horizontal axis of the brightness adjustment curve represents the original brightness value of the input image, and the vertical axis represents the output brightness value, that is, the brightness value of the pixel corresponding to a certain brightness value after brightness adjustment. Of course, the vertical axis of the brightness adjustment curve can also represent the original brightness value of the input image, and the horizontal axis can represent the output brightness value. This embodiment uses the original brightness value as the horizontal axis and the adjusted brightness value as the vertical axis as an example for explanation. The horizontal and vertical axes of the brightness adjustment curve are evenly distributed with brightness values ​​from the darkest to the brightest. For example, the brightness value 0 at the origin represents the darkest brightness, that is, pure black, and the brightness value farthest from the origin represents the brightest brightness, that is, pure white. The range of brightness values ​​is, for example, 0-255. Of course, the specific range of brightness values ​​can be determined according to the brightness range of the image, and this application does not limit it.

[0045] For example, if the brightness value on the horizontal axis of the brightness adjustment curve is 20 and the brightness value on the vertical axis is 25, then all pixels in the input image with a brightness value of 20 will have an adjusted brightness value of 25.

[0046] The brightness adjustment curve can be obtained from the brightness histogram of the input image or it can be preset.

[0047] Please see Figure 3 , Figure 3 This is a flowchart illustrating one embodiment of the method for calculating the brightness adjustment curve based on the brightness histogram of an input image, as provided in this application. This embodiment includes:

[0048] S131: In response to the bandwidth utilization information being less than a first threshold, the brightness histogram of the input image is statistically analyzed.

[0049] Specifically, the number of pixels corresponding to each brightness value in the input image is counted, and a brightness histogram is generated based on the number of pixels corresponding to each brightness value.

[0050] If the input image is in YUV format, the brightness value of the pixel can be determined based on the Y component. If the input image is in RGB format, the RGB color image needs to be converted to grayscale first, that is, the Y component is calculated based on the RGB data, using the formula Y = 0.299*R + 0.587*G + 0.114*B, thus obtaining the brightness value of each pixel.

[0051] The horizontal axis of a luminance histogram can be pre-defined with multiple luminance value intervals. Each interval includes at least one luminance value, and the intervals are continuous and non-overlapping. Each interval has the same group interval, which can be 1, 2, 4, 8…64 or 128, etc. For example, with a group interval of 4 and a luminance value range of 0–255, there are 64 luminance value intervals, including 0–3, 4–7, 8–11…248–251, and 252–255.

[0052] Calculate the sum of the number of pixels corresponding to all brightness values ​​within a brightness value interval to obtain the interval pixel count for each brightness value interval. The interval pixel count is represented by the vertical axis of the brightness histogram.

[0053] For example, if we count the number of pixels with a brightness value of 0 in a certain image and find that there are 20 pixels with a brightness value of 1, 40 pixels with a brightness value of 2, 90 pixels with a brightness value of 3, and 50 pixels with a brightness value of 3, then the total number of pixels in that interval is 200.

[0054] S132: Store the luminance histogram in the frame buffer.

[0055] After obtaining the brightness histogram, the brightness histogram is written into the frame buffer along with the input image.

[0056] S133: Read the luminance histogram in the frame buffer and calculate the luminance adjustment curve of the input image based on the luminance histogram.

[0057] A brightness histogram can reflect the number of pixels at each brightness value in an input image. The distribution of the number of pixels can reflect whether the brightness of the input image is too dark or too bright, whether the contrast is low or high, and whether the level of detail is rich.

[0058] For example, if most pixel brightness values ​​are clustered in a darker range, the image is generally dark, resulting in a loss of detail in bright areas; if most pixel brightness values ​​are clustered in a brighter range, the image is generally bright, resulting in a loss of detail in dark areas; if most pixel brightness values ​​are clustered in a gray range (a transitional brightness from dark to light), both bright and dark details are lost. All of these clustering of pixel brightness values ​​lead to low image contrast and insufficient detail and gradation. Conversely, when a certain number of pixels have a wide range of brightness values—for example, covering most or all of the brightness value range—and the pixels are evenly distributed, the image exhibits higher contrast, richer gradation, and more detail, resulting in a better display effect.

[0059] Based on the luminance histogram, the luminance value range where pixels cluster is determined. The slope of this luminance value range in the luminance adjustment curve is reduced to decrease the number of pixels in that range, thereby dispersing some pixels to other luminance value ranges to achieve image brightness adjustment. There are various methods for calculating the luminance adjustment curve of the input image based on the luminance histogram. This embodiment provides two implementation methods: equalization mode and contrast mode. The user can preset which mode to select for image processing, or the mode can be automatically selected based on the pixel distribution of the luminance histogram. For example, if the luminance values ​​of most pixels are clustered in the gray areas, equalization mode can be selected; if the luminance values ​​of most pixels are clustered in the bright and / or dark areas, contrast mode can be selected.

[0060] Please see Figure 4 , Figure 4 This is a flowchart illustrating one embodiment of the method for calculating the brightness adjustment curve of an input image based on a brightness histogram, as provided in this application. This embodiment is an equalization mode and includes the following steps:

[0061] S1331: Obtain the first brightness threshold, the second brightness threshold, the initial brightness adjustment curve, and the total number of pixels in the input image.

[0062] The first and second brightness thresholds are used to divide the brightness value range into bright area, gray area, and dark area brightness value ranges. A brightness value range less than or equal to the first threshold belongs to the dark area; a brightness value range less than the first threshold but greater than the second threshold belongs to the gray area; and a brightness value range greater than or equal to the second threshold belongs to the bright area. The first and second brightness thresholds can be preset or determined based on the peak values ​​of the brightness histogram.

[0063] To completely divide the dark, bright, and gray areas without breaking a certain brightness value range, the first brightness value threshold and the second brightness value threshold can be the boundary values ​​of the brightness value range. For example, when the group interval is 4 and the brightness value range is 0 to 255, the number of brightness value ranges is 64, including 0 to 3, 4 to 7...64 to 67, 68 to 71...248 to 251, 252 to 255. The first brightness value threshold can be 67, 68, or 71, etc. The values ​​listed in this embodiment are only examples and do not limit the range of values ​​for the first brightness value threshold, the second brightness value threshold, etc.

[0064] The slope of each brightness value range in the initial brightness adjustment curve is 1, meaning that any brightness value on the horizontal axis is the same as its corresponding brightness value on the vertical axis, and will not cause a change in pixel brightness.

[0065] The total number of pixels in the input image is the sum of the number of pixels for each brightness value.

[0066] S1332: Calculate the average number of pixels in each brightness value interval based on the total number of pixels and the number of brightness value intervals.

[0067] Dividing the total number of pixels by the number of brightness value intervals yields the average number of pixels in each brightness value interval.

[0068] S1333: Determine the first brightness value range to be adjusted and the second brightness value range to be adjusted based on the first brightness value threshold and the second brightness value threshold.

[0069] The first and second brightness value ranges to be adjusted can be determined based on the distance between the brightness value range and the first and second brightness value thresholds.

[0070] Specifically, the distance between the first brightness value range to be adjusted and the first brightness value threshold is smaller than the distance between the first brightness value threshold and the second brightness value threshold, that is, the brightness value range that is closer to the first brightness value threshold than the second brightness value threshold; the distance between the second brightness value range to be adjusted and the second brightness value threshold is smaller than the distance between the second brightness value threshold and the first brightness value threshold, that is, the brightness value range that is closer to the second brightness value threshold than the first brightness value threshold.

[0071] Furthermore, the first brightness value range to be adjusted and the second brightness value range to be adjusted are the brightness value ranges between the first brightness value threshold and the second brightness value threshold, that is, the first brightness value range to be adjusted and the second brightness value range to be adjusted are greater than (or greater than or equal to) the first brightness value threshold and less than (or less than or equal to) the second brightness value threshold.

[0072] For example, when the group interval is 4 and the brightness value range is 0-255, the brightness value intervals include 0-3, 4-7…64-67, 68-71…124-127, 128-131…184-187, 188-191…248-251, 252-255. The first brightness value threshold is 68, and the second brightness value threshold is 188. Then, the distance between the brightness value interval with a brightness value greater than or equal to 68 and less than 128 and the first brightness value threshold 68 is smaller than the distance between the brightness value interval with a brightness value less than 128 and the first brightness value threshold 68. Therefore, the brightness value interval with a brightness value greater than or equal to 68 and less than 128 can be determined as the first brightness value interval to be adjusted. Similarly, the brightness value interval with a brightness value greater than or equal to 128 and less than 188 can be determined as the second brightness value interval to be adjusted.

[0073] S1334: Compare whether the number of pixels in the first interval of the first brightness value range to be adjusted is greater than the average number of pixels, and compare whether the number of pixels in the second interval of the second brightness value range to be adjusted is greater than the average number of pixels.

[0074] Compare whether the number of pixels in the first interval of each first brightness value interval to be adjusted is greater than the average number of pixels, and compare whether the number of pixels in the second interval of each second brightness value interval to be adjusted is greater than the average number of pixels.

[0075] If the number of pixels in the first interval is greater than the average number of pixels, it indicates that there is pixel clustering in the first interval where brightness values ​​to be adjusted are located. The pixels in this first interval need to be redistributed to other brightness value intervals, especially the darker intervals. Similarly, if the number of pixels in the second interval is greater than the average number of pixels, it indicates that there is also pixel clustering in the second interval where brightness values ​​to be adjusted are located. The pixels in this second interval need to be redistributed to other brightness value intervals, especially the brighter intervals.

[0076] After determining that the number of pixels in the first interval is greater than the average number of pixels and / or the number of pixels in the second interval is greater than the average number of pixels, execute S1335.

[0077] S1335: Decrease the first slope corresponding to the first brightness value interval to be adjusted in the initial brightness adjustment curve, and increase the second slope of the second brightness value interval to be adjusted in the initial brightness adjustment curve to obtain the adjusted brightness adjustment curve.

[0078] For the first brightness value interval to be adjusted, where the number of pixels in the first interval is greater than the average number of pixels, its first slope is decreased to less than 1. This allows some pixels clustered in the darker gray areas to be distributed to the brightness value intervals located in the darker areas. For the second brightness value interval to be adjusted, where the number of pixels in the second interval is greater than the average number of pixels, its second slope is increased to greater than 1. This allows some pixels clustered in the brighter gray areas to be distributed to the brightness value intervals located in the brighter areas. By dividing the gray areas into two parts and adjusting the brightness separately, the brightness transition becomes more natural.

[0079] Specifically, reducing the first slope means modifying the first slope to be the ratio of the average number of pixels to the number of pixels in the first interval. The formula is expressed as follows:

[0080] slop index1 =count avg / cout index1

[0081] Among them, slop index1 Represents the first slope, count avg cout represents the average number of pixels. index1 This indicates the number of pixels in the first interval.

[0082] Increasing the second slope specifically means modifying it to be the ratio of the number of pixels in the first interval to the average number of pixels. The formula is expressed as follows:

[0083] slop index2 =count index2 / cout avg

[0084] Among them, slop index2 Represents the second slope, count avg cout represents the average number of pixels. index2 This indicates the number of pixels in the second interval.

[0085] The modified first slope is inversely proportional to the number of pixels in the first interval, and the second slope is directly proportional to the number of pixels in the first interval. This means that the larger the number of pixels in the first interval and the number of pixels in the second interval, the larger the proportion of pixels will be allocated to other brightness value intervals, which can better balance the distribution of the number of pixels of each brightness value in the input image.

[0086] To avoid an imbalance in image brightness caused by an excessively small first slope and an excessively large second slope, a slope threshold can be set. If the first slope calculated according to the above formula is less than the first slope threshold, then the first slope is determined to be the first slope threshold; if the second slope calculated according to the above formula is greater than the second slope threshold, then the second slope is determined to be the second slope threshold.

[0087] Contrast mode is primarily used to increase the brightness of pixels in an input image by covering more of the brightness range in both dark and bright areas, thereby enhancing the image's contrast.

[0088] Specifically, a third brightness threshold, a fourth brightness threshold, and an initial brightness adjustment curve are obtained, where the third brightness threshold is less than the fourth brightness threshold. The third brightness threshold can be the same as or different from the first brightness threshold; similarly, the fourth brightness threshold can be the same as or different from the second brightness threshold. Based on the third and fourth brightness thresholds, a third and fourth adjustable brightness value range are determined.

[0089] In contrast mode, the third range of brightness values ​​to be adjusted is the range of brightness values ​​that are less than the third brightness value threshold, and the fourth range of brightness values ​​to be adjusted is the range of brightness values ​​that are greater than the fourth brightness value threshold.

[0090] For example, when the group interval is 4 and the brightness value range is 0-255, the brightness value intervals include 0-3, 4-7...64-67, 68-71...124-127, 128-131...184-187, 188-191...248-251, 252-255. The third brightness value threshold is 68, and the fourth brightness value threshold is 188. Then, the brightness value intervals with a brightness value less than 68 are the third brightness value intervals to be adjusted, and the brightness value intervals with a brightness value greater than or equal to 188 are the fourth brightness value intervals to be adjusted.

[0091] The brightness adjustment curve is obtained by decreasing the third slope of each third brightness value interval to be adjusted in the initial brightness adjustment curve, and increasing the fourth slope of each fourth brightness value interval to be adjusted in the initial brightness adjustment curve. Decreasing the third slope allows more pixels in the third brightness value interval to be adjusted to be distributed to darker brightness values, while increasing the fourth slope allows more pixels in the fourth brightness value interval to be adjusted to be distributed to brighter brightness values, thereby enhancing the image contrast and making the image more layered and detailed.

[0092] The third and fourth slopes can be adjusted using adjustment factors. Specifically, the total number of pixels in the input image, the first adjustment factor, and the second adjustment factor are obtained. The average number of pixels in each brightness value interval is calculated based on the total number of pixels and the number of brightness value intervals. The first adjustment factor is greater than 0 and less than 1, and the second adjustment factor is greater than 1.

[0093] Compare whether the number of pixels in the third interval of the third brightness value range to be adjusted is greater than the average number of pixels, and compare whether the number of pixels in the fourth interval of the fourth brightness value range to be adjusted is greater than the average number of pixels.

[0094] If the number of pixels in the third interval is greater than the average number of pixels, modify the third slope to the ratio of the number of pixels in the third interval to the average number of pixels multiplied by the first adjustment factor.

[0095] If the number of pixels in the third interval is not greater than the average number of pixels, modify the third slope to the ratio of the average number of pixels to the number of pixels in the third interval multiplied by the first adjustment factor.

[0096] If the number of pixels in the fourth interval is greater than the average number of pixels, modify the fourth slope to the ratio of the number of pixels in the fourth interval to the average number of pixels multiplied by the second adjustment factor.

[0097] If the number of pixels in the fourth interval is not greater than the average number of pixels, modify the fourth slope to the ratio of the average number of pixels to the number of pixels in the fourth interval multiplied by the second adjustment factor.

[0098] The formula is as follows:

[0099]

[0100] where, slop index represents the third slope or the fourth slope, count avg represents the average number of pixels, cout index represents the number of pixels in the interval, index < threshold low represents the third interval of the brightness value to be adjusted, index > threshold high represents the fourth interval of the brightness value to be adjusted, k < 1 represents the first adjustment factor, and k > 1 represents the second adjustment factor.

[0101] To avoid the third slope being too small and the fourth slope being too large, resulting in image brightness imbalance, a slope threshold can also be set. If the third slope calculated according to the above formula is less than the third slope threshold, determine the third slope as the third slope threshold; if the fourth slope calculated according to the above formula is greater than the fourth slope threshold, determine the fourth slope as the fourth slope threshold.

[0102] S140: Process the input image using the non-frame buffer mode to obtain an adjusted image.

[0103] In the non-frame buffer mode, the input image is not written into the frame buffer but directly transmitted to the display processing module, and after brightness adjustment, an adjusted image is obtained. In this way, there is no need to transmit the input image to the frame buffer, which can save bandwidth resources and improve image display efficiency when the current bandwidth resources are relatively tight.

[0104] In non-framebuffered mode, image brightness adjustment involves obtaining a preset brightness adjustment curve and using it to adjust the brightness of the input image, resulting in an adjusted image. This eliminates the need to calculate the brightness histogram of the input image, further reducing system bandwidth usage.

[0105] The preset brightness adjustment curve can be obtained through experience or experimentation and stored in the system or external memory.

[0106] Please see Figure 5 , Figure 5 This is a schematic diagram of an embodiment of the preset brightness adjustment curve provided in this application. The dashed line represents the initial brightness adjustment curve with a slope of 1, and the solid line represents the preset brightness adjustment curve used to adjust the brightness of the input image. Figure 5 The preset brightness adjustment curve in the image can reduce the brightness of pixels with a brightness value less than 128 and increase the brightness of pixels with a brightness value greater than 128, thereby enhancing the contrast of the input image. Of course, Figure 5 The preset brightness adjustment curve in the example is only for reference. The preset brightness adjustment curve can also be other curves, and this application does not limit it.

[0107] Adjusting the brightness of an input image based on a brightness adjustment curve is a global adjustment of the input image. To further improve the image display quality, local adjustments can be made after the input image has been adjusted using the brightness adjustment curve. Please refer to [link / reference]. Figure 6 , Figure 6 This is a flowchart illustrating the second embodiment of the image adjustment method provided in this application. This embodiment is based on the first embodiment of the image adjustment method, therefore the same steps will not be repeated here. This embodiment includes the following steps:

[0108] S210: Obtain the input image of the current frame and the system bandwidth utilization information at the current moment.

[0109] S220: Determine whether the bandwidth utilization information is less than the first threshold.

[0110] If the bandwidth utilization information is less than the first threshold, then execute S230; if the bandwidth information is not less than the first threshold, then execute S240.

[0111] S230: The input image is processed using frame buffer mode to obtain an adjusted image.

[0112] After processing the input image using frame buffer mode to obtain the adjusted image, execute S250.

[0113] S240: Process the input image using non-framebuffered mode to obtain an adjusted image.

[0114] After processing the input image using non-framebuffered mode to obtain the adjusted image, S250 is executed.

[0115] S250: Perform local brightness adjustment on the adjusted image to obtain the output image.

[0116] Specifically, the adjustment involves determining the region to be adjusted in the image, the brightness value of each pixel within that region, the filter, and the adjustment parameter values. The size of both the region to be adjusted and the filter is (2n+1)*(2n+1), where n is a positive integer. For example, the filter size can be 3*3, 5*5, 7*7, etc., and the specific size can be determined based on the resolution of the image being adjusted; this application does not impose any restrictions on this. The filter step size can be 1.

[0117] The average pixel value is obtained by calculating the brightness value of each pixel in the area to be adjusted using a filter. The formula is expressed as follows:

[0118]

[0119] or,

[0120]

[0121] Where avg represents the average pixel value, x(n-1), x(n), and x(n+1) represent the brightness values ​​of adjacent row pixels, and h(0) to h(7) represent the brightness value weights of pixels at corresponding positions in the area to be adjusted.

[0122] Compare the average pixel value with the center brightness value of the center pixel in the area to be adjusted.

[0123] If the average pixel value is greater than the center brightness value, the center brightness value of the center pixel is adjusted to be the difference between the average pixel value and the adjustment parameter value; if the average pixel value is less than the center brightness value, the center brightness value of the center pixel is adjusted to be the sum of the average pixel value and the adjustment parameter value. The formula is expressed as follows:

[0124]

[0125] Where y(m) represents the adjusted center brightness value, factor represents the adjustment parameter, and x(n) represents the center brightness value.

[0126] Please see Figure 7 , Figure 7 This is a schematic diagram of local brightness adjustment of an image provided in this application. The symbols in the diagram have the same meaning as the corresponding symbols described above.

[0127] By further adjusting the local aspects of the image, for center pixels with a center brightness value lower than the average pixel value, the center brightness value is decreased to improve local contrast and enhance local details; conversely, for center pixels with a center brightness value higher than the average pixel value, the center brightness value is increased, which also improves local contrast and enhances local details. This further enriches the image's details and layers, improving the image's display quality.

[0128] The methods described in the above embodiments can exist in the form of computer programs; therefore, this application proposes a computer storage medium. Please refer to [link / reference needed]. Figure 8 , Figure 8 This is a schematic diagram of a computer storage medium according to an embodiment of the present application. The computer storage medium 800 in this embodiment stores a computer program 801, which can be executed to implement the methods described in the above embodiments.

[0129] In this embodiment, the computer storage medium 80 can be a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or a medium that can store program instructions. Alternatively, it can be a server that stores the program instructions. The server can send the stored program instructions to other devices for execution, or it can execute the stored program instructions itself.

[0130] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0131] The units described as separate components may or may not be physically separate. 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 network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0132] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0133] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0134] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. An image adjustment method, characterized in that, The method includes: Obtain the input image of the current frame and the system bandwidth utilization information at the current moment; Determine whether the bandwidth utilization information is less than a first threshold; If the bandwidth utilization information is less than the first threshold, store the input image in the frame buffer; read the input image from the frame buffer; adjust the brightness of the input image to obtain the adjusted image; If the bandwidth utilization information is not less than the first threshold, the input image is processed using a non-frame buffer mode to obtain an adjusted image; wherein, in the non-frame buffer mode, the input image is not written to the frame buffer, but is directly transmitted to the display processing module for brightness adjustment.

2. The method according to claim 1, characterized in that, The method further includes: In response to the bandwidth utilization information being less than a first threshold, the brightness histogram of the input image is calculated; Store the brightness histogram in the frame buffer; Read the luminance histogram in the frame buffer and calculate the luminance adjustment curve of the input image based on the luminance histogram.

3. The method according to claim 2, characterized in that, The process of calculating the brightness histogram of the input image includes: Count the number of pixels corresponding to each brightness value in the input image; The brightness histogram is generated based on the number of pixels corresponding to each brightness value. The brightness histogram counts the number of pixels in each brightness value interval. Each brightness value interval includes at least one brightness value, and each brightness value interval does not overlap with the others.

4. The method according to claim 1, characterized in that, After processing the input image using framebuffered mode / non-framebuffered mode to obtain the adjusted image, the process further includes: The brightness of the adjusted image is locally adjusted to obtain the output image.

5. The method according to claim 4, characterized in that, The step of performing local brightness adjustment on the adjusted image to obtain an output image includes: Determine the region to be adjusted in the image to be adjusted, the brightness value of each pixel in the region to be adjusted, the filter, and the adjustment parameter value; The filter is used to calculate the brightness value of each pixel in the area to be adjusted, and the average pixel value is obtained. The brightness of the area to be adjusted is adjusted based on the average pixel value to obtain the output image.

6. The method according to claim 5, characterized in that, The step of adjusting the brightness of the region to be adjusted based on the average pixel value to obtain the output image includes: Compare the average pixel value with the center brightness value of the center pixel in the region to be adjusted; If the average pixel value is greater than the center brightness value, then the center brightness value of the center pixel is adjusted to be the difference between the average pixel value and the adjustment parameter value; If the average pixel value is less than the center brightness value, then the center brightness value of the center pixel is adjusted to be the sum of the average pixel value and the adjustment parameter value.

7. The method according to claim 1, characterized in that, The process of processing the input image using a non-framebuffered mode to obtain an adjusted image includes: Obtain the preset brightness adjustment curve; The brightness of the input image is adjusted using the preset brightness adjustment curve to obtain the adjusted image.

8. An image adjustment device, characterized in that, The image adjustment device includes a video processing module, a communication module, a frame buffer, a display processing module, and a DMA controller. The DMA controller is coupled to the video processing module and the display processing module. The communication module is coupled to the DMA controller and the frame buffer. When the video processing module is in operation, it executes instructions to cooperate with the communication module, the frame buffer, the display processing module, and the DMA controller to perform the image adjustment method as described in any one of claims 1 to 7.

9. A computer storage medium, characterized in that, The computer storage medium stores a computer program that is executed to implement the steps of the image adjustment method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Video image processing method and device, computer equipment and storage medium

    CN111402147A

  • Display pipeline memory bandwidth allocation systems and methods

    US20200074583A1