Image processing method, electronic device, and computer-readable medium
By adjusting the brightness mapping value of the image, the problem of poor display effects on the display screen in a strong light environment is solved, the user experience and image detail display effect are improved, and the oversaturation phenomenon in high-brightness areas is suppressed.
Patent Information
- Application Number
- PCT/CN2024/077889
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-31
- Filing Date
- 2024-02-21
- Publication Date
- 2024-10-03
AI Technical Summary
In an outdoor strong light environment, the display effect of the display screen is affected by the brightness of the ambient light, resulting in a reduction in the user's perception and use experience. The existing technology is limited in improving the brightness of the display screen, and it is difficult to effectively improve the user experience.
By obtaining the brightness adjustment reference information of the area to be processed in the current frame image, the brightness mapping value of each pixel is adjusted, gradually increasing the brightness of pixels with relatively low brightness, and suppressing oversaturation and overexposure in high-brightness areas, thereby optimizing image processing. result.
It effectively improves the display effect in strong light environments and improves the user's look and feel, especially for detail display in lower brightness areas, and reduces oversaturation and overexposure in high-brightness areas.
Smart Images

Figure CN2024077889_03102024_PF_FP_ABST
Abstract
Description
Image processing method, electronic device, and computer-readable medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to patent application No. 202310361838.2 filed with the China Patent Office on March 31, 2023, the entire contents of which are incorporated herein by reference. Technical Field
[0003] The present disclosure relates to, but is not limited to, the field of image processing technology. Background Art
[0004] With the development of technology, display screens are being applied to more and more scenes in daily life, bringing great convenience to people's lives. However, in scenes with strong outdoor lighting, excessive ambient light brightness can have an adverse effect on the display quality of the display screen, reducing the user's viewing experience and usage experience.
[0005] Display effects are typically optimized by increasing the overall brightness of the display screen. However, due to hardware limitations such as production processes, manufacturing materials, device power consumption, and service life, the improvement in display screen brightness is limited. Increasing the overall brightness of the display screen also has a relatively limited effect on improving the user's viewing experience in bright light environments.
[0006] Summary of the Invention
[0007] Embodiments of the present disclosure provide an image processing method, an electronic device, and a computer-readable medium.
[0008] In a first aspect, an embodiment of the present disclosure provides an image processing method, comprising: obtaining brightness adjustment reference information of a to-be-processed area in a current frame image, the brightness adjustment reference information representing the brightness state of the to-be-processed area; adjusting the brightness of each first pixel in the to-be-processed area according to the brightness adjustment reference information to obtain a brightness mapping value of each first pixel; adjusting the pixel value of each first pixel according to the brightness mapping value of each first pixel to obtain a target image corresponding to the current frame image.
[0009] In a second aspect, an embodiment of the present disclosure provides an electronic device, comprising: one or more processors; a memory on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method described in the first aspect of the embodiment of the present disclosure.
[0010] In a third aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the image processing method described in the first aspect of the embodiment of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] FIG1 is a flow chart of an image processing method according to an embodiment of the present disclosure;
[0012] FIG2 is a flowchart of some steps in another image processing method according to an embodiment of the present disclosure;
[0013] FIG3 is a flowchart of some steps in another image processing method according to an embodiment of the present disclosure;
[0014] FIG4 is a flowchart of some steps in another image processing method according to an embodiment of the present disclosure;
[0015] FIG5 is a flowchart of some steps in another image processing method according to an embodiment of the present disclosure;
[0016] FIG6 is a schematic diagram of the composition of an electronic device according to an embodiment of the present disclosure;
[0017] FIG7 is a brightness mapping curve corresponding to different brightness adjustment reference information in an embodiment of the present disclosure;
[0018] FIG8 is a schematic diagram showing the effect of suppressing overexposure of an image in an embodiment of the present disclosure;
[0019] FIG9 is a schematic diagram showing a comparison of image processing effects in an embodiment of the present disclosure;
[0020] FIG10 is a schematic diagram of the image processing process in one embodiment;
[0021] FIG11 is a schematic diagram showing a comparison of image processing effects corresponding to different adjustment coefficients in an embodiment. DETAILED DESCRIPTION
[0022] To enable those skilled in the art to better understand the technical solutions of the present disclosure, the image processing method, electronic device, and computer-readable medium provided by the present disclosure are described in detail below with reference to the accompanying drawings.
[0023] Example embodiments will be described more fully hereinafter with reference to the accompanying drawings, but the example embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the scope of this disclosure to those skilled in the art.
[0024] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.
[0025] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0026] The terms used herein are used only to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a," "an," and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprising" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements, and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or groups thereof is not excluded.
[0027] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless expressly defined as such herein.
[0028] In a first aspect, referring to FIG. 1 , an embodiment of the present disclosure provides an image processing method, which may include steps S1 to S3 .
[0029] In step S1 , brightness adjustment reference information of a to-be-processed area in a current frame image is obtained, where the brightness adjustment reference information represents a brightness state of the to-be-processed area.
[0030] In step S2, the brightness of each first pixel in the area to be processed is adjusted according to the brightness adjustment reference information to obtain a brightness mapping value of each first pixel.
[0031] In step S3, the pixel value of each first pixel is adjusted according to the brightness mapping value of each first pixel to obtain a target image corresponding to the current frame image.
[0032] In the embodiment of the present disclosure, the current frame image may be a frame in a video or a picture, and the embodiment of the present disclosure does not impose any special limitation on this.
[0033] In the embodiments of the present disclosure, the entire current frame image can be processed, and the entire current frame image is the area to be processed; a specific area in the current frame image can also be processed, and the specific area is the area to be processed; the current frame image can also be divided into multiple areas, and each area is processed separately, and each area is a area to be processed. The embodiments of the present disclosure do not specifically limit this.
[0034] In the disclosed embodiment, the brightness adjustment reference information is information that characterizes the overall brightness state of the area to be processed, for example, information obtained by calculating the average brightness value or weighted average brightness value of each pixel in the area to be processed, or information obtained by calculating the weighted average brightness value of each pixel in the area to be processed and optimizing the area boundary using an interpolation algorithm. In the disclosed embodiment, the brightness adjustment reference information can be obtained by analyzing the overall brightness state of the area to be processed; usually, the information of two consecutive frames in a video is similar, and the brightness adjustment reference information can also be obtained by analyzing the overall brightness state of the area corresponding to the area to be processed in the frame before the current frame. The disclosed embodiment does not specifically limit this.
[0035] It should be noted that, in the embodiment of the present disclosure, “first pixel” and “second pixel” are only used to distinguish pixels in the current frame image from pixels in the previous frame image, and are not used to specifically refer to a certain pixel.
[0036] In the embodiment of the present disclosure, the brightness of the pixels in the area to be processed is adjusted one by one in step S2, and the pixel values of the pixels in the area to be processed are adjusted one by one in step S3. When the brightness of the pixels in the area to be processed is adjusted one by one, the brightness of the pixels with relatively low brightness is increased, thereby overcoming the defect that the display effect of the pixels with relatively low brightness is worse than that of the pixels with relatively high brightness under strong light, improving the display effect of the details of the parts with relatively low brightness, and thus improving the display effect of the display screen in a strong light environment, improving the user's perception and usage experience.
[0037] In some embodiments, when the brightness of pixels in the processed area is adjusted one by one, the brightness increase of pixels with relatively lower brightness is greater than the brightness increase of pixels with relatively higher brightness, that is, the ratio of the increase in the brightness mapping value of the first pixel relative to the original brightness value of the first pixel is negatively correlated with the original brightness value of the first pixel.
[0038] In the embodiment of the present disclosure, the brightness increase amplitude of pixels with relatively low brightness is greater than the brightness increase amplitude of pixels with relatively high brightness, which can improve the display effect of the relatively low brightness part while suppressing oversaturation and overexposure of the relatively high brightness part.
[0039] The embodiment of the present disclosure does not specifically limit how to adjust the brightness of each first pixel in the area to be processed according to the brightness adjustment reference information.
[0040] In some embodiments, adjusting the brightness of pixels in the area to be processed one by one is divided into two stages: in the first stage, adaptively enhancing the brightness of the pixels in the area to be processed to improve the brightness of the pixels in the area to be processed; in the second stage, suppressing oversaturation and overexposure.
[0041] Accordingly, in some embodiments, referring to FIG. 2 , the brightness of each first pixel in the area to be processed is adjusted according to the brightness adjustment reference information to obtain a brightness mapping value of each first pixel, including steps S21 and S22 .
[0042] In step S21 , the brightness of the first pixel is adjusted according to the brightness adjustment reference information, the original brightness value of the first pixel, and the brightness extreme value to obtain a brightness mapping intermediate value.
[0043] In step S22, the brightness mapping intermediate value is reduced based on a linear relationship to obtain the brightness mapping value, wherein the ratio of the brightness mapping value to be reduced relative to the brightness mapping intermediate value is positively correlated with the original brightness value of the first pixel.
[0044] In the embodiment of the present disclosure, the intermediate value of the brightness mapping is the brightness value obtained after adaptively adjusting the brightness of the pixels in the processed area; the brightness mapping value is the brightness value obtained after suppressing the oversaturation and overexposure phenomena generated after the adaptive adjustment.
[0045] In the embodiment of the present disclosure, the ratio of the brightness mapping value to the brightness mapping middle value is positively correlated with the original brightness value of the first pixel, that is, the larger the original brightness value of the first pixel, the greater the reduction in the brightness mapping value relative to the brightness mapping middle value; the smaller the original brightness value of the first pixel, the smaller the reduction in the brightness mapping value relative to the brightness mapping middle value, thereby suppressing oversaturation and overexposure phenomena, and at the same time improving the display effect under strong light by increasing the brightness of pixels with smaller original brightness values.
[0046] The embodiments of the present disclosure do not specifically limit how to adjust the brightness of the first pixel based on the brightness adjustment reference information, the original brightness value of the first pixel, or the brightness extreme value. For example, the brightness of the first pixel can be adjusted using logarithmic adjustment, exponential adjustment, or gamma adjustment.
[0047] Accordingly, in some embodiments, the brightness of the first pixel is adjusted according to the brightness adjustment reference information, the original brightness value of the first pixel, and the brightness extreme value to obtain an intermediate value of the brightness mapping, including: determining the intermediate value of the brightness mapping based on a logarithmic relationship according to the brightness adjustment reference information, the original brightness value of the first pixel, and the brightness extreme value; or determining the intermediate value of the brightness mapping based on Gamma adjustment according to the brightness adjustment reference information, the original brightness value of the first pixel, and the brightness extreme value.
[0048] In some embodiments, the brightness of the first pixel is adjusted using logarithmic adjustment, and the brightness adjustment reference information is the average brightness value or weighted average brightness value of the first pixel in the area to be processed. The brightness mapping value is obtained by formula (1) and formula (2): Y dst =Y dst_1 -(Y dst_1 -Y src / Y m )*(Y src / Y m ) (2)
[0049] Among them, Y dst_1 Maps the middle value of brightness, Y dst is the brightness mapping value, Y src is the original brightness value of the first pixel, Y m is the brightness extreme value, Y f Adjust the reference information for brightness.
[0050] In the embodiment of the present disclosure, Y f The larger the Y is, the higher the original brightness of the entire area to be processed is, and the smaller the adjustment range of the brightness of the first pixel in the area to be processed is; f The smaller it is, that is, the lower the original brightness of the entire area to be processed is, the greater the adjustment range of the brightness of the first pixel in the area to be processed is.
[0051] In some embodiments, when the brightness of the first pixel is adjusted using logarithmic adjustment, piecewise linear fitting is used to approximate the logarithmic function, which can reduce computational complexity and facilitate hardware implementation.
[0052] Accordingly, in some embodiments, the brightness mapping intermediate value is determined based on a logarithmic relationship according to the brightness adjustment reference information, the original brightness value of the first pixel, and the brightness extreme value, including: performing piecewise linear fitting on the logarithmic relationship to obtain a linear fitting relationship; and determining the brightness mapping intermediate value based on the linear fitting relationship according to the brightness adjustment reference information, the original brightness value of the first pixel, and the brightness extreme value.
[0053] In the embodiment of the present disclosure, performing piecewise linear fitting on the logarithmic relationship refers to dividing the logarithmic relationship into multiple segmented intervals. In a segmented interval, a straight line is used to approximate the logarithmic curve within an error threshold, thereby converting the logarithmic operation into multiplication and addition operations.
[0054] In some embodiments, after obtaining the brightness adjustment reference information, the user is also supported to manually modify the brightness adjustment reference information, thereby meeting the user's personalized needs.
[0055] Accordingly, in some embodiments, referring to FIG. 3 , after obtaining the brightness adjustment reference information of the area to be processed in the current frame image, the image processing method further includes steps S41 and S42 .
[0056] In step S41, an adjustment coefficient is obtained.
[0057] In step S42, the brightness adjustment reference information is modified according to the adjustment coefficient.
[0058] In the embodiment of the present disclosure, the adjustment coefficient may be configured by the user through the software; if not configured by the user, it may also be a default value configured in the system.
[0059] The embodiment of the present disclosure does not specifically limit how to obtain the brightness adjustment reference information.
[0060] In some embodiments, the overall brightness state of the area corresponding to the area to be processed in the previous frame image of the current frame image is analyzed to obtain the brightness adjustment reference information.
[0061] In some embodiments, obtaining brightness adjustment reference information of the area to be processed in the current frame image includes: obtaining the pixel value of each second pixel in the reference area of the previous frame image, wherein the reference area is the area in the previous frame image corresponding to the area to be processed; determining the brightness information of the reference area according to the pixel value of each second pixel to obtain the brightness adjustment reference information.
[0062] In the embodiment of the present disclosure, since the information of two consecutive frames of images in a video is usually similar, using the brightness information of the reference area of the previous frame of image as the reference information for brightness adjustment can ensure the effect of image processing, and there is no need to cache the data of the current frame of image, which is beneficial to reducing hardware resource consumption.
[0063] In some embodiments, when a frame image is acquired, it is determined whether the frame image is the 0th frame (the first frame); if the image is the 0th frame (the first frame), the brightness information is acquired based on the frame image as the brightness adjustment reference information corresponding to the next frame image, and the frame image is not processed; if the image is not the 0th frame (the first frame), the brightness information of the previous frame image is processed as the brightness adjustment reference information.
[0064] The embodiment of the present disclosure does not specifically limit how to determine the brightness information of the reference area.
[0065] In some embodiments, determining the brightness information of the reference area based on the pixel values of each second pixel includes: determining a weighted average of the pixel values of each second pixel based on a preset weight coefficient to obtain the brightness information of the reference area.
[0066] In some embodiments, by setting the weight coefficient, the brightness information of the reference area calculated is the average value of the pixel values of each second pixel.
[0067] The embodiment of the present disclosure does not specifically limit how to adjust the pixel value of the first pixel according to the brightness mapping value of the first pixel.
[0068] In some embodiments, adjusting the pixel value of the first pixel according to the brightness mapping value of the first pixel includes: determining a gain value according to the brightness mapping value of the first pixel and the original brightness value of the first pixel; determining the channel value of at least one channel of the first pixel according to the gain value, to obtain the adjusted pixel value of the first pixel.
[0069] In the embodiment of the present disclosure, the current frame image may be a single-channel image, such as a black and white image; the current frame image may also have three channels: red (R), green (G), and blue (B). The embodiment of the present disclosure does not impose any special limitation on this.
[0070] In some embodiments, for an image with three RGB channels, the gain value is calculated by formula (3): gain=Y dst / Y src (3)
[0071] Calculate the channel values of the RGB channels respectively through formula (4), formula (5), and formula (6): dst =R src ×gain×Y m (4) G dst =G src ×gain×Y m (5) B dst =B src ×gain×Y m (6)
[0072] Among them, gain is the gain value, R dst is the channel value of the R channel, R src is the original channel value of the R channel, G dst is the channel value of G channel, G src is the original channel value of G channel, B dst is the channel value of channel B, src is the original channel value of the B channel, Y dst is the brightness mapping value, Y src is the original brightness value, Y m The brightness extreme value.
[0073] In some embodiments, referring to FIG. 4 , before obtaining brightness adjustment reference information of the area to be processed in the current frame image, the image processing method further includes: step S5 , dividing the current frame image into at least one area to be processed.
[0074] In the embodiment of the present disclosure, each area to be processed is processed through steps S1 to S3.
[0075] In the case of dividing a plurality of to-be-processed areas, an interpolation algorithm is used to optimize the boundaries of the to-be-processed areas when obtaining the brightness adjustment mapping value.
[0076] In some embodiments, referring to FIG. 5 , before obtaining brightness adjustment reference information of the area to be processed in the current frame image, the image processing method further includes: step S6 , identifying at least one area of the current frame image to determine the area to be processed.
[0077] In the embodiment of the present disclosure, the area to be processed is identified by an image recognition algorithm, so that local adjustment and optimization of the current frame image can be achieved.
[0078] In the second aspect, referring to Figure 6, an embodiment of the present disclosure provides an electronic device, which includes: one or more processors 101; a memory 102, on which one or more programs are stored, and when the one or more programs are executed by the one or more processors 101, the one or more processors 101 implement the image processing method described in the first aspect of the embodiment of the present disclosure; one or more I / O interfaces 103, connected between the one or more processors 101 and the memory 102, and configured to implement information interaction between the processor and the memory.
[0079] Among them, the processor 101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I / O interface (read-write interface) 103 is connected between the processor 101 and the memory 102, and can realize information interaction between the processor 101 and the memory 102, including but not limited to a data bus (Bus), etc.
[0080] In some embodiments, the processor 101 , the memory 102 , and the I / O interface 103 are connected to each other via a bus 104 , and further connected to other components of the computing device.
[0081] In a third aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the image processing method described in the first aspect of the embodiment of the present disclosure.
[0082] In order to enable those skilled in the art to more clearly understand the technical solutions provided by the embodiments of the present disclosure, the technical solutions provided by the embodiments of the present disclosure are described in detail below through exemplary embodiments:
[0083] First Exemplary Embodiment
[0084] In this embodiment, taking video processing as an example, the image processing process for improving the display effect of the display screen in a strong light environment includes the following steps.
[0085] 1) Obtain the brightness adjustment reference information of the current frame image. In the video processing process, the information of two adjacent frames of the video is usually similar, and the corresponding brightness mean value changes little. Using the brightness information of the previous frame image as the brightness adjustment reference information of the current frame image can reduce hardware resource consumption. When determining the brightness information of the previous frame image, the brightness value of the pixel is calculated by the following formula (7): Y = R × r y +G×g y +B×b y (7)
[0086] Among them, R, G, and B are three-channel pixel values, r y 、g y 、b y are the brightness coefficient values of the corresponding channels respectively.
[0087] 2) Determine the brightness mapping value of the pixel. This embodiment uses a logarithmic and linear dual combination method to determine the brightness mapping value of the pixel through the following formula (8) and formula (9): Y dst =Y dst_1 -(Y dst_1 -Y src / Y m )*(Y src / Y m ) (9)
[0088] Among them, Y dst_1 Maps the middle value of brightness, Y dst is the brightness mapping value, Y src is the original brightness value of the pixel, Y m is the brightness extreme value, Y f Adjust the reference information for brightness.
[0089] Adjust reference information Y corresponding to different brightness fThe brightness mapping curve is shown in Figure 7. The horizontal axis x represents the original brightness value of the pixel, and the vertical axis y represents the brightness mapping value of the pixel. The straight line y=x represents that the mapping value is equal to the original brightness value; the Y corresponding to the brightness mapping curve f The larger the value, the smaller the deviation of the mapping curve from the straight line y=x, which means that the brightness of the pixel needs to be adjusted less. f The smaller the value, the greater the deviation of the mapping curve from the straight line y=x, which means that the brightness of the pixel needs to be adjusted to a greater extent.
[0090] In this embodiment, the pixel brightness of the image is adaptively adjusted using formula (8), resulting in oversaturation and overexposure in high-brightness areas. Further optimization is performed using formula (9), where the intermediate value of the brightness mapping is reduced proportionally to the original brightness value of the pixel. The larger the original brightness value of the pixel, the greater the reduction ratio, thereby suppressing oversaturation and overexposure in high-brightness areas. Figure 8 is a schematic diagram of the optimization based on formulas (8) and (9). In Figure 8, (a) is the original image, (b) is the image adjusted using formula (8), and overexposure occurs in high-brightness areas such as faces. (c) is the image adjusted using formula (9), and overexposure in high-brightness areas such as faces is suppressed.
[0091] 3) Recalculate pixel values. Calculate gain using formula (10): gain = Y dst / Y src (10)
[0092] Calculate the channel values of RGB channels respectively through formula (11), formula (12), and formula (13): dst =R src ×gain×Y m (11) G dst =G src ×gain×Y m (12) B dst =B src ×gain×Y m (13)
[0093] Among them, gain is the gain value, R dst is the channel value of the R channel, R src is the original channel value of the R channel, G dst is the channel value of G channel, G src is the original channel value of G channel, B dst is the channel value of channel B,src is the original channel value of the B channel, Y dst is the brightness mapping value, Y src is the original brightness value, Y m The brightness extreme value.
[0094] Figure 9 is a comparison diagram of the effects of image processing using the image processing flow of this embodiment. The left image in Figure 9 is the original image, and the right image is the effect diagram after processing. The image processing flow of this embodiment improves the brightness of low-brightness pixels, while suppressing the oversaturation and overexposure of high-brightness pixels, thereby improving the display effect in a strong light environment.
[0095] Second Exemplary Embodiment
[0096] In this embodiment, taking video processing as an example, the image processing flow for improving the display effect of a display screen in a strong light environment is shown in FIG10 , and includes the following steps.
[0097] 1) Obtain a frame image and determine whether the frame image is frame 0; if so, obtain brightness information as reference information for brightness adjustment of the next frame image; if not, use the brightness information of the previous frame image as reference information for brightness adjustment;
[0098] 2) Obtain the adjustment coefficient configured by the user and modify the brightness adjustment reference information; if the user does not manually configure the adjustment coefficient, select the system default adjustment coefficient. According to the formula Y′ f =Y f ×ratio corrects the brightness adjustment reference information, Y′ f is the corrected brightness adjustment reference information, Y f is the brightness adjustment reference information before correction, and ratio is the adjustment coefficient. The image processing effects of manually configuring different adjustment coefficients by the user are compared in Figure 11. The 16 images in Figure 11 correspond to different adjustment coefficients.
[0099] 3) Determine the brightness mapping value of the pixel and adaptively adjust the brightness of the pixel.
[0100] 4) Adjust the pixel values of the pixels and output the target image.
[0101] In the embodiment of the present disclosure, the brightness of the pixels in the to-be-processed area can be adjusted one by one according to the brightness adjustment reference information representing the brightness state of the to-be-processed area in the current frame image, and then the pixel values of the pixels in the to-be-processed area can be adjusted one by one, so that the brightness of the pixels with relatively low brightness in the to-be-processed area can be improved, overcoming the defect that the display effect of the pixels with relatively low brightness under strong light is worse than that of the pixels with relatively high brightness, and improving the detail display effect of the relatively low brightness part in the image; by adjusting the brightness of the pixels in the to-be-processed area one by one, the brightness increase amplitude of the pixels with relatively low brightness can be greater than the brightness increase amplitude of the pixels with relatively high brightness, so that while improving the display effect of the relatively low brightness part, the oversaturation and overexposure of the relatively high brightness part can be suppressed, which is beneficial to improving the display effect of the display screen in a strong light environment and improving the user's viewing and usage experience.
[0102] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As is well known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable, and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0103] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for purposes of limitation. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly indicated, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, it will be understood by those skilled in the art that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.
Claims
1. An image processing method, comprising: Acquire brightness adjustment reference information of a to-be-processed area in a current frame image, wherein the brightness adjustment reference information represents a brightness state of the to-be-processed area; Adjusting the brightness of each first pixel in the area to be processed according to the brightness adjustment reference information to obtain a brightness mapping value of each first pixel; The pixel values of the first pixels are adjusted according to the brightness mapping values of the first pixels to obtain a target image corresponding to the current frame image.
2. The image processing method according to claim 1, wherein: The brightness of each first pixel in the to-be-processed area is adjusted according to the brightness adjustment reference information to obtain a brightness mapping value of each first pixel, including: According to the brightness adjustment reference information, the original brightness value of the first pixel, and the brightness extreme value, the brightness of the first pixel is adjusted to obtain a brightness mapping intermediate value; The brightness mapping value is obtained by reducing the brightness mapping intermediate value based on a linear relationship, wherein a ratio of the brightness mapping value to be reduced relative to the brightness mapping intermediate value is positively correlated with an original brightness value of the first pixel.
3. The image processing method according to claim 2, wherein: The method further comprises: adjusting the brightness of the first pixel according to the brightness adjustment reference information, the original brightness value of the first pixel, and the brightness extreme value to obtain a brightness mapping intermediate value, including: Determine the brightness mapping intermediate value based on a logarithmic relationship according to the brightness adjustment reference information, the original brightness value of the first pixel, and the brightness extreme value; or The brightness mapping intermediate value is determined based on gamma adjustment according to the brightness adjustment reference information, the original brightness value of the first pixel, and the brightness extreme value.
4. The image processing method according to claim 3, wherein: Determining a brightness mapping intermediate value based on a logarithmic relationship according to the brightness adjustment reference information, the original brightness value of the first pixel, and the brightness extreme value, includes: Performing piecewise linear fitting on the logarithmic relationship to obtain a linear fitting relationship; The brightness mapping intermediate value is determined based on the linear fitting relationship according to the brightness adjustment reference information, the original brightness value of the first pixel, and the brightness extreme value.
5. The image processing method according to any one of claims 1 to 4, wherein: After obtaining the brightness adjustment reference information of the area to be processed in the current frame image, the image processing method further includes: Get the adjustment factor; The brightness adjustment reference information is modified according to the adjustment coefficient.
6. The image processing method according to any one of claims 1 to 4, wherein: Get the brightness adjustment reference information of the area to be processed in the current frame image, including: Acquire the pixel value of each second pixel in a reference area of a previous frame image, wherein the reference area is an area in the previous frame image corresponding to the area to be processed; The brightness information of the reference area is determined according to the pixel value of each of the second pixels to obtain the brightness adjustment reference information.
7. The image processing method according to claim 6, wherein: Determining brightness information of the reference area according to the pixel values of each of the second pixels includes: A weighted average value of the pixel values of each of the second pixels is determined according to a preset weight coefficient to obtain brightness information of the reference area.
8. The image processing method according to any one of claims 1 to 4, wherein: Adjusting the pixel value of the first pixel according to the brightness mapping value of the first pixel includes: Determine a gain value according to a brightness mapping value of the first pixel and an original brightness value of the first pixel; A channel value of at least one channel of the first pixel is determined according to the gain value to obtain an adjusted pixel value of the first pixel.
9. The image processing method according to any one of claims 1 to 4, wherein: Before obtaining the brightness adjustment reference information of the area to be processed in the current frame image, the image processing method further includes: The current frame image is divided into at least one area to be processed.
10. The image processing method according to any one of claims 1 to 4, wherein: Before obtaining the brightness adjustment reference information of the area to be processed in the current frame image, the image processing method further includes: At least one area of the current frame image is identified to determine the area to be processed.
11. An electronic device, comprising: one or more processors; A memory having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method according to any one of claims 1 to 10.
12. A computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the image processing method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Video brightness adjustment method and device, electronic equipment and storage medium
CN114466147A
Image processing method and device, equipment, storage medium and program product
CN115330621A
Video data processing method and device, video display method and device, electronic equipment and readable storage medium
CN115643385A
Video data processing method and device, video display method and device, electronic equipment and readable storage medium
CN115801969A
Photographing method, storage medium, and electronic device
WO2021179358A1
