Method and device for enhancing readability of image under ambient light, chip, equipment, medium and program product
By acquiring the pixel brightness and brightness-weighted histogram of the image, calculating the image gain, and performing pixel-level brightness and color adjustments, the problem of poor image readability in strong light environments is solved, and effective image enhancement is achieved on lightweight devices.
Patent Information
- Application Number
- CN202511457450.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-13
- Publication Date
- 2026-01-06
AI Technical Summary
Existing technologies struggle to effectively enhance image readability in bright light environments, especially when the screen is driven to maximum brightness, as the image display is still affected by strong light.
By acquiring the pixel brightness and brightness-weighted histogram of the image, the image gain is calculated, and pixel-level brightness and color adjustments are performed, including image processing based on preset enhancement curves and influence factors, reducing hardware resource consumption.
It improves the readability of images under ambient light, reduces hardware resource consumption, and is suitable for lightweight devices such as wearable devices.
Smart Images

Figure CN121280296A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method, apparatus, chip, device, medium and program product for enhancing the readability of images under ambient light. Background Technology
[0002] Image processing is a technique that uses algorithms to analyze, modify, and optimize digital images. It encompasses a series of operations, such as image enhancement, restoration, segmentation, and feature extraction, aiming to improve image quality or extract valuable information. Among these, image readability enhancement under ambient light specifically refers to techniques for sharpening images acquired under complex ambient lighting conditions (such as strong light, weak light, and reflections). It primarily overcomes lighting interference by suppressing overexposure in highlight areas and brightening details in shadow areas, thereby significantly improving the legibility and reading comfort of text, images, and other content on screens or paper. Typically, display devices improve image readability in strong light environments by directly driving the screen backlight brightness. However, in some strong light environments, even when the screen is driven to maximum brightness, the display effect is still strongly affected by the strong light. Therefore, how to effectively enhance the readability of images under ambient light is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0003] This application provides a method, apparatus, chip, device, medium, and program product for enhancing the readability of images under ambient light, to solve the technical problem of how to effectively enhance the readability of images under ambient light.
[0004] The first aspect of this application provides a method for enhancing the readability of images under ambient light, the method comprising:
[0005] Obtain the image to be processed;
[0006] Obtain the pixel brightness and brightness-weighted histogram of the image to be processed;
[0007] The pixel brightness is input to the calculation unit to obtain the image gain;
[0008] Based on the image gain, the pixel brightness values of the image to be processed and the brightness weighted histogram are used to perform pixel-level brightness adjustment on the image to be processed to obtain a brightness-adjusted image;
[0009] The brightness-adjusted image is then subjected to pixel-level color adjustments to obtain an image with enhanced readability.
[0010] In some embodiments of the first aspect of this application, the method further includes:
[0011] The calculation unit obtains a mapping enhancement curve based on the pixel brightness and a preset enhancement curve; the preset enhancement curve includes a first preset enhancement curve and a second preset enhancement curve; and
[0012] Image gain is obtained based on the mapping enhancement curve.
[0013] In some embodiments of the first aspect of this application, the computing unit obtains a mapping enhancement curve based on the pixel brightness and a preset enhancement curve, including:
[0014] The calculation unit obtains the average brightness of the image to be processed based on the pixel brightness and the height and width of the image to be processed.
[0015] The enhancement curve weights are obtained based on the average brightness and ambient light intensity; and
[0016] The first preset enhancement curve and the second preset enhancement curve are fused based on the enhancement curve weights to obtain the mapping enhancement curve.
[0017] In some embodiments of the first aspect of this application, obtaining the pixel brightness of the image to be processed includes:
[0018] Obtain the pixel brightness value of each pixel in the image to be processed;
[0019] The pixel brightness values of each pixel are summed to obtain the pixel brightness sum of the image to be processed.
[0020] In some embodiments of the first aspect of this application, obtaining a brightness-weighted histogram of the image to be processed includes:
[0021] Obtain the pixel brightness value of each pixel in the image to be processed;
[0022] The brightness weight histogram is obtained by assigning weights to the next adjacent pixel based on the brightness value of the previous pixel, and by performing a weighted calculation based on the weight of each pixel; wherein, when the brightness value of the previous pixel is in the high-weight brightness region, the next adjacent pixel is assigned a high weight; when the brightness value of the previous pixel is in the low-weight brightness region, the next adjacent pixel is assigned a low weight.
[0023] In some embodiments of the first aspect of this application, acquiring a brightness-adjusted image includes:
[0024] The brightness range to which the pixel brightness value of each pixel in the image to be processed belongs is determined based on the pixel brightness weighted histogram.
[0025] Pixel-level brightness adjustment is performed based on the influence factor corresponding to the brightness range to which the pixel brightness value belongs and the image gain, and the brightness-adjusted image is obtained.
[0026] In some embodiments of the first aspect of this application, pixel-level brightness adjustment is performed based on the influence factor corresponding to the brightness range to which the pixel brightness value belongs and the image gain, including:
[0027] The image to be processed is divided into multiple grids; the vertices of each grid are key pixels.
[0028] Obtain the brightness range to which the pixel brightness value of the key pixel belongs, and generate the target gain of the key pixel based on the corresponding influence factor;
[0029] For each pixel in the image to be processed, obtain the target gain corresponding to the four nearest key pixels;
[0030] Gain interpolation is performed based on the distance of each pixel relative to the four nearest key pixels to obtain the pixel brightness gain of each pixel.
[0031] The pixel brightness value of the corresponding pixel is adjusted based on the pixel brightness gain of each pixel to obtain the brightness adjustment image.
[0032] In some embodiments of the first aspect of this application, color adjustment is performed on the brightness-adjusted image to obtain a readability-enhanced image, including determining pixel color gain based on the influence factor corresponding to the brightness range to which each pixel belongs and the image gain;
[0033] The pixel color value of the corresponding pixel is adjusted based on the pixel color gain of each pixel to obtain the readability-enhanced image.
[0034] In some embodiments of the first aspect of this application, the method further includes:
[0035] For each of the aforementioned brightness ranges, specify the influence factors corresponding to the red, green, and blue color channels;
[0036] Based on the brightness range to which each pixel belongs, the influence factor corresponding to different color channels is obtained, so as to determine the pixel color gain of the corresponding color channel based on the image gain and the influence factor.
[0037] A second aspect of this application provides an apparatus for enhancing the readability of an image under ambient light, comprising:
[0038] The readability enhancement unit is configured as follows:
[0039] Obtain the image to be processed;
[0040] Obtain the pixel brightness and brightness-weighted histogram of the image to be processed;
[0041] The pixel brightness is input to the calculation unit to obtain the image gain;
[0042] Based on the image gain, the pixel brightness values of the image to be processed and the brightness weighted histogram are used to perform pixel-level brightness adjustment on the image to be processed to obtain a brightness-adjusted image;
[0043] The brightness-adjusted image is then subjected to pixel-level color adjustments to obtain an image with enhanced readability.
[0044] A third aspect of this application provides a chip including one or more memories configured to store data associated with an image; and one or more processing units electrically coupled to the one or more memories and configured to perform the method according to any one of the first aspects.
[0045] A fourth aspect of this application provides an electronic device including the chip described in the fourth aspect.
[0046] The fifth aspect of this application provides a computer program product comprising computer program code that, when executed on a computer, causes the computer to perform the method as described in any one of the first aspects.
[0047] The sixth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any one of the first aspects.
[0048] As described above, this application provides a method, apparatus, chip, device, medium, and program product for enhancing the readability of images under ambient light, which has the following beneficial effects: This application extracts the pixel brightness and brightness-weighted histogram of the image to obtain image gain, and then applies different influence factors to different brightness ranges of the image, realizing pixel-level brightness and color adjustment based on influence factors and image gain, greatly improving image readability. This application reduces hardware resources and can be applied to lightweight devices, suitable for various application scenarios such as outdoor use of wearable devices. Attached Figure Description
[0049] Figure 1 The diagram shown is a flowchart illustrating a method for enhancing the readability of images under ambient light according to an embodiment of this application.
[0050] Figure 2 The diagram shown is a flowchart illustrating the process of obtaining a mapping enhancement curve in one embodiment of this application.
[0051] Figure 3 The diagram shown is a schematic representation of a first preset enhancement curve and a second preset enhancement curve in one embodiment of this application.
[0052] Figure 4 The diagram shown is a flowchart illustrating the process of obtaining a brightness adjustment image in one embodiment of this application.
[0053] Figure 5 The diagram shows a flowchart of pixel-level brightness adjustment based on the influence factor and image gain corresponding to the brightness range to which the pixel brightness value belongs, according to one embodiment of this application.
[0054] Figure 6 The diagram shown is a structural schematic of an image readability enhancement device under ambient light according to an embodiment of this application.
[0055] Figure 7 The diagram shown is a schematic representation of a readability enhancement device for images under ambient light according to an embodiment of this application.
[0056] Figure 8 The diagram shown is a schematic representation of the chip structure in one embodiment of this application. Detailed Implementation
[0057] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.
[0058] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. Therefore, the drawings only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0059] Furthermore, the use of terms such as "first" and "second" in this application is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. If the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed in this application.
[0060] Before providing a further detailed description of this application, the nouns and terms used in the embodiments of this application are explained, and the nouns and terms used in the embodiments of this application shall be interpreted as follows:
[0061] Filter: An image filter is a key image processing tool used to enhance or suppress certain features (such as noise, edges, textures, etc.) in an image through specific mathematical algorithms.
[0062] buffer: Image buffer, in display technology it generally refers to a unit of one or more lines.
[0063] IPC: Inter-Process Communication, used for the secure and efficient transfer and sharing of data between different processes (running programs).
[0064] CPU: Central Processing Unit, is the core component of a computer, responsible for executing program instructions and processing data, and is known as the "brain" of the computer.
[0065] MCU: Microcontroller Unit, a microcomputer chip that integrates a CPU, memory and input / output interfaces. It is designed to be embedded in various electronic devices to realize control functions and is the "brain" of smart hardware.
[0066] Luma Mux: Luminance signal multiplexing, which combines multiple data into a single data stream or transmission channel through time division multiplexing and other methods.
[0067] Hist weight mux: Weighted histogram signal multiplexing, which combines multiple data into a single data stream or transmission channel through time division multiplexing and other methods.
[0068] 1 pixel per cycle: In digital circuits or signal processing, this means processing one pixel of data per clock cycle.
[0069] For enhancing image readability under ambient light, existing technologies involve directly driving the screen backlight brightness to improve readability in bright environments. However, in some bright light conditions, even with the screen driven to maximum brightness, the display effect is still strongly affected by the ambient light. To overcome this problem, most solutions use filters to acquire and process image features. However, filters consume line buffers to cache large amounts of data on high frame rate display devices. This results in significant hardware resource consumption for filters, which translates to increased chip area and cost on limited chip wafers. Furthermore, due to the large amount of data acquisition and processing required, filters are unsuitable for low- to mid-range mobile devices, IPCs, smartwatches, and other applications with weak CPU / MCU capabilities.
[0070] To at least address the aforementioned technical problems, this application provides a method, apparatus, chip, device, medium, and program product for enhancing the readability of images under ambient light. This method effectively enhances the readability of images under ambient light, reduces hardware resource consumption, and effectively lowers computational resources. It is suitable for various application scenarios in lightweight devices.
[0071] Figure 1 The diagram shows a flowchart illustrating the method for enhancing the readability of images under ambient light provided in an embodiment of this application. Figure 1 As shown in the embodiments of this application, the method for enhancing the readability of images under ambient light includes steps S1 to S5.
[0072] S1. Obtain the image to be processed.
[0073] In some embodiments, the image to be processed may be a single still image displayed on a portable display device, or each image frame to be processed in video data.
[0074] S2. Obtain the pixel brightness and brightness-weighted histogram of the image to be processed.
[0075] In some embodiments, the pixel luminance value of each pixel in the image to be processed is obtained; the pixel luminance values of each pixel are summed to obtain the pixel luminance sum of the image to be processed. For example, when a single static image is displayed on a portable display device, the pixel luminance values are merged into a single data stream using time-division multiplexing or similar methods via Luma Mux, the pixel luminance values are obtained at a throughput of 1 pixel per cycle, and a summation operation is performed to obtain the pixel luminance sum of the corresponding image to be processed. As another example, when a video stream needs to be played on a portable display device, each image frame is allocated a fixed time slice. In the first time slice, the first frame image is used as the image to be processed, the pixel luminance values are merged into a single data stream using time-division multiplexing or similar methods via Luma Mux, the pixel luminance values are obtained at a throughput of 1 pixel per cycle, and then a weighted summation is performed to obtain the pixel luminance sum of the current frame image. Similarly, in each time slice, the current frame image is used as the image to be processed to perform the above process, thereby obtaining the pixel luminance sum of all image frames in the video stream.
[0076] In some embodiments, obtaining a brightness-weighted histogram of the image to be processed includes: obtaining the pixel brightness value of each pixel in the image to be processed; assigning weights to the next adjacent pixel based on the pixel brightness value of the previous pixel, and performing weighted calculations based on the weights of each pixel to obtain a brightness-weighted histogram; wherein, when the pixel brightness value of the previous pixel is in a high-weight brightness region, a high weight is assigned to the next adjacent pixel; when the pixel brightness value of the previous pixel is in a low-weight brightness region, a low weight is assigned to the next adjacent pixel.
[0077] For example, when displaying a single static image on a portable display device, pixel brightness values are merged into a single data stream using time-division multiplexing via hist weightmux. Pixel brightness values are acquired at a throughput of 1 pixel per cycle, and weights are assigned to subsequent pixels based on the brightness value of the preceding pixel. This weighted calculation yields a brightness weighted histogram. In some embodiments, the image is divided into 256 brightness levels, ranging from the darkest (0) to the brightest (255). When a pixel is in a mid-tone brightness (e.g., brightness levels 64-191), it is considered to be in a high-weight brightness region, and more weight is assigned to the next adjacent pixel. When a pixel is in a dark region (e.g., brightness levels 0-63) or a bright region (e.g., brightness levels 192-255), it is considered to be in a low-weight brightness region, and less weight is assigned to the next adjacent pixel. This allows for rapid weighting of all pixels and weighted calculation to obtain a brightness weighted histogram through stream processing. For example, when a video stream needs to be played on a portable display device, each image frame is allocated a fixed time slice. In the first time slice, the first frame is used as the image to be processed, and the above process is performed on each pixel to obtain the luminance-weighted histogram of the current frame. Similarly, in each time slice, the current frame is used as the image to be processed to perform the above process, thereby obtaining the luminance-weighted histogram of all image frames in the video stream.
[0078] The division of high-weight brightness regions and low-weight brightness regions can be set according to actual applications, and this application does not impose any restrictions on this.
[0079] S3. Input the pixel brightness to the calculation unit to obtain the image gain.
[0080] In some embodiments, the computing unit obtains a mapped enhancement curve based on pixel brightness and a preset enhancement curve; and obtains image gain based on the mapped enhancement curve. The preset enhancement curve includes a first preset enhancement curve and a second preset enhancement curve. Figure 2 The diagram shown is a schematic representation of the process for obtaining mapping enhancement curves provided in an embodiment of this application. Figure 2 As shown, obtaining the mapping enhancement curve includes steps S31 to S33.
[0081] S31. The calculation unit obtains the average brightness of the image to be processed based on the pixel brightness and the height and width of the image to be processed.
[0082] S32. Obtain the weights of the enhancement curve based on average brightness and ambient light intensity.
[0083] S33. The first preset enhancement curve and the second preset enhancement curve are fused based on the enhancement curve weight to obtain the mapping enhancement curve.
[0084] In some embodiments, the calculation unit calculates the average brightness of the image based on the pixel brightness and the width and height of the image to be processed. Specifically, as shown in formula (1).
[0085]
[0086] Where, luma_avg is the average brightness of the image to be processed; luma_sum is the sum of pixel brightness, that is, the sum of the pixel brightness values of each pixel in the image to be processed; h is the height of the image to be processed; and w is the width of the image to be processed.
[0087] In some embodiments, the enhancement curve weights are obtained by the computing unit based on the average brightness and ambient light intensity, as shown in formulas (2) and (3).
[0088] w_luma=f(luma_avg) (2)
[0089] wei=w_env*w_luma (3)
[0090] In formula (2), w_luma is a direct proportional function, and w_luma is the brightness weight. The larger the luma_avg, the larger w_luma. w_env is the intensity of ambient light, which can be obtained from an ambient light intensity sensor. The range of both w_luma and w_env is 0-1. Then, the enhancement curve weight wei can be obtained according to formula (3).
[0091] In some embodiments, the computing unit fuses the first preset enhancement curve and the second preset enhancement curve based on the enhancement curve weights to obtain a mapped enhancement curve. This is specifically shown in formula (4).
[0092] mapping_curve(x)=wei*curve_2(x)+(1-wei)*curve_1(x) (4)
[0093] Where curve_1(x) is the first preset enhancement curve, curve_2(x) is the second preset enhancement curve, and x represents the brightness level of the image to be processed. For example, the brightness level range of an 8-bit image to be processed is 0-255. Figure 3 The diagram shows the first preset enhancement curve and the second preset enhancement curve. (See diagram.) Figure 3 As shown, curve_2(x) is the y=x curve. When the enhancement curve weight wei is larger, the fused curve tends more towards curve_2(x), and the readability enhancement is stronger; conversely, when wei is smaller, the fused curve tends more towards curve_1(x), and the readability enhancement is weaker.
[0094] It should be noted that the preset enhancement curve should not be located below the y=x curve. Furthermore, in some embodiments, the slope of the preset enhancement curve increases as the brightness level decreases. Those skilled in the art can use other preset enhancement curves that satisfy the above conditions to calculate and obtain the mapped enhancement curve.
[0095] Furthermore, after the computing unit obtains the mapping enhancement curve mapping_curve(x), it obtains the image gain based on the mapping enhancement curve, as shown in formula (5).
[0096]
[0097] In practice, the principles of image readability enhancement under ambient light include: the darker the image, the less likely it is to be clearly seen in strong light, and the greater the intensity of readability enhancement; the stronger the ambient light, the more likely the image is to be unclear, and therefore the greater the intensity of readability enhancement. Thus, when the ambient light is stronger, the intensity w_env is greater, resulting in a larger weight for the calculated enhancement curve. Consequently, the computational unit will calculate a stronger image gain to enhance the image's readability.
[0098] S4. Based on image gain, the pixel brightness values and brightness weighted histogram of the image to be processed are used to perform pixel-level brightness adjustment on the image to be processed, so as to obtain a brightness-adjusted image.
[0099] In some embodiments, this application performs brightness adjustment on each pixel in the image to be processed based on image gain, i.e., pixel-level brightness adjustment. Figure 4 The diagram shown is a schematic representation of the process for acquiring a brightness-adjusted image according to an embodiment of this application. Figure 4 As shown, obtaining the brightness adjustment image includes steps S41 to S42.
[0100] S41. Determine the brightness range to which the pixel brightness value of each pixel in the image to be processed belongs based on the brightness weighted histogram.
[0101] In some embodiments, after obtaining the brightness weighted histogram, it can be used to further segment brightness ranges with different levels of importance and determine them as different brightness intervals, thereby determining the brightness interval to which the pixel brightness value of each pixel belongs.
[0102] S42. Perform pixel-level brightness adjustment based on the influence factor and image gain corresponding to the brightness range to which the pixel brightness value belongs, and obtain the brightness adjustment image.
[0103] In some embodiments, the further segmented brightness range can be defined as a bright area range and a dark area range, and those skilled in the art can customize different influence factors corresponding to different brightness ranges; this application does not impose any restrictions in this regard. For example, an average brightness enhancement influence factor can be used for the dark area range to achieve a higher intensity of brightness enhancement, while an average brightness reduction influence factor can be used for the bright area range to prevent excessive brightness from causing large-area exposure and loss of a large amount of detail. By selecting the influence factor corresponding to the brightness range to which a pixel belongs, pixel-level brightness adjustment can be achieved more accurately. Figure 5 This is a schematic diagram illustrating the process of adjusting pixel-level brightness based on the influence factor and image gain corresponding to the brightness range to which the pixel brightness value belongs, as provided in an embodiment of this application. Figure 5 As shown, pixel-level brightness adjustment based on the influence factor and image gain corresponding to the brightness range to which the pixel brightness value belongs includes steps S421 to S425.
[0104] S421. Divide the image to be processed into multiple grids; the vertices of each grid are key pixels.
[0105] In some embodiments, the image to be processed is divided into multiple grids, such as multiple 16x16 grid blocks, with each grid vertex serving as a key pixel.
[0106] S422. Obtain the brightness range to which the pixel brightness value of the key pixel belongs, and generate the target gain of the key pixel based on the corresponding influence factor.
[0107] In some embodiments, the brightness range to which the pixel brightness value of a key pixel belongs is determined to obtain the corresponding influence factor. The target gain of the key pixel is then determined based on the corresponding influence factor and the image gain. That is, the brightness of the key pixel is processed by combining the influence factor with the image gain to generate a target gain for the key pixel. For example, when the key pixel is in a dark area, the influence factor is an average brightness enhancement influence factor; therefore, a larger average brightness gain is generated based on the image gain as the target gain for that key pixel.
[0108] S423. Obtain the target gain of the four nearest key pixels for each pixel of the image to be processed.
[0109] In some embodiments, for each pixel in the image to be processed, the four nearest key pixels are found, and the target gain values of these four key pixels are obtained.
[0110] S424. Based on the distance of each pixel to the four nearest key pixels, perform gain interpolation to obtain the pixel brightness gain of each pixel.
[0111] In some embodiments, bilinear interpolation is performed based on the distances of each pixel to its four nearest key pixels to calculate the gain value that the pixel should ultimately use for a smooth transition. For example, if the pixel brightness gain of a pixel is G, and the target gain values of the four nearest key pixels to that pixel are G1, G2, G3, and G4, then:
[0112] G=(1-u)(1-v)*G1+u(1-v)*G2+(1-u)v*G3+u*v*G4
[0113] Where u and v are the normalized horizontal distance and normalized vertical distance of the pixel relative to its four nearest key pixels, respectively.
[0114] S425. Adjust the pixel brightness value of the corresponding pixel based on the pixel brightness gain of each pixel to obtain a brightness adjustment image.
[0115] In some embodiments, the final brightness-adjusted image can be obtained by multiplying the pixel brightness value of each pixel by the corresponding pixel brightness gain.
[0116] S5. Perform pixel-level color adjustments on the brightness-adjusted image to obtain an image with enhanced readability.
[0117] In some embodiments, after pixel-level brightness adjustment of the image to be processed is completed, pixel-level color adjustment is performed based on an influence factor. Pixel-level color adjustment of the brightness-adjusted image includes: determining a pixel color gain based on the influence factor and image gain corresponding to the brightness range to which the pixel brightness value of each pixel belongs; and adjusting the pixel color value of the corresponding pixel based on the pixel color gain of each pixel to obtain a readability-enhanced image.
[0118] Specifically, influence factors for the red, green, and blue color channels are specified for each brightness range; influence factors for different color channels are obtained based on the brightness range to which each pixel belongs, and pixel color gain for the corresponding color channel is determined based on image gain and influence factors.
[0119] In some embodiments, the color channels of the brightness-adjusted image include red, green, and blue color channels. Influence factors for these three color channels are assigned to each brightness range. For example, when in a dark range, the blue color channel is assigned an enhancement influence factor, while when in a bright range, the green color channel is assigned an enhancement influence factor. The influence factors for different channels are then obtained based on the brightness range to which each pixel's brightness value belongs. Next, the pixel color gain for the corresponding color channel is determined based on the influence factors and image gain. For example, when a pixel's brightness value is in a dark range, an enhancement influence factor is applied to the blue color channel based on the image gain. This process adjusts the pixel color value of each pixel according to its pixel color gain, thereby obtaining the final readable enhanced image. After pixel-level brightness and pixel-level color adjustments, the image can be clearly displayed under ambient light.
[0120] It should be noted that the scope of protection of the method for enhancing the readability of images under ambient light provided in this application is not limited to the order of steps listed in this embodiment. Any solution implemented by adding, subtracting, or replacing steps in the prior art based on the principles of this application is included within the scope of protection of this application.
[0121] Figure 6 The diagram shown is a structural schematic of an embodiment of the ambient light image readability enhancement device of this application. Figure 6 As shown, the readability enhancement device for ambient light images of this application includes a readability enhancement unit 1.
[0122] The readability enhancement unit 1 is configured to acquire an image to be processed, and to acquire the pixel brightness and pixel brightness histogram of the image to be processed. The readability enhancement unit 1 is configured to input the pixel brightness and pixel brightness into a calculation unit to acquire an image gain. The readability enhancement unit 1 is configured to perform pixel-level brightness adjustment on the image to be processed based on the image gain, the pixel brightness values of the image to be processed, and the pixel brightness histogram, to acquire a brightness-adjusted image. Furthermore, the readability enhancement unit 1 is configured to perform pixel-level color adjustment on the brightness-adjusted image to acquire a readability-enhanced image.
[0123] In some embodiments, please continue reading Figure 6 The readability enhancement device for images under ambient light may further include a computing unit 2. The computing unit 2 is electrically coupled to the readability enhancement unit 1 and is configured to acquire a mapping enhancement curve based on pixel brightness and a preset enhancement curve. The computing unit 2 is also configured to acquire image gain based on the mapping enhancement curve. The preset enhancement curve includes a first preset enhancement curve and a second preset enhancement curve.
[0124] It should be noted that the principles of the readability enhancement unit 1 and the calculation unit 2 provided in this application embodiment correspond one-to-one with the steps in the above method, so they will not be repeated here.
[0125] In some embodiments, the readability enhancement unit 1 can be implemented in hardware and interact with the computing unit 2 via a hardware protocol interface. For example... Figure 7 As shown, the readability enhancement unit 1 acquires the image to be processed and obtains pixel brightness and pixel brightness histogram based on the image. Then, the readability enhancement unit 1 submits the pixel brightness and brightness-weighted histogram to the calculation unit 2 via a hardware protocol interface. The calculation unit 2 uses the data submitted by the readability enhancement unit 1 and a preset enhancement curve to generate a mapping enhancement curve, and configures the mapping enhancement curve as an image gain for the readability enhancement unit 1. This allows the readability enhancement unit 1 to perform readability enhancement processing on the image to be processed, ultimately outputting a readability-enhanced image. According to the embodiments of this application, the readability of images under ambient light is effectively enhanced through hardware and software collaboration, making it particularly suitable for lightweight, portable display devices such as wearable devices. Furthermore, the readability enhancement unit 1 only calculates the image brightness and brightness histogram, requiring minimal data acquisition and computation, making it applicable in scenarios with weak CPUs / MCUs.
[0126] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, or methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules / units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or units 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 of apparatuses or modules or units may be electrical, mechanical, or other forms.
[0127] The modules / units described as separate components may or may not be physically separate. The components shown as modules / units may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules / units can be selected to achieve the objectives of the embodiments of this application, depending on actual needs. For example, the functional modules / units in the various embodiments of this application may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit. Those skilled in the art should further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0128] Figure 8 The diagram shown is a structural schematic of the chip described in one embodiment of this application. Figure 8 As shown, the chip 90 of this application includes one or more memories 901 and one or more processors 902. The memory 901 is configured to store data associated with an image; the processing unit 902 is electrically coupled to the memory 901 and configured to perform the methods described above. In some embodiments, the memory 901 includes various media capable of storing data, such as RAM, memory cards, or optical discs. The processing unit 902 may be a graphics processing unit (GPU), a neural processing unit (NPU), a display processing unit (DPU), a video processing unit (VPU), a digital signal processor (DSP), an image signal processor (ISP), etc.; it may also be an application-specific integrated circuit (ASIC) or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0129] This application also provides an electronic device, including the chip described above.
[0130] This application also provides a computer-readable storage medium. Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing a processor. The program can be stored in a computer-readable storage medium, which is a non-transitory medium, such as random access memory, read-only memory, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof. The storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state drive (SSD)).
[0131] This application embodiment may also provide a computer program product comprising one or more computer instructions. When the computer instructions are loaded and executed on a computing device, all or part of the processes or functions described in this application embodiment are generated. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0132] When the computer program product is executed by a computer, the computer performs the method described in the foregoing method embodiments. The computer program product can be a software installation package; when the foregoing method is required, the computer program product can be downloaded and executed on the computer.
[0133] The descriptions of the processes or structures corresponding to the above figures each have their own emphasis. For parts of a process or structure that are not described in detail, please refer to the relevant descriptions of other processes or structures.
[0134] In summary, the methods, apparatus, chips, devices, media, and program products for enhancing image readability under ambient light provided in this application can apply different influence factors to different brightness ranges of an image, achieving pixel-level brightness and color adjustments based on influence factors and image gain, thus greatly improving image readability. This application reduces hardware resources and can be applied to lightweight devices, making it suitable for various application scenarios such as outdoor use of wearable devices.
[0135] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0136] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.
Claims
1. A method of enhancing the legibility of an image in ambient light, characterized in that, The method comprises: acquiring a to-be-processed image; acquiring a pixel brightness sum and a brightness-weighted histogram of the to-be-processed image; inputting the pixel brightness sum into a calculation unit for acquiring an image gain; based on the image gain, the pixel brightness value of the to-be-processed image and the brightness-weighted histogram, performing pixel-level brightness adjustment on the to-be-processed image to acquire a brightness-adjusted image; performing pixel-level color adjustment on the brightness-adjusted image to acquire a readability-enhanced image.
2. The method of enhancing readability of an image in ambient light according to claim 1, wherein, The method further comprises: acquiring, by the calculation unit, a mapping enhancement curve based on the pixel brightness sum and a preset enhancement curve; the preset enhancement curve comprises a first preset enhancement curve and a second preset enhancement curve; and acquiring an image gain based on the mapping enhancement curve.
3. The method of enhancing readability of an image in ambient light according to claim 2, wherein, Acquiring, by the calculation unit, a mapping enhancement curve based on the pixel brightness sum and a preset enhancement curve comprises: acquiring, by the calculation unit, an average brightness of the to-be-processed image based on the pixel brightness sum and the height and width of the to-be-processed image; acquiring an enhancement curve weight based on the average brightness and an ambient light intensity; and fusing the first preset enhancement curve and the second preset enhancement curve based on the enhancement curve weight to acquire the mapping enhancement curve.
4. The method of enhancing readability of an image in ambient light according to claim 1, wherein, Acquiring a pixel brightness sum of a to-be-processed image comprises: acquiring a pixel brightness value of each pixel in the to-be-processed image; summing the pixel brightness value of each pixel to acquire the pixel brightness sum of the to-be-processed image.
5. The method of enhancing readability of an image in ambient light according to claim 1, wherein, Acquiring a brightness-weighted histogram of a to-be-processed image comprises: acquiring a pixel brightness value of each pixel in the to-be-processed image; assigning a weight to a next adjacent pixel according to the pixel brightness value of a previous pixel to perform weighted calculation according to the weight of each pixel to acquire the brightness-weighted histogram; wherein when the pixel brightness value of the previous pixel is in a high-weighted brightness region, a high weight is assigned to the next adjacent pixel; and when the pixel brightness value of the previous pixel is in a low-weighted brightness region, a low weight is assigned to the next adjacent pixel.
6. The method of enhancing readability of an image in ambient light according to claim 1, wherein, Acquiring a brightness-adjusted image comprises: determining a brightness interval to which a pixel brightness value of each pixel in a to-be-processed image belongs based on a pixel brightness-weighted histogram; performing pixel-level brightness adjustment based on an influence factor corresponding to the brightness interval to which the pixel brightness value belongs and the image gain to acquire the brightness-adjusted image.
7. The method of enhancing readability of an image in ambient light according to claim 6, wherein, Performing pixel-level brightness adjustment based on an influence factor corresponding to the brightness interval to which the pixel brightness value belongs and the image gain comprises: dividing the to-be-processed image into a plurality of grids; each vertex of the grid is a key pixel point; acquiring a brightness interval to which a pixel brightness value of the key pixel point belongs to generate a target gain of the key pixel point based on a corresponding influence factor; acquiring a target gain of the nearest four key pixel points for each pixel point of the to-be-processed image; based on the distance of each pixel point relative to the nearest four key pixel points, performing gain interpolation to correspondingly acquire a pixel brightness gain of each pixel point; adjusting the pixel brightness value of the corresponding pixel point based on the pixel brightness gain of each pixel point to acquire the brightness-adjusted image.
8. The method of enhancing readability of an image in ambient light according to claim 6, wherein, performing color adjustment on the luminance adjusted image to obtain a readability enhanced image, comprising: determining a pixel color gain of each color channel based on the image gain and the influence factor corresponding to the luminance interval to which each pixel belongs; adjusting the pixel color value of each pixel based on the pixel color gain of each pixel to obtain the readability enhanced image.
9. The method of enhancing readability of an image in ambient light according to claim 8, wherein, The method further comprises: specifying an influence factor corresponding to a red color channel, a green color channel and a blue color channel for each luminance interval; obtaining the influence factor corresponding to different color channels based on the luminance interval to which each pixel belongs, to determine the pixel color gain of the corresponding color channel based on the image gain and the influence factor.
10. An apparatus for enhancing the readability of an image in ambient light, characterized by comprising: a readability enhancement unit configured to: obtain a to-be-processed image; obtain a pixel luminance and a luminance weighted histogram of the to-be-processed image; input the pixel luminance into a calculation unit for obtaining an image gain; perform pixel-level luminance adjustment on the to-be-processed image based on the image gain, the pixel luminance value of the to-be-processed image and the luminance weighted histogram to obtain a luminance adjusted image; perform pixel-level color adjustment on the luminance adjusted image to obtain a readability enhanced image.
11. A chip, characterized by comprising: one or more memories configured to store data associated with an image; and one or more processing units electrically coupled to the one or more memories and configured to perform the method according to any one of claims 1 to 9.
12. An electronic device, comprising: The chip as claimed in claim 11.
13. A computer program product, characterised in that, The computer program product comprises computer program code which, when run on a computer, causes the computer to implement the method according to any one of claims 1 to 9.
14. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by a processor to implement the method according to any one of claims 1 to 9. The computer program is executed by a processor to implement the method according to any one of claims 1 to 9.