Image processing method and apparatus
Patent Information
- Application Number
- CN202110377987.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-08
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2041-04-08
AI Technical Summary
[0006]本发明实施例提供了一种图像处理方法和装置,以至少解决由于相关技术中只能手动调节Gamma值,进而改变屏幕值亮度,但是由于调节不同的Gamma值,会导致偏色现象的技术问题
[0023]在本发明实施例中,通过依据接收到的图像信号进行特征分析,得到图像特征分析结果;依据图像特征分析结果获取对应的峰值亮度;依据图像特征分析结果和峰值亮度进行计算,得到映射曲线;依据映射曲线调整图像信号,得到调整后的图像信号,达到了根据LED屏的不同峰值亮度,做自动的对比度增强,自适应的调整图像对比度的目的,从而实现了最合适人眼观看的HDR LED屏幕,使SDR图像在LED屏上呈现出类似HDR的技术效果,进而解决了由于相关技术中只能手动调节Gamma值,进而改变屏幕值亮度,但是由于调节不同的Gamma值,会导致偏色现象的技术问题。
Smart Images

Figure CN115205182B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of display technology, and more specifically, to an image processing method and apparatus. Background Technology
[0002] LED displays boast advantages such as high brightness, wide viewing angles, long lifespan, and flexible assembly, making them widely applicable across various fields. With the development of LED display technology, LED screens with peak brightness ranging from a few hundred nits to several thousand nits are now emerging, finding wide application in indoor TV displays, cinemas, conference displays, and outdoor commercial advertising.
[0003] Because LED screens have different application scenarios and peak brightness levels, the same display image will appear differently on different displays. Therefore, for the large number of SDR (Standard Dynamic Range) sources on the market, it is necessary to adjust the peak brightness according to the application scenario of the screen, and on this basis, select an appropriate display Gamma (brightness and contrast) value to match the contrast perceived by the human eye.
[0004] For example, an outdoor advertising screen might be too bright for indoor movie watching, and extremely glaring for viewing Word documents and PowerPoint presentations. In such cases, adjusting the LED screen's peak brightness is necessary. Currently, the main adjustment methods are manual and automatic. However, the human eye perceives contrast differently under different brightness conditions. Therefore, after adjusting the LED screen's peak brightness, further contrast adjustment is required. The mainstream method in related technologies is adjusting the display's Gamma value.
[0005] Regarding the aforementioned issue that the relevant technologies only allow manual adjustment of the Gamma value to change the screen brightness, but adjusting different Gamma values can lead to color distortion, no effective solution has yet been proposed. Summary of the Invention
[0006] This invention provides an image processing method and apparatus to at least solve the technical problem that in related technologies, the screen brightness can only be changed by manually adjusting the Gamma value, but different Gamma values will cause color cast.
[0007] According to one aspect of the present invention, an image processing method is provided, comprising: performing feature analysis on a received image signal to obtain an image feature analysis result; obtaining a corresponding peak brightness based on the image feature analysis result; calculating a mapping curve based on the image feature analysis result and the peak brightness; and adjusting the image signal based on the mapping curve to obtain an adjusted image signal.
[0008] Optionally, the image feature analysis results include a first image feature analysis result and a second image feature analysis result. Obtaining the corresponding peak brightness based on the image feature analysis results includes: obtaining the peak brightness based on the first image feature analysis result; calculating the mapping curve based on the image feature analysis results and the peak brightness includes: calculating the mapping curve based on the second image feature analysis results and the peak brightness.
[0009] Optionally, the first image feature analysis result includes histogram distribution information and image weighted average brightness, and the second image feature analysis result includes image saliency index.
[0010] Further, optionally, obtaining the corresponding peak brightness based on the image feature analysis results includes: calculating the image information content of the image signal based on the histogram distribution information; and calculating the peak brightness based on the image information content and the image weighted average brightness.
[0011] Optionally, the mapping curve is calculated based on the image feature analysis results and peak brightness, including: calculating the brightness value of each point based on the image features and peak brightness based on the image feature analysis results; determining the intensity adjustment parameter by setting a threshold based on the image saliency index; calculating the adjusted brightness value of each point based on the brightness value of each point and the intensity adjustment parameter; and performing interpolation calculation based on the adjusted brightness value of each point to obtain the mapping curve.
[0012] Further, optionally, determining the intensity adjustment parameter based on the image saliency index by setting a threshold includes: determining the intensity adjustment parameter corresponding to the image saliency index based on the relationship between the image saliency index and the set threshold.
[0013] Further, optionally, adjusting the image signal according to the mapping curve to obtain the adjusted image signal includes: calculating the brightness of each pixel based on the image signal; calculating the brightness mapping value based on the brightness of each pixel and the mapping curve; calculating the gain coefficient based on the brightness of each pixel and the brightness mapping value; and adjusting the image value of each pixel based on the gain coefficient.
[0014] According to another aspect of the present invention, an image processing apparatus is also provided, comprising: an analysis module for performing feature analysis based on a received image signal to obtain an image feature analysis result; an acquisition module for acquiring a corresponding peak brightness based on the image feature analysis result; a calculation module for calculating based on the image feature analysis result and the peak brightness to obtain a mapping curve; and an adjustment module for adjusting the image signal based on the mapping curve to obtain an adjusted image signal.
[0015] Optionally, the image feature analysis results include a first image feature analysis result and a second image feature analysis result. The acquisition module includes an acquisition unit for acquiring peak brightness based on the first image feature analysis result. The calculation module includes a calculation unit for calculating based on the second image feature analysis result and the peak brightness to obtain a mapping curve.
[0016] Optionally, the first image feature analysis result includes histogram distribution information and image weighted average brightness, and the second image feature analysis result includes image saliency index.
[0017] Further, optionally, the acquisition unit includes: a first calculation subunit, used to calculate the image information content of the image signal based on the histogram distribution information; and an acquisition subunit, used to calculate the peak brightness based on the image information content and the image weighted average brightness.
[0018] Optionally, the calculation module includes: a first calculation unit, used to calculate the brightness value of each point based on the image features and peak brightness obtained from the image feature analysis results; a second calculation unit, used to determine the intensity adjustment parameter by setting a threshold based on the image saliency index; a third calculation unit, used to calculate the adjusted brightness value of each point based on the brightness value of each point and the intensity adjustment parameter; and a fourth calculation unit, used to perform interpolation calculation based on the adjusted brightness value of each point to obtain the mapping curve.
[0019] Further, optionally, the second calculation unit includes: a second calculation subunit, used to determine the intensity adjustment parameter corresponding to the image saliency index based on the relationship between the image saliency index and the set threshold.
[0020] Further, optionally, the adjustment module includes: a fifth calculation unit for calculating the brightness of each pixel based on the image signal; a sixth calculation unit for calculating the brightness mapping value based on the brightness of each pixel and the mapping curve; a seventh calculation unit for calculating the gain coefficient based on the brightness of each pixel and the brightness mapping value; and an adjustment unit for adjusting the image value of each pixel based on the gain coefficient.
[0021] According to another aspect of the present invention, a non-volatile storage medium is also provided, the non-volatile storage medium including a stored program, wherein the program controls the device where the non-volatile storage medium is located to execute the above-described method when it is running.
[0022] According to another aspect of the present invention, a processor is also provided, the processor being used to run a program, wherein the program executes the above-described method when it runs.
[0023] In this embodiment of the invention, image feature analysis results are obtained by performing feature analysis on the received image signal; the corresponding peak brightness is obtained based on the image feature analysis results; a mapping curve is calculated based on the image feature analysis results and the peak brightness; and the image signal is adjusted based on the mapping curve to obtain the adjusted image signal. This achieves the purpose of automatically enhancing contrast and adaptively adjusting image contrast according to different peak brightness of the LED screen, thereby realizing an HDR LED screen most suitable for human eye viewing. This allows SDR images to present a similar HDR technical effect on the LED screen, thus solving the technical problem that in related technologies, only the Gamma value can be manually adjusted to change the screen brightness, but adjusting different Gamma values will lead to color cast. Attached Figure Description
[0024] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0025] Figure 1 This is a schematic flowchart of an image processing method according to an embodiment of the present invention;
[0026] Figure 2 This is a schematic diagram of calculating the mapping curve in the image processing method according to an embodiment of the present invention;
[0027] Figure 3a This is a schematic diagram illustrating an example of calculating linear interpolation in a mapping curve in an image processing method according to an embodiment of the present invention;
[0028] Figure 3b This is a schematic diagram illustrating an example of calculating nonlinear interpolation in a mapping curve in an image processing method according to an embodiment of the present invention;
[0029] Figure 4 This is a schematic diagram of adjusting an image signal in an image processing method according to an embodiment of the present invention;
[0030] Figure 5 This is a schematic diagram of an image processing method according to an embodiment of the present invention;
[0031] Figure 6 This is a schematic diagram of an image processing apparatus according to an embodiment of the present invention. Detailed Implementation
[0032] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0033] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0034] Technical terms used in the embodiments of this application:
[0035] SDR: Standard Dynamic Range;
[0036] Image weighted average brightness: WAPL;
[0037] HDR: High Dynamic Range Imaging;
[0038] ITM: Inverse tone mapping.
[0039] Example 1
[0040] According to an embodiment of the present invention, an embodiment of an image processing method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0041] Figure 1 This is a schematic flowchart of an image processing method according to an embodiment of the present invention, such as... Figure 1 As shown, the image processing method provided in this application includes the following steps:
[0042] Step S102: Perform feature analysis based on the received image signal to obtain the image feature analysis result;
[0043] Optionally, the image feature analysis results include a first image feature analysis result and a second image feature analysis result. Obtaining the corresponding peak brightness based on the image feature analysis results includes: obtaining the peak brightness based on the first image feature analysis result; calculating the mapping curve based on the image feature analysis results and the peak brightness includes: calculating the mapping curve based on the second image feature analysis results and the peak brightness.
[0044] The first image feature analysis result includes histogram distribution information and image weighted average brightness, while the second image feature analysis result includes image saliency index.
[0045] Specifically, in the embodiments of this application, feature analysis is performed based on the input image signal, such as calculating the image's statistical histogram distribution (Hist), image weighted average brightness (WAPL), and image saliency index (S).
[0046] Among them, the statistical histogram distribution Hist is used to calculate the image saliency index S and the image information content E. Its horizontal axis represents the image brightness value Y, and the vertical axis represents the frequency distribution of pixels with a brightness value of Y.
[0047] The specific calculation of WAPL is as follows:
[0048] For an image of size M×N, WAPL can be expressed as formula (1).
[0049]
[0050] In formula (1), the function f represents a linear combination of the RGB image signals. In addition, formula (1) can be replaced by the BT.709 standard brightness calculation formula.
[0051] WAPL: Weighted Average Picture Luminance Level, as shown in Formula (1). It is used to represent the weighted average of the maximum RGB values of each pixel in an M*N image and the average of a linear combination of the RGB signals of each pixel.
[0052] The function f represents a linear combination of the RGB values of the image signal. f can be replaced by a standard luminance calculation formula of the form BT.709. For example, f(RGB) = 0.2126 × R + 0.7152 × G + 0.0722 × B;
[0053] The above examples are only preferred examples for illustration, and are intended to implement the image processing method provided in the embodiments of this application.
[0054] The image saliency index S for pixel p is calculated as follows:
[0055] S(p)=∑f k D(n, k); (2)
[0056] In formula (2), D(n, k) represents the grayscale distance between the brightness value n of pixel p and the brightness value k of pixel p, and f k The Histogram distribution of the image is used to obtain the pixel frequency distribution with a brightness value of k.
[0057] Step S104: Obtain the corresponding peak brightness based on the image feature analysis results;
[0058] Specifically, based on the image feature analysis results calculated in step S102, the corresponding peak brightness is obtained in step S104 according to the image feature analysis results obtained in step S102, as follows:
[0059] Further, optionally, in step S104, obtaining the corresponding peak brightness based on the image feature analysis results includes: calculating the image information content of the image signal based on the histogram distribution information; and calculating the peak brightness based on the image information content and the image weighted average brightness.
[0060] Specifically, taking each frame as an example, based on the image feature analysis results of each frame, the peak brightness can be adaptively adjusted. Using the statistical histogram (Hist) obtained from the image feature analysis results, the image information content E is calculated using the information entropy calculation formula.
[0061]
[0062] In formula (3), P(i) is the probability density corresponding to Hist.
[0063] Regularization terms b1 and b2 are used to weight and normalize WAPL and information content E to obtain Peak for adjusting the peak brightness, as shown in formula (4):
[0064] Peak=f(WAPL,E,b1,b2)=b1×WAPL+b2×E; (4)
[0065] Assuming the image's weighted average brightness is high, a lower peak brightness can be chosen to reduce the stimulation of the human eye caused by high brightness, similar to reading a document. Conversely, if the image content contains only a few high-brightness areas, the overall brightness is low, or the histogram distribution is relatively uniform, a very high peak brightness can be selected to stretch the dynamic range of the LED screen, truly displaying high-brightness areas, making blacks appear deeper and brights brighter, thus improving the image's contrast. b1 is used to weigh the impact of the image's weighted average brightness (b1 × WAPL), and b2 is used to weigh the impact of the histogram distribution on the peak brightness (b2 × E). The weighting of b1 and b2 can be adjusted according to the actual business requirements of the image.
[0066] In addition, the peak brightness in this embodiment can also be obtained by human eye observation and manual adjustment. For example, a white 255 screen can be displayed in full screen, and the screen brightness can be adjusted according to human eye observation preferences, assuming that the peak brightness P0 makes the human eye feel comfortable.
[0067] Step S106: Calculate the mapping curve based on the image feature analysis results and peak brightness;
[0068] Based on the image feature analysis results obtained in step S102 and the peak brightness obtained in step S104, a mapping curve is obtained, as follows:
[0069] Optionally, the calculation of the mapping curve based on the image feature analysis results and peak brightness in step S106 includes: calculating the brightness value of each point based on the image features and peak brightness based on the image feature analysis results; determining the intensity adjustment parameter by setting a threshold based on the image saliency index; calculating the adjusted brightness value of each point based on the brightness value of each point and the intensity adjustment parameter; and performing interpolation calculation based on the adjusted brightness value of each point to obtain the mapping curve.
[0070] Specifically, in this embodiment, a segmented mapping curve is used as the mapping method for ITM. This mapping curve calculation method... Figure 2 As shown, Figure 2 This is a schematic diagram of calculating the mapping curve in the image processing method according to an embodiment of the present invention. The calculation is performed frame by frame, that is, each frame adaptively calculates a unique mapping curve based on the results of image feature analysis.
[0071] First, in step S104, since the peak brightness of different images will be adjusted to different values, and the human eye's sensitivity to brightness is different under different peak brightness, it is necessary to use ITM adaptive adjustment of contrast so that the image contrast under the current screen peak meets the contrast perception characteristics of the human eye. It is necessary to first determine the node coordinates of the mapping curve (i.e., the brightness value of each point in this embodiment, and the adjusted brightness values of each point form the mapping curve). The determination of the node coordinates Pos depends on the image feature analysis results in step S102 and the peak brightness in step S104 (i.e., the brightness value of each point is calculated based on the image features and peak brightness in this embodiment), as shown in formula (5):
[0072] Pos = F(Peak, P0); (5)
[0073] Further, optionally, determining the intensity adjustment parameter based on the image saliency index by setting a threshold includes: determining the intensity adjustment parameter corresponding to the image saliency index based on the relationship between the image saliency index and the set threshold.
[0074] Secondly, such as Figure 2 As shown, based on the image saliency index S in step S102, a threshold is set, an intensity adjustment parameter is calculated, and the node coordinates of the mapping curve are fine-tuned.
[0075] For example, if the statistic of S(p) < t is less than 40% for a set threshold t (i.e., the set threshold in this embodiment), it indicates that there is not much content in the image that is significant to the human eye, and there are many smooth, insensitive areas. In this case, the contrast adjustment of the mapping curve should not be too strong, that is, the intensity adjustment parameter should not be too strong (i.e., the intensity adjustment parameter is determined by setting a threshold based on the image saliency index in this embodiment). Conversely, the intensity adjustment parameter can be appropriately increased to make the contrast enhancement effect of the mapping curve more prominent and the contrast improvement perceived by the human eye more obvious.
[0076] The calculation of the emphasis parameter can be illustrated as follows:
[0077] For example, a Look-Up Table (LUT) can be used. For a given threshold t, one of the intensity adjustment parameters, Offset, can be used to adjust node P, resulting in node D after adjustment, as shown in Table 1.
[0078] Table 1
[0079] <40% 3 200+3=203 >=40% 5 200+5=205
[0080] Finally, based on the adjusted node coordinates, linear or nonlinear interpolation (e.g., spline interpolation) is performed to obtain the final mapping curve.
[0081] Let's take linear interpolation as an example. Figure 3a and 3b As shown, Figure 3a This is a schematic diagram illustrating an example of linear interpolation in a mapping curve during image processing according to an embodiment of the present invention. P0 represents the peak brightness of the screen adjusted according to human visual preferences when displaying a full-screen white 255 image. When displaying other natural scene images, the optimal peak brightness changes in real time based on the different image content of each frame. Figure 3a The position of point P changes adaptively based on the results of image content feature analysis. Based on this, the initial node position coordinates are determined according to F(Peak, P0), such as point A in the figure.
[0082] like Figure 3a As shown, the 0P0 curve is obtained by determining the peak brightness P0, and the 0Peak curve is obtained by determining Peak by Peak = f(WAPL, E, b1, b2) = b1 × WAPL + b2 × E. Therefore, the curves where the initial value point A and point P are obtained are obtained. Point A represents the brightness value obtained in real time, and point P is the point with the largest brightness value in the above frame image.
[0083] Further, optionally, the calculation of the adjusted brightness value of each point includes: D = P * ratio; or, D = P + Offset; where D is the adjusted brightness value of the specified point, P is the brightness value of the specified point, ratio is the multiplication coefficient, and Offset is the addition coefficient.
[0084] Specifically, the intensity adjustment parameters are determined based on the image saliency index S, and the coordinates of the initial nodes A and P are adjusted upwards and downwards to obtain B and D. The adjustment can be performed using multiplicative or additive coefficients. For example, D = P * ratio or D = P + Offset. Figure 3a As shown, assuming P is 200 and Offset is 5, then D is 205. Similarly, knowing the brightness value of point A, the brightness value of point B can be obtained based on the Offset value, and then the mapping curve 0BD can be obtained based on points B and D.
[0085] The final mapping curve is obtained by interpolation based on the adjusted node coordinates B and D. Linear or nonlinear interpolation can be used, such as... Figure 3a The piecewise curve with a broken line in the middle is an example of linear interpolation.
[0086] The number of nodes can be multiple, and the interpolation can be non-linear interpolation. Figure 3b This is a schematic diagram illustrating an example of calculating nonlinear interpolation in a mapping curve in an image processing method according to an embodiment of the present invention.
[0087] The following explanation uses linear interpolation as an example. Figure 3a As shown, assuming the coordinates of point B are B(x1, y1) and the coordinates of point D are D(x2, y2), then the coordinates M(x3, y3) of any point M on the line connecting BD can be obtained by interpolation:
[0088]
[0089] Step S108: Adjust the image signal according to the mapping curve to obtain the adjusted image signal.
[0090] in, Figure 4 This is a schematic diagram of adjusting an image signal in an image processing method according to an embodiment of the present invention, such as... Figure 4 As shown, the process of adjusting the image signal based on the mapping curve is as follows:
[0091] Further, optionally, step S108, adjusting the image signal according to the mapping curve to obtain the adjusted image signal, includes: calculating the brightness of each pixel based on the image signal; calculating the brightness mapping value based on the brightness of each pixel and the mapping curve; calculating the gain coefficient based on the brightness of each pixel and the brightness mapping value; and adjusting the image value of each pixel based on the gain coefficient.
[0092] Specifically, based on the image adaptive ITM mapping curve obtained in step S106, RGB signal mapping is adjusted pixel-by-pixel for each frame, such as... Figure 4 As shown, for each pixel in the image, the brightness Y of the pixel is calculated using the RGB signal, and the calculation method is as shown in formula (6):
[0093] Y=a1×max(RGB)+a2×mean(f(RGB)); (6)
[0094] Based on the final ITM mapping curve, the mapping value is calculated. For example, if Y = 20, the mapping value Y_HDR of Y can be calculated according to the mapping relationship of the ITM mapping curve.
[0095] Calculate the gain coefficient Gain at this point based on Y and the mapping value Y_HDR. See formula (7);
[0096] Gain = Y_HDR / Y; (7)
[0097] Finally, the RGB value at that point is adjusted using Gain, and the same proportion of Gain is applied to both RGB values to obtain the final output (i.e., the adjusted image signal in this embodiment of the application):
[0098] R_Out = R * Gain
[0099] G_Out = G * Gain
[0100] B_Out = B * Gain
[0101] By obtaining the adjusted image signal in step S108, the image contrast can be dynamically adjusted while ensuring that the RGB ratio remains unchanged before and after adjustment, thus preventing color cast.
[0102] In summary, combining steps S102 to S108, the image processing method provided in this application embodiment, during implementation, such as... Figure 5 As shown, Figure 5 This is a schematic diagram of an image processing method according to an embodiment of the present invention;
[0103] The image processing method provided in this application addresses the problems existing in the prior art by proposing an inverse tone mapping (ITM) method. This method displays SDR images on LED screens with an HDR-like visual effect through inverse tone mapping, and can display SDR images on LED screens with different peak brightness in a way that is more in line with the contrast of human vision without causing color cast.
[0104] The image processing method provided in this application adopts an adaptive curve mapping approach to adjust the image level signal (grayscale). Based on the peak brightness of the LED screen and combined with analysis of the content displayed in the image, the node positions of the segmented mapping curve are adaptively calculated. Appropriate parameters can be set to adjust the node positions. The adjusted node positions are then interpolated using linear interpolation, spline interpolation, or other methods to generate the mapping curve. Finally, all grayscale levels are mapped according to the generated mapping curve, achieving an inverse tone mapping process. This ensures that LED screens with different peak brightness levels can automatically match the contrast effect viewed by the human eye.
[0105] The image processing method provided in this application takes into account the different peak brightness requirements of LED screens in different application scenarios. Applying a fixed display gamma to LED screens with different peak brightness results in poor contrast and display effect. Furthermore, adjusting gamma can cause color cast. This method can perform feature analysis based on the image content displayed on the LED screen and dynamically adjust the image contrast for different LED screen peak brightness, so that the SDR image presents an HDR-like effect on the LED screen. It satisfies the contrast preference of the human eye on screens with different peak brightness and does not produce adverse phenomena such as color cast.
[0106] In this embodiment of the invention, image feature analysis results are obtained by performing feature analysis on the received image signal; the corresponding peak brightness is obtained based on the image feature analysis results; a mapping curve is calculated based on the image feature analysis results and the peak brightness; and the image signal is adjusted based on the mapping curve to obtain the adjusted image signal. This achieves the purpose of automatically enhancing contrast and adaptively adjusting image contrast according to different peak brightness of the LED screen, thereby realizing an HDR LED screen most suitable for human eye viewing. This allows SDR images to present a similar HDR technical effect on the LED screen, thus solving the technical problem that in related technologies, only the Gamma value can be manually adjusted to change the screen brightness, but adjusting different Gamma values will lead to color cast.
[0107] Example 2
[0108] According to another aspect of the present invention, an image processing apparatus is also provided. Figure 6 This is a schematic diagram of an image processing apparatus according to an embodiment of the present invention, such as... Figure 6 As shown, it includes: an analysis module 62, used to perform feature analysis based on the received image signal to obtain image feature analysis results; an acquisition module 64, used to obtain the corresponding peak brightness based on the image feature analysis results; a calculation module 66, used to calculate based on the image feature analysis results and peak brightness to obtain a mapping curve; and an adjustment module 68, used to adjust the image signal based on the mapping curve to obtain the adjusted image signal.
[0109] Optionally, the image feature analysis results include a first image feature analysis result and a second image feature analysis result. The acquisition module 64 includes an acquisition unit for acquiring peak brightness based on the first image feature analysis result. The calculation module 66 includes a calculation unit for calculating based on the second image feature analysis result and the peak brightness to obtain a mapping curve.
[0110] Optionally, the first image feature analysis result includes histogram distribution information and image weighted average brightness, and the second image feature analysis result includes image saliency index.
[0111] Further, optionally, the acquisition unit includes: a first calculation subunit, used to calculate the image information content of the image signal based on the histogram distribution information; and an acquisition subunit, used to calculate the peak brightness based on the image information content and the image weighted average brightness.
[0112] Optionally, the calculation module 66 includes: a first calculation unit, used to calculate the brightness value of each point based on the image features and peak brightness of the image feature analysis results; a second calculation unit, used to determine the intensity adjustment parameter by setting a threshold based on the image saliency index; a third calculation unit, used to calculate the adjusted brightness value of each point based on the brightness value of each point and the intensity adjustment parameter; and a fourth calculation unit, used to perform interpolation calculation based on the adjusted brightness value of each point to obtain the mapping curve.
[0113] Further, optionally, the second calculation unit includes: a second calculation subunit, used to determine the intensity adjustment parameter corresponding to the image saliency index based on the relationship between the image saliency index and the set threshold.
[0114] Further, optionally, the third calculation unit is: D = P * ratio; or, D = P + Offset; where D is the adjusted brightness value of the specified point, P is the brightness value of the specified point, ratio is the multiplication coefficient, and Offset is the addition coefficient.
[0115] Further, optionally, the adjustment module 68 includes: a fifth calculation unit for calculating the brightness of each pixel based on the image signal; a sixth calculation unit for calculating the brightness mapping value based on the brightness of each pixel and the mapping curve; a seventh calculation unit for calculating the gain coefficient based on the brightness of each pixel and the brightness mapping value; and an adjustment unit for adjusting the image value of each pixel based on the gain coefficient.
[0116] Example 3
[0117] According to another aspect of the present invention, a non-volatile storage medium is also provided, the non-volatile storage medium including a stored program, wherein, when the program is executed, the device where the non-volatile storage medium is located is controlled to execute the method in Embodiment 1 above.
[0118] Example 4
[0119] According to another aspect of the present invention, a processor is also provided, the processor being used to run a program, wherein the program executes the method in embodiment 1 above when it runs.
[0120] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0121] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0122] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0123] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0124] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0125] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0126] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. An image processing method, characterized in that, include: Based on the received image signal, feature analysis is performed to obtain the image feature analysis results; The corresponding peak brightness is obtained based on the image feature analysis results; Based on the image feature analysis results and the peak brightness, a mapping curve is obtained; The image signal is adjusted according to the mapping curve to obtain the adjusted image signal; The mapping curve is calculated based on the image feature analysis results and the peak brightness, including: calculating the node coordinates of the mapping curve based on the image feature analysis results and the peak brightness, wherein the node coordinates are used to represent the brightness value of each node; adjusting the node coordinates according to the intensity adjustment parameters; and assembling the adjusted node coordinates into the mapping curve. The image feature analysis results include histogram distribution information and image weighted average brightness. Obtaining the corresponding peak brightness based on the image feature analysis results includes: calculating image information quantity based on the probability density corresponding to the histogram distribution information; and performing a weighted calculation on the image information quantity and the image weighted average brightness using the regularization term of the image information quantity and the regularization term of the image weighted average brightness to obtain the peak brightness. The regularization term of the image information quantity is a parameter used to weigh the influence of the histogram distribution information on the peak brightness, and the regularization term of the image weighted average brightness is a parameter used to weigh the influence of the image weighted average brightness on the peak brightness.
2. The method according to claim 1, characterized in that, The image feature analysis result also includes a second image feature analysis result. The step of calculating the mapping curve based on the image feature analysis result and the peak brightness includes: The mapping curve is obtained by calculating based on the second image feature analysis results and the peak brightness.
3. The method according to claim 2, characterized in that, The second image feature analysis result includes image saliency indicators.
4. The method according to claim 3, characterized in that, The step of calculating the node coordinates of the mapping curve based on the image feature analysis results and the peak brightness includes: The brightness value of each node is calculated based on the image feature analysis results and the peak brightness. The intensity adjustment parameter is determined by setting a threshold based on the image saliency index. Adjusting the node coordinates according to the intensity adjustment parameters includes: adjusting the brightness value of each node according to the intensity adjustment parameters to obtain the adjusted brightness value of each node; The adjusted node coordinates are used to form the mapping curve, which includes: interpolating the adjusted brightness values of each node to obtain the mapping curve.
5. The method according to claim 4, characterized in that, The intensity adjustment parameters are determined by setting a threshold based on the image saliency index, including: Based on the relationship between the image saliency index and the set threshold, the intensity adjustment parameter corresponding to the image saliency index is determined.
6. The method according to claim 4, characterized in that, The step of adjusting the image signal according to the mapping curve to obtain the adjusted image signal includes: Calculate the brightness of each pixel based on the image signal; The mapping value of the brightness is obtained by calculating based on the brightness of each pixel and the mapping curve; The gain coefficient is calculated based on the brightness of each pixel and its mapping value. The image value of each pixel is adjusted according to the gain coefficient.
7. An image processing apparatus, characterized in that, include: The analysis module is used to perform feature analysis based on the received image signal and obtain the image feature analysis results; The acquisition module is used to acquire the corresponding peak brightness based on the image feature analysis results; The calculation module is used to calculate the mapping curve based on the image feature analysis results and the peak brightness; The adjustment module is used to adjust the image signal according to the mapping curve to obtain the adjusted image signal; The calculation module is configured to perform the following steps to calculate a mapping curve based on the image feature analysis results and the peak brightness: calculating the node coordinates of the mapping curve based on the image feature analysis results and the peak brightness, wherein the node coordinates represent the brightness values of each node; adjusting the node coordinates according to the intensity adjustment parameters; and assembling the adjusted node coordinates into the mapping curve. The image feature analysis results include histogram distribution information and image weighted average brightness. The acquisition module includes a first calculation subunit and an acquisition subunit. The first calculation subunit is used to calculate the image information quantity based on the probability density corresponding to the histogram distribution information. The acquisition subunit is used to perform weighted calculation on the image information quantity and the image weighted average brightness using the regularization term of the image information quantity and the regularization term of the image weighted average brightness to obtain the peak brightness. The regularization term of the image information quantity is a parameter used to weigh the influence of the histogram distribution information on the peak brightness, and the regularization term of the image weighted average brightness is a parameter used to weigh the influence of the image weighted average brightness on the peak brightness.
8. The apparatus according to claim 7, characterized in that, The image feature analysis results also include second image feature analysis results, wherein, The calculation module includes a calculation unit, used to calculate the mapping curve based on the second image feature analysis result and the peak brightness.
9. The apparatus according to claim 8, characterized in that, The second image feature analysis result includes image saliency indicators.
10. The apparatus according to claim 9, characterized in that, The computing module includes: a first computing unit, a second computing unit, a third computing unit, and a fourth computing unit, wherein, The first calculation unit is used to calculate the brightness value of each node based on the image feature analysis results and the peak brightness; The second calculation unit is used to determine the intensity adjustment parameter based on the image saliency index by setting a threshold. The third calculation unit is used to adjust the node coordinates according to the intensity adjustment parameters by performing the following steps: adjusting the brightness value of each node according to the intensity adjustment parameters to obtain the adjusted brightness value of each node; The fourth calculation unit is used to form the mapping curve by performing the following steps: interpolating the adjusted node coordinates based on the brightness values of each node to obtain the mapping curve.
11. The apparatus according to claim 10, characterized in that, The second calculation unit includes a second calculation subunit, used to determine the intensity adjustment parameter corresponding to the image saliency index based on the relationship between the image saliency index and the set threshold.
12. The apparatus according to claim 9, characterized in that, The adjustment module includes: a fifth calculation unit, a sixth calculation unit, a seventh calculation unit, and an adjustment unit, wherein... The fifth calculation unit is used to calculate the brightness of each pixel based on the image signal; The sixth calculation unit is used to calculate the mapping value of the brightness based on the brightness of each pixel and the mapping curve; The seventh calculation unit is used to calculate the gain coefficient based on the brightness of each pixel and the mapping value of the brightness. The adjustment unit is used to adjust the image value of each pixel according to the gain coefficient.
13. A non-volatile storage medium, characterized in that, The non-volatile storage medium includes a stored program, wherein, when the program is executed, it controls the device containing the non-volatile storage medium to perform the image processing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Methods and systems for inverse tone mapping
CN105745914A