Image adjusting method and device, chip, display device and electronic device
By segmenting and analyzing the features of the image and adjusting the brightness value of each sub-image, the problems of uneven adjustment and over-processing of bright and dark areas are solved, and the image clarity and detail retention effect are improved.
Patent Information
- Application Number
- CN202211598994.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-12
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2042-12-12
AI Technical Summary
In the existing technology, the dynamic contrast adjustment of bright and dark areas is uneven, resulting in bright areas being brighter and dark areas being darker. In addition, images with a narrow grayscale distribution are easily over-processed, resulting in problems such as "disconnection" and "halo".
By dividing the image to be processed into multiple sub-images, determining the statistical characteristics and grayscale spatial distribution characteristics of each sub-image, adjusting the brightness value of each preset grayscale, and optimizing using dynamic contrast and grayscale histogram, the probability of over-processing is reduced.
It effectively reduces the phenomenon of bright areas being brighter and dark areas being darker, improves image clarity and detail retention, and reduces the possibility of over-processing.
Smart Images

Figure CN116033233B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of information processing, and in particular to an image adjustment method, apparatus, chip, display device, and electronic device. Background Art
[0002] With the development of display devices, more and more display devices begin to support dynamic contrast adjustment. Dynamic contrast refers to the contrast value measured under certain specific conditions. For example, if the brightness of a completely white screen is 200 candelas / square meter and the brightness of a completely black screen is 0.1 candelas / square meter, the dynamic contrast value is 2000:1. Dynamic contrast has obvious practical significance in situations where bright and dark rendering scenes frequently switch between each other. Therefore, how to better adjust the brightness value of an image through dynamic contrast is a technical problem that technicians in this field urgently need to solve. Summary of the Invention
[0003] In view of this, the present disclosure proposes an image adjustment method, which includes: obtaining an image to be processed; dividing the image to be processed into multiple sub-images to be processed according to a preset first segmentation rule; determining the dynamic contrast corresponding to each preset grayscale in a plurality of preset grayscales in each sub-image to be processed; determining the statistical characteristics corresponding to each sub-image to be processed and the grayscale spatial distribution characteristics corresponding to each sub-image to be processed; wherein the statistical characteristics are used to represent the difference between the dynamic contrasts corresponding to each preset grayscale in the same sub-image to be processed; determining the brightness value corresponding to each preset grayscale in each sub-image to be processed according to the statistical characteristics corresponding to each sub-image to be processed, the grayscale spatial distribution characteristics corresponding to each sub-image to be processed, and the dynamic contrast corresponding to each preset grayscale in each sub-image to be processed, and adjusting the brightness value of the pixel points corresponding to each preset grayscale in each sub-image to be processed.
[0004] In a possible implementation, determining the statistical features corresponding to each sub-image to be processed includes:
[0005] An average value and a standard deviation of the grayscale values corresponding to each preset grayscale in each sub-image to be processed are determined, and a ratio between the standard deviation and the average value is used as a statistical feature corresponding to each sub-image to be processed.
[0006] In one possible embodiment, determining the grayscale spatial distribution characteristics corresponding to each sub-image to be processed includes: cropping each sub-image to be processed at least twice according to a second segmentation rule to obtain at least one group of cropped images corresponding to each sub-image to be processed; wherein each group of cropped images includes two cropped images, and the number of pixels in each row and the number of pixels in each column between each cropped image in the same group of cropped images are equal; determining the grayscale difference between the two cropped images in each group of cropped images corresponding to each sub-image to be processed; and determining the grayscale spatial distribution characteristics corresponding to each sub-image to be processed based on the grayscale difference between the two cropped images in each group of cropped images corresponding to each sub-image to be processed.
[0007] In a possible embodiment, the cropping is performed at least twice on each sub-image to be processed according to the second segmentation rule to obtain at least one group of cropped images corresponding to each sub-image to be processed, including at least one of the following items: cropping the first preset number of rows of pixels from the first row to the last row of each sub-image to be processed to obtain the first image corresponding to each sub-image to be processed; cropping the first preset number of rows of pixels from the last row to the first row of each sub-image to be processed to obtain the second image corresponding to each sub-image to be processed; using the first image and the corresponding second image corresponding to each sub-image to be processed as a group of cropped images corresponding to each sub-image to be processed; cropping the first preset number of columns of pixels from the first column to the last column of each sub-image to be processed to obtain the third image corresponding to each sub-image to be processed; cropping the first preset number of columns of pixels from the first column to the last column of each sub-image to be processed to obtain the third image corresponding to each sub-image to be processed; The first preset number of columns of pixels from the last column to the first column of each sub-image to be processed are cropped to obtain the fourth image corresponding to each sub-image to be processed; the third image and the corresponding fourth image corresponding to each sub-image to be processed are used as a group of cropped images corresponding to each sub-image to be processed; the second preset number of rows from the first row to the last row and the second preset number of columns from the first column to the last column of each sub-image to be processed are cropped to obtain the fifth image corresponding to each sub-image to be processed; the second preset number of rows from the last row to the first row and the second preset number of columns from the last column to the first column of each sub-image to be processed are cropped to obtain the sixth image corresponding to each sub-image to be processed; the fifth image and the corresponding sixth image corresponding to each sub-image to be processed are used as a group of cropped images corresponding to each sub-image to be processed.
[0008] In a possible embodiment, determining the dynamic contrast corresponding to each preset grayscale includes: determining a grayscale histogram corresponding to the sub-image to be processed; wherein the grayscale histogram is used to represent the number of pixel points in the sub-image to be processed distributed on the multiple preset grayscales; adjusting the number of pixel points of each preset grayscale in the grayscale histogram whose number of pixel points is greater than a preset threshold to the preset threshold; determining a cumulative distribution histogram corresponding to the sub-image to be processed based on the adjusted grayscale histogram; wherein the cumulative distribution histogram is used to represent the total number of pixel points whose grayscale values are less than or equal to each preset grayscale; determining the dynamic contrast corresponding to each preset grayscale in the sub-image to be processed based on the cumulative distribution histogram.
[0009] According to another aspect of the present disclosure, an image adjustment device is provided, which includes: an image acquisition module for acquiring an image to be processed; an image division module for dividing the image to be processed into multiple sub-images to be processed according to a preset first segmentation rule; a dynamic contrast determination module for determining the dynamic contrast corresponding to each preset grayscale in a plurality of preset grayscales in each sub-image to be processed; a feature determination module for determining the statistical features corresponding to each sub-image to be processed and the grayscale spatial distribution features corresponding to each sub-image to be processed; wherein the statistical features are used to represent the differences between the dynamic contrasts corresponding to each preset grayscale in the same sub-image to be processed; and a brightness adjustment module for determining the brightness value corresponding to each preset grayscale in each sub-image to be processed based on the statistical features corresponding to each sub-image to be processed, the grayscale spatial distribution features corresponding to each sub-image to be processed, and the dynamic contrast corresponding to each preset grayscale in each sub-image to be processed, and adjusting the brightness value of the pixel points corresponding to each preset grayscale in each sub-image to be processed.
[0010] According to another aspect of the present disclosure, a chip is provided, wherein the chip is configured to execute any one of the image adjustment methods.
[0011] According to another aspect of the present disclosure, a display device is provided, comprising a plurality of display units and at least one of the aforementioned adjustment devices, or comprising the aforementioned chip.
[0012] In one possible embodiment, the display unit includes a display panel, and the display panel includes at least one of a liquid crystal display panel, a micro light-emitting diode display panel, a light-emitting diode display panel, a mini light-emitting diode display panel, a quantum dot light-emitting diode display panel, an organic light-emitting diode display panel, a cathode ray tube display panel, a digital light processing display panel, a field emission display panel, a plasma display panel, an electrophoretic display panel, an electrowetting display panel, and a small-pitch display panel.
[0013] According to another aspect of the present disclosure, an electronic device is provided, comprising the display device.
[0014] According to another aspect of the present disclosure, an image adjustment device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to implement the above-mentioned image adjustment method when executing the instructions stored in the memory.
[0015] According to another aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions implement the above method when executed by a processor.
[0016] According to another aspect of the present disclosure, a computer program product is provided, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0017] An image adjustment method provided by an embodiment of the present disclosure obtains an image to be processed. Then, based on a preset first segmentation rule, the image to be processed is divided into multiple sub-images to be processed. Then, for each of multiple preset grayscales in each sub-image to be processed, the dynamic contrast corresponding to each preset grayscale is determined. Then, statistical features corresponding to each sub-image to be processed and grayscale spatial distribution features corresponding to each sub-image to be processed are determined. Based on the statistical features corresponding to each sub-image to be processed, the grayscale spatial distribution features corresponding to each sub-image to be processed, and the dynamic contrast corresponding to each preset grayscale in each sub-image to be processed, the brightness value corresponding to each preset grayscale in each sub-image to be processed is determined, and the brightness value of the pixel corresponding to each preset grayscale in each sub-image to be processed is adjusted. The embodiment of the present disclosure can adjust each sub-image to reduce the possibility of brighter bright areas and darker dark areas. Furthermore, the embodiment of the present disclosure can adjust the dynamic contrast of the sub-image to be processed based on the grayscale spatial distribution features and statistical features of the sub-image to be processed, thereby reducing the probability of over-processing of the image to be processed.
[0018] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
[0020] Figure 1 A reference schematic diagram of an image adjustment method in related art provided according to an embodiment of the present disclosure is shown.
[0021] Figure 2 A flowchart of an image adjustment method provided according to an embodiment of the present disclosure is shown.
[0022] Figure 3 A reference schematic diagram for adjusting the number of pixels of each preset grayscale provided according to an embodiment of the present disclosure is shown.
[0023] Figure 4 A reference schematic diagram for determining grayscale spatial distribution characteristics provided according to an embodiment of the present disclosure is shown.
[0024] Figure 5 A reference schematic diagram illustrating the adjustment effect of an image adjustment method provided according to an embodiment of the present disclosure is shown.
[0025] Figure 6 A block diagram of an image adjustment device provided according to an embodiment of the present disclosure is shown.
[0026] Figure 7 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0027] Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
[0028] In the description of the present disclosure, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the present disclosure and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present disclosure.
[0029] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. Throughout the present disclosure, "plurality" means two or more, unless otherwise specifically defined.
[0030] In this disclosure, unless otherwise expressly specified or limited, terms such as "mounted," "connected," "connect," and "fixed" should be understood broadly. For example, they may refer to fixed connections, detachable connections, or integration; mechanical connections or electrical connections; direct connections or indirect connections through an intermediate medium; and internal connections between two components or interactions between two components. Those skilled in the art will understand the specific meanings of these terms in this disclosure based on specific circumstances.
[0031] The term "and / or" herein simply describes an association relationship between associated objects, indicating that three relationships can exist. For example, "A and / or B" can represent the existence of three situations: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" herein refers to any combination of at least two of any one or more of a plurality of items. For example, "at least one of A, B, and C" can represent any one or more elements selected from the set consisting of A, B, and C.
[0032] See Figure 1 As shown, Figure 1 A reference diagram of an image adjustment method in a related art according to an embodiment of the present disclosure is shown. Figure 1 In the related art, the dynamic contrast adjustment of the image to be processed is usually performed through the histogram equalization algorithm. When the image to be processed contains obvious bright areas or dark areas, it usually causes the bright area to become brighter after the brightness of the dark area is increased, or the dark area to become darker after the brightness of the bright area is reduced. In addition, when the image to be processed is an image with a narrow grayscale distribution, such as images of blue sky and white clouds, or images of deserts, these images will be forcibly stretched, resulting in over-processing phenomena such as "faults" and "halos". For example, taking the two prescription box areas in the figure as an example, the related art will enhance the details of the right area, that is, the distinguishability of the right area will be improved, while the left area, which is bright enough to begin with, will appear a certain degree of blur after the adjustment, that is, it is too bright.
[0033] In view of this, embodiments of the present disclosure provide an image adjustment method, which can obtain an image to be processed. Then, based on a preset first segmentation rule, the image to be processed is divided into multiple sub-images to be processed. Then, for each of the multiple preset grayscales in each sub-image to be processed, the dynamic contrast corresponding to each preset grayscale is determined. Then, statistical features corresponding to each sub-image to be processed and grayscale spatial distribution features corresponding to each sub-image to be processed are determined. Based on the statistical features corresponding to each sub-image to be processed, the grayscale spatial distribution features corresponding to each sub-image to be processed, and the dynamic contrast corresponding to each preset grayscale in each sub-image to be processed, the brightness value corresponding to each preset grayscale in each sub-image to be processed is determined, and the brightness value of the pixel corresponding to each preset grayscale in each sub-image to be processed is adjusted. Embodiments of the present disclosure can adjust each sub-image to reduce the possibility of brighter bright areas and darker dark areas. Furthermore, embodiments of the present disclosure can adjust the dynamic contrast of the sub-image to be processed based on the grayscale spatial distribution features and statistical features of the sub-image to be processed, thereby reducing the probability of over-processing of the image to be processed.
[0034] See Figure 2 As shown, Figure 2 A flow chart of an image adjustment method according to an embodiment of the present disclosure is shown. Figure 2 As shown, the adjustment method includes: Step S100, obtaining an image to be processed. For example, the image to be processed may be image data that can be processed by any display device in the related art, and the embodiment of the present disclosure does not limit this.
[0035] Step S200, according to a preset first segmentation rule, the image to be processed is divided into a plurality of sub-images to be processed. Exemplarily, the above-mentioned first segmentation rule may include: the total number of segments of the image to be processed, the number of segments of the image to be processed in the horizontal direction, the number of segments of the image to be processed in the vertical direction, the size of the sub-image to be processed in the horizontal direction, the size of the sub-image to be processed in the vertical direction, etc. In one example, the number of pixels in each row (or horizontal direction) between the above-mentioned sub-images to be processed is the same, and the number of pixels in each column (or vertical direction) is the same. Developers can decide according to actual conditions, and the embodiments of the present disclosure do not impose any restrictions on this.
[0036] Step S300 determines the dynamic contrast ratio corresponding to each of a plurality of preset grayscales in each sub-image to be processed. For example, the plurality of preset grayscales may be sampled grayscales preset by a developer from all grayscales of the image to be processed. The dynamic contrast ratio may be represented by a DCR (Dynamic Contrast Ratio) value in related art.
[0037] In one possible embodiment, step S300 may include determining a grayscale histogram corresponding to the sub-image to be processed. The grayscale histogram represents the number of pixels in the sub-image to be processed distributed across the plurality of preset grayscales. For example, each pixel may correspond to a different grayscale value to represent the differences between each pixel in the grayscale space. The process of constructing the grayscale histogram may refer to related art and is not limited in this embodiment of the present disclosure. For example, the total number of grayscales may vary depending on the image, for example, 8, 256, or 512. The higher the total number of grayscales, the more refined the image's appearance in the grayscale space. The process of selecting the plurality of preset grayscales is not limited in this embodiment of the present disclosure. For example, the plurality of preset grayscales may be obtained by equally dividing the total number of grayscales. Each preset grayscale may correspond to a grayscale value, and pixels in the sub-image to be processed with the same grayscale value may be used as pixels corresponding to the preset grayscale. Then, the number of pixels of each preset gray level in the grayscale histogram whose number of pixels is greater than the preset threshold is adjusted to the preset threshold. Figure 3 As shown, Figure 3 A reference schematic diagram for adjusting the number of pixels of each preset grayscale provided according to an embodiment of the present disclosure is shown. Figure 3 The horizontal axis represents the numbers of multiple preset gray levels, and the vertical axis represents the number of pixels. For example, if the number of pixels corresponding to a preset gray level is higher than a preset threshold (or Figure 3 (the preset pixel number threshold in the grayscale histogram), the pixels above the preset threshold can be evenly distributed (i.e., balanced in the figure) to other preset grayscales until the number of pixels corresponding to each preset grayscale is no higher than the preset threshold. This can enhance the contrast of the sub-image to be processed. Then, based on the adjusted grayscale histogram, the cumulative distribution histogram corresponding to the sub-image to be processed is determined. The cumulative distribution histogram is used to represent the total number of pixels whose grayscale values are less than or equal to each preset grayscale. For example, if Hist(i) represents the total number of pixels corresponding to the i-th preset grayscale in the multiple preset grayscales in the grayscale histogram, and CDF(i) represents the value in the cumulative distribution histogram corresponding to the i-th preset grayscale, then CDF(i) can be expressed as CDF(i)=Hist(i)+Hist(i-1)+…+Hist(1). Finally, based on the cumulative distribution histogram, the dynamic contrast corresponding to each preset grayscale in the sub-image to be processed is determined. For example, if DCR(i) is used to represent the dynamic contrast ratio corresponding to the i-th preset grayscale, then DCR(i) can be expressed as: DCR(i)=(2 databits-1)*CDF(i) / (Width*Height), where Width and Height represent the width and height of the sub-image to be processed (the unit can be the number of pixels), 2 databits is the total number of gray levels, databits can be any positive integer.
[0038] Continue reading Figure 2 In step S400, statistical features corresponding to each sub-image to be processed and grayscale spatial distribution features corresponding to each sub-image to be processed are determined. The statistical features represent the difference in dynamic contrast between each preset grayscale within the same sub-image to be processed. For example, the statistical features can be obtained using standard deviation coefficients or mean difference coefficients as described in related art, and are not limited in this regard in the presently disclosed embodiment.
[0039] In one possible implementation, determining the statistical feature corresponding to each sub-image to be processed in step S400 may include determining the average value and standard deviation of the grayscale values corresponding to each preset grayscale in each sub-image to be processed, and using the ratio between the standard deviation and the average value as the statistical feature corresponding to each sub-image to be processed. For example, the statistical feature Coe_dis may be expressed as: in, σ is used to represent the standard deviation, is the average value of the grayscale values of the plurality of preset grayscales, and n is the total number of the plurality of preset grayscales.
[0040] In one possible implementation, determining the grayscale spatial distribution characteristics corresponding to each sub-image to be processed in step S400 may include: cropping each sub-image to be processed at least twice according to the second segmentation rule to obtain at least one group of cropped images corresponding to each sub-image to be processed. Each group of cropped images includes two cropped images, and each cropped image in the same group of cropped images has an equal number of pixels per row and an equal number of pixels per column.
[0041] See Figure 4 , Figure 4 FIG2 shows a reference schematic diagram of determining grayscale spatial distribution characteristics according to an embodiment of the present disclosure. Figure 4Taking an image with a sub-image to be processed of 4 pixels by 5 pixels as an example, each square represents a pixel, and the number in the square represents the grayscale value corresponding to the pixel. The white squares in the first to sixth images represent cropped pixels. In one possible embodiment, cropping each sub-image to be processed at least twice according to the second segmentation rule to obtain at least one set of cropped images corresponding to each sub-image to be processed may include: cropping a first preset number of rows of pixels from the first row to the last row of each sub-image to be processed to obtain the first image corresponding to each sub-image to be processed. Cropping a first preset number of rows of pixels from the last row to the first row of each sub-image to be processed to obtain the second image corresponding to each sub-image to be processed. The first image and the corresponding second image corresponding to each sub-image to be processed are used as a set of cropped images corresponding to each sub-image to be processed. By way of example, the specific value of the first preset number of rows is not limited in this disclosed embodiment and can be set by the developer according to actual needs. In a possible embodiment, the cropping of each sub-image to be processed at least twice according to the second segmentation rule to obtain at least one group of cropped images corresponding to each sub-image to be processed may include: cropping the first preset number of columns of pixels from the first column to the last column of each sub-image to be processed to obtain the third image corresponding to each sub-image to be processed. Cropping the first preset number of columns of pixels from the last column to the first column of each sub-image to be processed to obtain the fourth image corresponding to each sub-image to be processed. The third image and the corresponding fourth image corresponding to each sub-image to be processed are used as a group of cropped images corresponding to each sub-image to be processed. For example, the specific value of the first preset number of columns mentioned above is not limited in the embodiment of the present disclosure, and the developer can set it according to actual needs. In one possible embodiment, cropping each sub-image to be processed at least twice according to the second segmentation rule to obtain at least one set of cropped images corresponding to each sub-image to be processed may include: cropping a second preset number of rows from the first row to the last row and a second preset number of columns from the first column to the last column of each sub-image to be processed to obtain a fifth image corresponding to each sub-image to be processed. Cropping a second preset number of rows from the last row to the first row and a second preset number of columns from the last column to the first column of each sub-image to be processed to obtain a sixth image corresponding to each sub-image to be processed. The fifth and sixth images corresponding to each sub-image to be processed serve as a set of cropped images corresponding to each sub-image to be processed. By way of example, the specific values of the second preset number of rows and the second preset number of columns are not limited in this disclosed embodiment and can be set by the developer according to actual needs. The grayscale difference between two cropped images in each set of cropped images corresponding to each sub-image to be processed is then determined.Exemplarily, the grayscale difference can be expressed as the sum of the absolute values of the grayscale value differences. Here, taking the first column of pixels of the first image and the second image as an example, the grayscale values of the first column of pixels of the first image are 1, 1, 5, 6, and 8, respectively, and the grayscale values of the first column of pixels of the second image are 2, 3, 5, 7, and 1, respectively. Then, the grayscale differences of the first columns of pixels of the first image and the second image are |1-2|, |1-3|, |5-5|, |6-7|, and |8-1|, that is, 1, 2, 0, 1, and 7. The sum of the grayscale differences in the first column is 11, and the grayscale differences of all pixels are calculated based on this. Finally, based on the grayscale differences of the two cropped images in each group of cropped images corresponding to each sub-image to be processed, the grayscale spatial distribution characteristics corresponding to each sub-image to be processed are determined. If the grayscale spatial distribution characteristic is Coe_spa, then Coe_spa can be expressed by the following formula: Where Sum_Diff_x represents the sum of the grayscale differences between the first and second images, Size_x represents the number of pixels in a row of the first and second images, Summ_Diff_y represents the sum of the grayscale differences between the third and fourth images, Size_y represents the number of pixels in a column of the third and fourth images, Summ_Diff_xy represents the sum of the grayscale differences between the fifth and sixth images, and Size_xy represents the sum of the number of pixels in a row and a column in the fifth or sixth image minus the number of overlapping pixels (in this example, the two overlap by one pixel, so 1 is subtracted). Continuing with the above example, Sum_Diff_x is 38, Size_x is 5, Summ_Diff_y is 39, Size_y is 4, Summ_Diff_xy is 43, and Size_xy is 8.
[0042] Continue reading Figure 2 In step S500, based on the statistical features corresponding to each sub-image to be processed, the grayscale spatial distribution features corresponding to each sub-image to be processed, and the dynamic contrast corresponding to each preset grayscale in each sub-image to be processed, the brightness value corresponding to each preset grayscale in each sub-image to be processed is determined, and the brightness value of the pixel corresponding to each preset grayscale in each sub-image to be processed is adjusted. In one example, the new brightness value Tile corresponding to each preset grayscale can be determined by the following formula mapping , Tile mapping =DCR LUT +(DCR LUT -X)(C1*Coe_dis+C2*Coe_spa), where DCR LUTThat is, the dynamic contrast corresponding to a preset grayscale is the brightness value determined by a preset lookup table. The above lookup table records the correspondence between dynamic contrast and brightness and can be set by the developer. X is the horizontal coordinate value of the preset grayscale in the grayscale histogram, C1 is the first empirical constant, and C2 is the second empirical constant. For example, the value of C1 can be 1.2, and the value of C2 can be any value between 0 and 10. The specific setting can be made by the developer according to the actual situation. In one example, since the above method determines the number of pixels corresponding to each preset grayscale, and the preset grayscale is a manually set sampling grayscale, the brightness value of the pixel corresponding to each grayscale in the sub-image to be processed can be determined according to the order between the grayscales through the interpolation algorithm in the relevant technology. The embodiment of the present disclosure will not be described in detail here.
[0043] See Figure 5 As shown, Figure 5 A reference diagram showing the adjustment effect of the image adjustment method provided according to an embodiment of the present disclosure, combined with Figure 5 The image on the left is the image before adjustment, and the image on the right is the image after adjustment. It can be seen that the embodiment of the present disclosure can improve the clarity of the image in the area with narrow grayscale distribution.
[0044] See Figure 6 As shown, Figure 6 A block diagram of an image adjustment device according to an embodiment of the present disclosure is shown. Figure 6 As shown, the adjustment device 100 includes: an image acquisition module 110 for acquiring an image to be processed; an image segmentation module 120 for dividing the image to be processed into multiple sub-images to be processed according to a preset first segmentation rule; a dynamic contrast determination module 130 for determining the dynamic contrast corresponding to each of the multiple preset grayscales in each sub-image to be processed; a feature determination module 140 for determining statistical features corresponding to each sub-image to be processed and grayscale spatial distribution features corresponding to each sub-image to be processed. The statistical features represent the differences between the dynamic contrasts corresponding to each preset grayscale in the same sub-image to be processed; and a brightness adjustment module 150 for determining the brightness value corresponding to each preset grayscale in each sub-image to be processed based on the statistical features corresponding to each sub-image to be processed, the grayscale spatial distribution features corresponding to each sub-image to be processed, and the dynamic contrast corresponding to each preset grayscale in each sub-image to be processed, and adjusting the brightness value of the pixels corresponding to each preset grayscale in each sub-image to be processed.
[0045] In a possible implementation, determining the statistical features corresponding to each sub-image to be processed includes:
[0046] An average value and a standard deviation of the grayscale values corresponding to each preset grayscale in each sub-image to be processed are determined, and a ratio between the standard deviation and the average value is used as a statistical feature corresponding to each sub-image to be processed.
[0047] In one possible embodiment, determining the grayscale spatial distribution characteristics corresponding to each sub-image to be processed includes: cropping each sub-image to be processed at least twice according to a second segmentation rule to obtain at least one group of cropped images corresponding to each sub-image to be processed; wherein each group of cropped images includes two cropped images, and the number of pixels in each row and the number of pixels in each column between each cropped image in the same group of cropped images are equal; determining the grayscale difference between the two cropped images in each group of cropped images corresponding to each sub-image to be processed; and determining the grayscale spatial distribution characteristics corresponding to each sub-image to be processed based on the grayscale difference between the two cropped images in each group of cropped images corresponding to each sub-image to be processed.
[0048] In a possible embodiment, the cropping is performed at least twice on each sub-image to be processed according to the second segmentation rule to obtain at least one group of cropped images corresponding to each sub-image to be processed, including at least one of the following items: cropping the first preset number of rows of pixels from the first row to the last row of each sub-image to be processed to obtain the first image corresponding to each sub-image to be processed; cropping the first preset number of rows of pixels from the last row to the first row of each sub-image to be processed to obtain the second image corresponding to each sub-image to be processed; using the first image and the corresponding second image corresponding to each sub-image to be processed as a group of cropped images corresponding to each sub-image to be processed; cropping the first preset number of columns of pixels from the first column to the last column of each sub-image to be processed to obtain the third image corresponding to each sub-image to be processed; cropping the first preset number of columns of pixels from the first column to the last column of each sub-image to be processed to obtain the third image corresponding to each sub-image to be processed; The first preset number of columns of pixels from the last column to the first column of each sub-image to be processed are cropped to obtain the fourth image corresponding to each sub-image to be processed; the third image and the corresponding fourth image corresponding to each sub-image to be processed are used as a group of cropped images corresponding to each sub-image to be processed; the second preset number of rows from the first row to the last row and the second preset number of columns from the first column to the last column of each sub-image to be processed are cropped to obtain the fifth image corresponding to each sub-image to be processed; the second preset number of rows from the last row to the first row and the second preset number of columns from the last column to the first column of each sub-image to be processed are cropped to obtain the sixth image corresponding to each sub-image to be processed; the fifth image and the corresponding sixth image corresponding to each sub-image to be processed are used as a group of cropped images corresponding to each sub-image to be processed.
[0049] In a possible embodiment, determining the dynamic contrast corresponding to each preset grayscale includes: determining a grayscale histogram corresponding to the sub-image to be processed; wherein the grayscale histogram is used to represent the number of pixel points in the sub-image to be processed distributed on the multiple preset grayscales; adjusting the number of pixel points of each preset grayscale in the grayscale histogram whose number of pixel points is greater than a preset threshold to the preset threshold; determining a cumulative distribution histogram corresponding to the sub-image to be processed based on the adjusted grayscale histogram; wherein the cumulative distribution histogram is used to represent the total number of pixel points whose grayscale values are less than or equal to each preset grayscale; determining the dynamic contrast corresponding to each preset grayscale in the sub-image to be processed based on the cumulative distribution histogram.
[0050] For example, the electronic devices in this embodiment include but are not limited to desktop computers, televisions, mobile devices with large screens such as mobile phones, tablet computers, and other common electronic devices that require multiple chips to be cascaded to achieve driving.
[0051] Exemplarily, the electronic device may also be user equipment (UE), mobile device, user terminal, terminal, handheld device, computing device or vehicle-mounted device, etc. Exemplarily, some examples of terminals include: display, smart phone or portable device, mobile phone, tablet computer, laptop computer, PDA, mobile Internet device (MID), wearable device, virtual reality (VR) device, augmented reality (AR) device, wireless terminal in industrial control (Industrial Control), wireless terminal in self-driving, wireless terminal in remote medical surgery, wireless terminal in smart grid (Smart Grid), wireless terminal in transportation safety (Transportation Safety), wireless terminal in smart city (Smart City), wireless terminal in smart home (Smart Home), wireless terminal in Internet of Vehicles, etc. For example, the server may be a local server or a cloud server.
[0052] Figure 7 FIG1 shows a block diagram of an electronic device 1900 according to an embodiment of the present disclosure. For example, the electronic device 1900 may be provided as a server or a terminal device. For example, the electronic device may include the adjustment device or the display device. Figure 7The electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute the instructions to perform the above-described method.
[0053] The electronic device 1900 may further include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.
[0054] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.
[0055] The above description is merely an exemplary embodiment of the present invention and is not intended to limit the scope of protection of the present invention. The scope of protection of the present invention is determined by the appended claims.
[0056] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0057] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0058] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction contains one or more executable instructions for realizing the prescribed logical function. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the prescribed function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0059] While various embodiments of the present disclosure have been described above, the above descriptions are illustrative, non-exhaustive, and not intended to be limiting of the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or improvements to existing technologies, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for adjusting an image, characterized in that: The adjustment method includes: Get the image to be processed; Dividing the image to be processed into a plurality of sub-images to be processed according to a preset first segmentation rule; For each preset grayscale in a plurality of preset grayscales in each sub-image to be processed, determining a dynamic contrast ratio corresponding to each preset grayscale; Determining statistical features corresponding to each of the sub-images to be processed and grayscale spatial distribution features corresponding to each of the sub-images to be processed; wherein the statistical features are used to represent the difference between the dynamic contrasts corresponding to each of the preset grayscales in the same sub-image to be processed; Determining the brightness value corresponding to each preset grayscale in each sub-image to be processed based on the statistical characteristics corresponding to each sub-image to be processed, the grayscale spatial distribution characteristics corresponding to each sub-image to be processed, and the dynamic contrast corresponding to each preset grayscale in each sub-image to be processed, and adjusting the brightness value of the pixel corresponding to each preset grayscale in each sub-image to be processed; The step of determining the dynamic contrast ratio corresponding to each preset grayscale includes: Determining a grayscale histogram corresponding to the sub-image to be processed; wherein the grayscale histogram is used to represent the number of pixel points in the sub-image to be processed distributed across the plurality of preset grayscales; Adjusting the number of pixels of each preset grayscale in the grayscale histogram whose number of pixels is greater than a preset threshold to the preset threshold; Determining a cumulative distribution histogram corresponding to the sub-image to be processed based on the adjusted grayscale histogram; wherein the cumulative distribution histogram is used to represent the total number of pixels whose grayscale values are less than or equal to each preset grayscale; The dynamic contrast corresponding to each preset grayscale in the sub-image to be processed is determined according to the cumulative distribution histogram.
2. The adjustment method according to claim 1, wherein: The determining of the statistical features corresponding to each sub-image to be processed includes: An average value and a standard deviation of the grayscale values corresponding to each preset grayscale in each sub-image to be processed are determined, and a ratio between the standard deviation and the average value is used as a statistical feature corresponding to each sub-image to be processed.
3. The adjustment method according to claim 2, wherein: The step of determining the grayscale spatial distribution characteristics corresponding to each sub-image to be processed includes: performing at least two cropping operations on each of the sub-images to be processed according to the second segmentation rule to obtain at least one group of cropped images corresponding to each of the sub-images to be processed; wherein each group of cropped images includes two cropped images, and each cropped image in the same group of cropped images has an equal number of pixels in each row and an equal number of pixels in each column; Determining the grayscale difference between two cropped images in each group of cropped images corresponding to each sub-image to be processed; The grayscale spatial distribution feature corresponding to each sub-image to be processed is determined according to the grayscale difference between two cropped images in each group of cropped images corresponding to each sub-image to be processed.
4. The adjustment method according to claim 3, wherein: The step of performing at least two cropping operations on each sub-image to be processed according to the second segmentation rule to obtain at least one group of cropped images corresponding to each sub-image to be processed includes at least one of the following: Clipping a first preset number of rows of pixels from the first row to the last row of each sub-image to be processed to obtain a first image corresponding to each sub-image to be processed; clipping a first preset number of rows of pixels from the last row to the first row of each sub-image to be processed to obtain a second image corresponding to each sub-image to be processed; using the first image and the second image corresponding to each sub-image to be processed as a group of cropped images corresponding to each sub-image to be processed; Cropping a first preset number of columns of pixels from the first column to the last column of each sub-image to be processed to obtain a third image corresponding to each sub-image to be processed; cropping a first preset number of columns of pixels from the last column to the first column of each sub-image to be processed to obtain a fourth image corresponding to each sub-image to be processed; and using the third image and the corresponding fourth image corresponding to each sub-image to be processed as a set of cropped images corresponding to each sub-image to be processed; Crop the second preset number of rows from the first row to the last row and the second preset number of columns from the first column to the last column of each sub-image to be processed to obtain a fifth image corresponding to each sub-image to be processed; crop the second preset number of rows from the last row to the first row and the second preset number of columns from the last column to the first column of each sub-image to be processed to obtain a sixth image corresponding to each sub-image to be processed; and use the fifth image and the corresponding sixth image corresponding to each sub-image to be processed as a set of cropped images corresponding to each sub-image to be processed.
5. An image adjustment device, characterized in that: The adjusting device comprises: An image acquisition module, used to acquire images to be processed; An image segmentation module, configured to segment the image to be processed into a plurality of sub-images to be processed according to a preset first segmentation rule; a dynamic contrast determination module, configured to determine, for each preset grayscale in a plurality of preset grayscales in each sub-image to be processed, a dynamic contrast corresponding to the preset grayscale; a feature determination module, configured to determine statistical features corresponding to each sub-image to be processed and grayscale spatial distribution features corresponding to each sub-image to be processed; wherein the statistical features are used to represent the difference between the dynamic contrasts corresponding to each preset grayscale in the same sub-image to be processed; a brightness adjustment module, configured to determine the brightness value corresponding to each preset grayscale in each sub-image to be processed based on the statistical characteristics corresponding to each sub-image to be processed, the grayscale spatial distribution characteristics corresponding to each sub-image to be processed, and the dynamic contrast corresponding to each preset grayscale in each sub-image to be processed, and adjust the brightness value of the pixel corresponding to each preset grayscale in each sub-image to be processed; The step of determining the dynamic contrast ratio corresponding to each preset grayscale includes: Determining a grayscale histogram corresponding to the sub-image to be processed; wherein the grayscale histogram is used to represent the number of pixel points in the sub-image to be processed distributed across the plurality of preset grayscales; Adjusting the number of pixels of each preset grayscale in the grayscale histogram whose number of pixels is greater than a preset threshold to the preset threshold; Determining a cumulative distribution histogram corresponding to the sub-image to be processed based on the adjusted grayscale histogram; wherein the cumulative distribution histogram is used to represent the total number of pixels whose grayscale values are less than or equal to each preset grayscale; The dynamic contrast corresponding to each preset grayscale in the sub-image to be processed is determined according to the cumulative distribution histogram.
6. A chip, characterized in that: The chip is used to execute the image adjustment method according to any one of claims 1 to 4.
7. A display device, characterized in that: The device comprises a plurality of display units and at least one image adjustment device according to claim 5 , or comprises at least one chip according to claim 6 .
8. The display device according to claim 7, wherein The display unit includes a display panel, and the display panel includes at least one of a liquid crystal display panel, a micro light-emitting diode display panel, a light-emitting diode display panel, a mini light-emitting diode display panel, a quantum dot light-emitting diode display panel, an organic light-emitting diode display panel, a cathode ray tube display panel, a digital light processing display panel, a field emission display panel, a plasma display panel, an electrophoretic display panel, an electrowetting display panel and a small-pitch display panel.
9. An electronic device, characterized in that: Comprising the display device according to claim 7 or 8.
Citation Information
Patent Citations
Method for adjusting image brightness and contrast ratio, video processor and display device
CN106531092A
Method and device for adjusting dynamic contrast
CN107452355A