WO2018086388A1 - Image processing device and method, and a liquid crystal display device - Google Patents

Image processing device and method, and a liquid crystal display device Download PDF

Info

Publication number
WO2018086388A1
WO2018086388A1 PCT/CN2017/095337 CN2017095337W WO2018086388A1 WO 2018086388 A1 WO2018086388 A1 WO 2018086388A1 CN 2017095337 W CN2017095337 W CN 2017095337W WO 2018086388 A1 WO2018086388 A1 WO 2018086388A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
gray value
gray
brightness
critical
Prior art date
Application number
PCT/CN2017/095337
Other languages
French (fr)
Chinese (zh)
Inventor
王烨东
刁玉洁
Original Assignee
青岛海信电器股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 青岛海信电器股份有限公司 filed Critical 青岛海信电器股份有限公司
Publication of WO2018086388A1 publication Critical patent/WO2018086388A1/en

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/20Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
    • G09G3/34Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters by control of light from an independent source
    • G09G3/36Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters by control of light from an independent source using liquid crystals
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2320/00Control of display operating conditions
    • G09G2320/06Adjustment of display parameters
    • G09G2320/0626Adjustment of display parameters for control of overall brightness
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2320/00Control of display operating conditions
    • G09G2320/06Adjustment of display parameters
    • G09G2320/066Adjustment of display parameters for control of contrast

Definitions

  • the present disclosure relates to the field of image signal processing technologies, and in particular, to an image processing apparatus and method, and a liquid crystal display device.
  • the liquid crystal display mainly includes a liquid crystal module 1 , a backlight module (not shown), a video processor 4 , and the like.
  • the liquid crystal module 1 mainly includes a liquid crystal panel 2 and a thin film transistor-liquid crystal display (a thin film Transistor-Liquid Crystal Display (TFT-LCD) driving circuit 3 is provided with a liquid crystal display unit 21 arranged in an array on the liquid crystal panel 2, and the TFT-LCD driving circuit 3 is electrically connected to the liquid crystal panel 2;
  • TFT-LCD thin film Transistor-Liquid Crystal Display
  • the video processor 4 receives an image signal transmitted by the signal source, analyzes a digital signal such as a luminance signal and a chrominance signal in the image signal, and transmits the digital signal to the TFT-
  • the LCD drive circuit 3 the TFT-LCD drive circuit 3 converts these digital signals into electrical signals, and drives the liquid crystal display unit 21 to display different brightness and chromaticity. Therefore, when the TFT-LCD driving circuit
  • the present disclosure provides an image processing apparatus and method, and a liquid crystal display device.
  • an image processing apparatus including:
  • At least one processor and,
  • the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
  • some embodiments of the present disclosure provide an image processing method, including: acquiring gray values of all pixels in a current image frame;
  • some embodiments of the present disclosure provide a liquid crystal display device, including: a liquid crystal module, a backlight module, a video processor, and a memory storing instructions executable by the video processor, the video processor Electrically connecting with the liquid crystal module and the backlight module, and controlling display of the liquid crystal module and illumination of the backlight module;
  • the instructions are executed by the video processor to enable the video processor to:
  • FIG. 1 is a schematic structural view of a liquid crystal display provided by the related art
  • FIG. 2 is a schematic flowchart diagram of an image processing method according to some embodiments of the present disclosure
  • FIG. 3 is a schematic flowchart of a method for determining a critical contrast parameter value and/or a critical brightness parameter value according to some embodiments of the present disclosure
  • FIG. 4 is a schematic flowchart of a method for determining a first gray value and a second gray value according to some embodiments of the present disclosure
  • FIG. 5 is a schematic flowchart of a method for determining a maximum gray value and a second largest gray value according to a gray histogram according to some embodiments of the present disclosure
  • FIG. 6 is a schematic flowchart diagram of another method for determining a first gray value and a second gray value according to some embodiments of the present disclosure
  • FIG. 7 is a schematic structural diagram of an image processing apparatus according to some embodiments of the present disclosure.
  • the liquid crystal panel is mainly composed of two glass substrates sandwiching a sandwich layer composed of a polarizing plate, a liquid crystal layer and a color filter, wherein the polarizing plate determines what kind of light can pass, and the liquid crystal layer determines how many Light can pass, and the color filter determines what color of light is generated.
  • the liquid crystal is poured between two well-formed planes to form a liquid crystal layer.
  • the two parallel planes are provided with grooves, and the grooves on the individual planes are all parallel, but the grooves on the two parallel planes are mutually vertical.
  • the backlight module emits light and generates uniform light. The light passes through the liquid crystal panel.
  • the TFT-LCD drive circuit controls the brightness of the pixel dots by controlling the voltage applied to the liquid crystal molecules.
  • Adjustment enhancement wherein Gain refers to a contrast parameter, Offset refers to a brightness parameter, and Y(in) and Y(out) refer to an input gradation value and a brightness-adjusted output gradation value of each pixel of the image signal, respectively.
  • the video processor parses Y(in), the Y(in) is enhanced by the brightness adjustment relation to obtain the enhanced Y(out).
  • the video processor sends Y(out) to the TFT-LCD driving circuit in the liquid crystal display, and the TFT-LCD driving circuit converts Y(out) into an electrical signal to drive the liquid crystal display unit, thereby enhancing the display brightness and contrast of the liquid crystal display.
  • the TFT-LCD driving circuit converts Y(out) into an electrical signal to drive the liquid crystal display unit, thereby enhancing the display brightness and contrast of the liquid crystal display.
  • the default values of the contrast parameter Gain and the brightness parameter Offset are set, so that Y(in) does not appear saturated after the brightness is enhanced, thereby ensuring the integrity of the gray scale of the display screen.
  • each liquid crystal display unit in the liquid crystal display has a maximum gray value and a minimum gray value that can be achieved.
  • the gray value of each pixel is enhanced after the brightness adjustment relationship is enhanced.
  • the gray value is up to 255.
  • the output gray value is greater than 255, the output gray value is 255. Therefore, when the user adjusts the brightness or the contrast by the button on the remote controller or the liquid crystal display to increase the brightness parameter or the contrast parameter, the pixel of the high-intensity gray-scale portion may have a maximum gray value after the adjustment ( Exemplarily, the 245 grayscale before adjustment and the 235 grayscale before adjustment will take 255 grayscale after brightness enhancement.
  • the dark field enhancement will achieve the lowest gray value (exemplary, the 5 gray scale before adjustment and the 15 gray scale before adjustment, will take 0 after the brightness adjustment Gray scale), so that the display screen appears high gray scale merge or low gray scale merge phenomenon, resulting in poor display layering.
  • Some embodiments of the present disclosure provide an image processing method, by which adjustment of image brightness and contrast can be realized, the problem of image gray scale loss is effectively solved, and the layering of the image is ensured, and the visual experience is enhanced.
  • some embodiments of the present disclosure provide an image processing method.
  • step S101 gray values of all pixel points in the current image frame are acquired.
  • the video processor When the video processor receives the video signal, it decodes the RGB signal in the video signal and converts the RGB signal into a YUV signal, where "Y" represents brightness, that is, gray level, and "U” and “V” indicate Chroma, used to describe image color and saturation. Therefore, after the video processor parses out the video signal, the gray value of all the pixels can be acquired. The gray value of all pixels is stored in memory or saved in the data node assigned by the processor.
  • a first gray value and a second gray value are selected from gray values of all pixels of the current image frame; wherein the first gray value is a maximum gray value, the second The gray value is a second largest gray value; or the first gray value is a minimum gray value, and the second gray value is a second small gray value.
  • the gray level value of the pixel point having a large gray value first reaches the high order saturation.
  • the maximum gray value and the second largest gray scale value of all the pixel points cannot be saturated, thereby ensuring that the gray scale values of other pixel points are also not satisfied.
  • the high-order saturation is achieved. Therefore, in the method provided by the embodiment of the present disclosure, the maximum gray value and the second largest gray value are selected from the gray values of all the pixel points, wherein the maximum gray value and the second largest gray level.
  • the values can correspond to multiple pixels.
  • the pixel point having a small gray value first reaches low-order saturation (or dark field saturation).
  • the minimum gray scale value and the second small gray scale luminance value of all the pixel points cannot reach the dark field saturation, thereby ensuring dark pixels in the image frame.
  • the dots are darker and the layering of the image is highlighted, making the display better.
  • step S103 the first gray value and the second gray value are used as input gray values, and the first output gray value corresponding to the first gray value is determined according to the brightness adjustment relationship.
  • a critical parameter value when a difference between the second output gray value corresponding to the second gray value is within a preset range; wherein the critical parameter value comprises a critical contrast parameter value and/or a critical brightness parameter value.
  • the brightness adjustment relationship is:
  • Gain represents the contrast parameter
  • Offset represents the brightness parameter
  • Y(in) and Y(out) represent the graph respectively.
  • the preset range may be set to be greater than 0 and less than or equal to 2, and determine a critical parameter value when a difference between the first output gray value and the second output gray value is within a preset range, That is, the critical parameter value when the first output gray value and the second output gray value are nearly equal are determined, thereby ensuring that the gray values of all the pixels in the image are not saturated.
  • the first gray value and the second gray value of all the pixels are used as the input gray value, and the brightness adjustment relationship is input, and the first corresponding to the first gray value is calculated by the brightness adjustment relation. And outputting a second gray value corresponding to the gray value and the second gray value.
  • the first gray value is the maximum gray value and the second gray value is the second largest gray value
  • the maximum gray is displayed.
  • the brightness of the pixel points of the degree value and the second largest gray value can be enhanced, so that the displayed picture is brighter and the layering is stronger. Therefore, it is necessary to calculate the critical parameter value so that the maximum gray value and the second largest gray value value Nearly equal.
  • the critical parameter value needs to be calculated such that the output gray value corresponding to the minimum gray value is close to the output gray value corresponding to the second small gray value. equal.
  • the first output gray value corresponding to the first gray value and the second gray value corresponding to the second gray value are adjusted to be equal, and the contrast parameter value may be separately adjusted.
  • the brightness parameter value is kept at the default value, the critical contrast parameter value is calculated, or the brightness parameter value is separately adjusted, the contrast parameter value is kept at the default value, the critical brightness parameter value is calculated, or the contrast parameter value and the brightness parameter value are simultaneously adjusted. Calculate the critical contrast parameter value and the critical brightness parameter value.
  • the specific adjustment method can be determined according to the actual application.
  • step S104 the parameters in the brightness adjustment relationship are adjusted according to the critical parameter value, and the brightness and contrast of all the pixels in the current image frame are adjusted according to the adjusted brightness adjustment relationship, and the output is output.
  • the critical parameter value includes the critical contrast parameter value and the critical brightness parameter value
  • the critical contrast parameter value and the critical brightness parameter value are substituted into the brightness adjustment relationship.
  • the contrast parameter value in the brightness adjustment relationship is adjusted to the critical contrast parameter value
  • the brightness parameter value in the brightness adjustment relationship is adjusted to the critical brightness parameter value
  • the adjusted brightness adjustment relationship is obtained, and then all the pixels are obtained.
  • the brightness and contrast are adjusted by adjusting the brightness adjustment relationship to obtain the output gray value of all the pixels.
  • the video processor converts the output gray value signal and other signals into RGB signals and sends them to the driving circuit of the liquid crystal module, and the driving circuit controls the liquid crystal panel to display the enhanced image. Like a picture.
  • the method provided by the embodiment of the present disclosure calculates the critical parameter value by adaptively adjusting the contrast parameter and/or the brightness parameter, so that the pixel in the image frame does not reach the saturated gray value, thereby avoiding the image frame.
  • the phenomenon of gray scale loss ensures that the display of image frames is more layered and the display effect is better. For example, when the first gradation value is the maximum gradation value and the second gradation value is the second largest gradation value, the maximum gradation value and the sub-large gradation value are not achieved by the high-order saturation.
  • All the pixels in the image frame do not exhibit high-order saturation, so that not only the gray level integrity of the image frame can be guaranteed, but also the requirement that the maximum gray value and the second largest gray value do not reach high-order saturation.
  • increase the brightness of all the pixels so that the brightness of the entire image is enhanced, and the layering is good, thereby ensuring the display effect of the liquid crystal display.
  • the first gray value is a minimum gray value and the second gray value is a second small gray value
  • the image is made to be saturated by making the minimum gray value and the second small gray value not saturated. All the pixels of the frame do not reach the minimum gray value.
  • FIG. 1 a method of determining a critical parameter value is shown in FIG. 1
  • step S201 gray values of all the pixels in the current image frame are acquired.
  • step S202 the first gray value and the second gray value are used as input gray values, and the contrast parameter value and/or the brightness parameter value in the brightness adjustment relationship are adjusted, and according to the adjustment And a brightness adjustment relationship determining a difference between the first output gray value and the second output gray value.
  • the maximum gray value and the second largest gray value are used as the input gray value, and the gray value is enhanced by the brightness adjustment relation, so that the pixel points of the maximum gray value and the second largest gray value are brighter.
  • the enhancement ie, increasing the contrast parameter value and/or the brightness parameter value
  • the difference between the output gray value corresponding to the maximum gray value and the second largest gray value is calculated until the difference is satisfied.
  • obtaining a critical parameter value when the difference between the first output gray value corresponding to the maximum gray value and the second output gray value corresponding to the second largest gray value is within a preset range.
  • the minimum gray value and the second small gray value are used as the input gray value, and the gray value is weakened by the brightness adjustment relation, so that the pixel points of the minimum gray value and the second small gray value are darker.
  • a weakening ie, reducing the contrast parameter value and/or the brightness parameter value
  • the difference between the output gray value corresponding to the minimum gray value and the second small gray value is calculated until the difference is satisfied.
  • the value obtains a critical parameter value when the difference between the output gray value corresponding to the minimum gray value and the output gray value corresponding to the second small gray value is within a preset range.
  • the video processor When calculating the critical parameter value, the video processor extracts the first gray value, the second gray value, and the brightness adjustment relation from the memory or the data node to calculate, and calculates the first output gray level corresponding to the first gray value. Value and second After the second output gray value corresponding to the gray value, the difference between the first output gray value and the second output gray value is calculated.
  • step S203 it is determined whether the difference is within a preset range.
  • the gray value has 256 gray levels and is composed of 0-255 gray values.
  • Each gray value represents a gray scale, and the magnitude of the difference of the output gray values determines the difference in luminance between the output gray values.
  • the preset range is set to be greater than 0 and less than or equal to 2, that is, the difference between the output gray values does not exceed two gray levels.
  • step S204 when the difference is within a preset range, it is determined that the adjusted contrast parameter value and/or the adjusted brightness parameter value is a critical parameter value.
  • the contrast parameter value is a and the brightness parameter value is b
  • the difference between the output gray value corresponding to the first gray value and the second gray value is within a preset range.
  • a is a critical value.
  • Contrast parameter value, b is the critical brightness parameter value.
  • the critical parameter value does not need to be calculated again.
  • the image is processed directly by the existing brightness adjustment relationship, and the output gray value of all the pixels is output.
  • the method for determining the critical parameter value calculates the difference between the first gray value and the second gray value respectively corresponding to the output gray value within a preset range, and continuously adjusts The contrast parameter value and/or the brightness parameter value correct the difference of the output gray value within a preset range to determine the critical parameter value.
  • another method of determining a critical parameter value is further provided, which is described in detail in three cases.
  • Case 1 The critical parameter value includes the critical contrast parameter value.
  • the method of determining the critical parameter value includes:
  • the value obtained by subtracting the preset contrast value from the corresponding contrast parameter value when the first output gray value and the second output gray value are equal is determined as the critical contrast parameter value.
  • Case 2 The critical parameter value includes the critical brightness parameter value.
  • the method of determining the critical parameter value includes:
  • the value obtained by subtracting the preset brightness value from the corresponding brightness parameter value when the first output gray value and the second output gray value are equal is determined as the critical brightness parameter value.
  • the method of determining the critical parameter value includes:
  • the corresponding contrast parameter value and the brightness parameter value are respectively subtracted from the preset value, and the value is determined as the critical contrast parameter value and the critical brightness parameter value.
  • the method for calculating the critical contrast parameter value and/or the critical brightness parameter value has the contrast parameter value and/or the brightness parameter value as an unknown number, the first output gray value and the second output.
  • the gray values are equal, so that the contrast parameter value and/or the brightness parameter value corresponding to the first output gray value and the second output gray value are equal, and then, in order to ensure that the output gray value of all the pixel points does not reach saturation
  • the determined contrast parameter value is subtracted from the preset value to obtain a critical contrast parameter value, and the determined brightness parameter value is subtracted from the preset value to obtain a critical brightness parameter value.
  • the method of determining the first gray value and the second gray value is further optimized, see FIG.
  • step S401 gray values of all pixel points in the current image frame are acquired.
  • step S402 all the pixel points are sorted from light to dark according to the gray value, and a gray histogram of all the pixel points is established.
  • each gray level corresponds to multiple pixels, that is, there are multiple pixels with the same gray value. Therefore, by counting all the pixels by the gray histogram, the number of pixels corresponding to each gradation can be determined. At the same time, according to the gray histogram, the maximum gray value and the second largest gray value can be quickly determined, and the minimum gray value and the second small gray value can be quickly determined.
  • step S403 the first gray value and the second gray value are determined according to the gray histogram.
  • the gray value of all the pixel points is counted by the gray histogram, and the maximum gray level can be quickly determined.
  • the value and the second largest gray value, and the number of pixels of each gray level can also be counted.
  • the gray histogram can be sorted according to the gray value from large to small, or can be sorted according to the gray value from small to large, so the maximum can be quickly determined by the gray histogram. Gray value and second largest gray value.
  • the gray histogram is only a statistical method, and the pie chart or the line chart can also be used for statistics to determine the first gray value and the second gray value.
  • a method of determining a first gray value and a second gray value from a gray histogram is provided, which is illustrated below in two cases.
  • Case 1 the first gray value is a maximum gray value, and the second gray value is a second largest gray value.
  • FIG. 1 A method of determining the maximum gray value and the second largest gray value based on the gray histogram is shown in FIG.
  • step S4031 the average gradation value of all the pixel points is determined based on the gradation histogram.
  • the grayscale histogram gives all the grayscale values of all the pixels, and the number of pixels corresponding to each grayscale value. Therefore, the sum of the product of the gray scale value and the number of pixel points is calculated, and then the sum value is compared with the number of pixel points to obtain an average gray value.
  • the critical parameter value it is necessary to ensure that the maximum gray value and the second largest gray value are close to each other. Therefore, for the convenience of calculation, the pixel point smaller than the average gray value may be discarded in the determination process.
  • step S4032 pixel points whose gradation values are larger than the average gradation value are selected, and the proportion of the pixel points of the different gradation values in the selected pixel points in the selected pixel points is determined.
  • step S4033 the pixel points whose ratio is smaller than the preset scale value are discarded, and a reordered gray histogram is obtained.
  • the maximum gray value or the second largest gray value corresponds to a relatively small number of pixels, when the output values corresponding to the maximum gray value and the second largest gray value are equal, the display image of the image frame is less affected. It can be ignored. Therefore, even if the output gray values corresponding to the maximum gray value and the second largest gray value are equal, it is visually difficult to detect, and the gray value saturation can be ignored at this time. Therefore, in this step S4033, it is necessary to discard the pixel points whose ratio is smaller than the preset scale value.
  • step S4034 the maximum gray value and the second largest gray value are selected according to the reordered gray histogram.
  • the pixel point with a smaller ratio can be ignored. Therefore, in this step, the pixel points whose ratio is less than the preset ratio value are not counted in the statistical range.
  • the preset ratio value is set to 3%-5%. After rounding off, the pre-position is complemented by the original sort to obtain a new sort, and the maximum gray value and the second largest gray value are determined according to the reordered gray histogram.
  • a method for determining a minimum gray value and a second small gray value according to a gray histogram including:
  • a minimum gray value and a second small gray value are selected according to the reordered gray histogram.
  • the method provided by the embodiment of the present disclosure ensures that the proportion of the pixel points corresponding to the different gray values is less than the preset ratio by ensuring the ratio of the pixel points corresponding to the first gray value and the second gray value.
  • the pixels are determined to determine the effective first gray value and the second gray value, thereby ensuring a better display effect.
  • some embodiments of the present disclosure provide another method of determining a first gray value and a second gray value.
  • step S501 gray values of all the pixels in the current image frame are acquired.
  • step S502 the gray values of the adjacent two pixel points are sequentially compared according to the array sorting order of all the pixel points until all the pixel points are compared.
  • step S503 it is determined that the maximum and second largest values of the final compared gray value are the maximum gray value and the second largest gray value, or that the minimum and minimum values of the final compared gray value are the minimum gray value. And the second small gray value.
  • the video processor After parsing the video signal, the video processor obtains the order of the pixels on the display screen, and sequentially compares the gray values of the adjacent two pixels according to the order of the pixels. For example, when determining the maximum gray value and the second largest gray value, comparing the gray values of the first pixel point and the second pixel point, when the gray value of the second pixel point is greater than the first pixel point Comparing the gray values of the second pixel and the third pixel, and sequentially comparing until all the pixels are compared, thereby determining the maximum gray value and the second largest gray value.
  • the pixels are compared in sequence until all the pixels are compared, thereby determining the minimum gray value and the second small gray value.
  • the embodiment of the present disclosure provides a method for determining a first gray value and a second gray value, according to the number of times of all pixel points when determining the first gray value and the second gray value.
  • the gray values of the adjacent two pixels are compared in turn until all the pixels are compared.
  • the method provided in this embodiment is simple and convenient to calculate, and the first gray value and the second gray value can be calculated in a short time.
  • the first gray value is a maximum gray value
  • the second gray value is a second largest gray value
  • the maximum gray value and the second largest gray value are used as input gray values, and the brightness adjustment relationship is adjusted.
  • the value of the contrast parameter in the formula when the difference between the output value corresponding to the maximum gray value and the second largest gray value is within a preset range, determining that the adjusted contrast parameter value is a critical contrast parameter value, and the critical contrast parameter is The value is substituted into the brightness adjustment relationship as the contrast parameter value, and the brightness parameter value is kept as the default value, thereby obtaining the adjusted brightness adjustment relationship, and all the pixels in the current image frame are adjusted by the adjusted brightness adjustment relationship. Adjust the brightness and contrast, The gray value of all the pixels after the brightness and contrast adjustment are output.
  • the first gray value is a minimum gray value
  • the second gray value is a second small gray value
  • the minimum gray value and the second small gray value are used as input gray values, when the minimum gray level is
  • the difference between the output value corresponding to the value and the second small gray value is within a preset range
  • the adjusted brightness parameter value is a critical brightness parameter value
  • the critical brightness parameter value is substituted as a brightness parameter value into the brightness adjustment relationship.
  • the contrast parameter value is kept as the default value, and the adjusted brightness adjustment relationship is obtained, and the brightness and contrast of all the pixels in the current image frame are adjusted by the adjusted brightness adjustment relationship, and the brightness and contrast are output.
  • the adjusted gray value of all the pixels is a minimum gray value
  • the second gray value is a second small gray value
  • the minimum gray value and the second small gray value are used as input gray values, when the minimum gray level is
  • the difference between the output value corresponding to the value and the second small gray value is within a preset range
  • the contrast parameter value is kept as the default
  • the critical brightness parameter value is first calculated according to the above embodiment, and then the critical contrast parameter value is calculated, and finally, the output of all the pixel points is calculated according to the adjusted brightness adjustment relationship.
  • the gray value is used to adjust the brightness and contrast of the image frame.
  • the output gray value of the pixel point calculated by the above embodiment reduces the gray value of the pixel point with a low gray value, that is, makes the dark pixel point darker, and at the same time, makes the bright pixel point brighter, thereby making the bright pixel point brighter.
  • the display of the image frame is more layered, which in turn makes the display of the picture better.
  • the embodiment of the present disclosure further provides a video processor, including a gray value acquiring unit, maximum and second large gray value selecting units, a threshold calculating unit, and an image brightness and contrast adjusting unit, wherein:
  • a gray value acquisition unit is configured to acquire gray values of all pixels in the current image frame. After decoding the image frame, the video processor acquires the gray values of all the pixels.
  • the maximum and second largest gray value selection units are configured to select a maximum gray value and a second largest gray value from gray values of all pixel points of the current image frame.
  • the maximum and second largest gray value selection unit may be configured to calculate a gray histogram of all the pixels according to the gray value histogram, and then determine the maximum gray value and the second largest gray value, or configured to be based on the pixel. The order of the dots is sequentially compared with the gray values of the adjacent two pixels to determine the maximum gray value and the second largest gray value.
  • the threshold value calculation unit is configured to adjust a relationship according to a brightness adjustment, adjust a contrast parameter, and use the maximum gray value and the second largest gray value as an input gray value, and calculate the maximum gray value and the second largest gray level.
  • the values of the critical contrast parameters when the values of the output gray values correspond to each other.
  • the threshold value calculation unit is configured to adjust the relationship according to the brightness, adjust the brightness parameter, use the minimum gray value and the second small gray value as the input gray value, and calculate the minimum gray value and the second small gray value respectively.
  • the value of the critical brightness parameter when the output gray values approach the same.
  • the threshold calculation unit first calculates the critical brightness parameter value and then calculates the critical contrast parameter value.
  • the image brightness and contrast adjustment unit is configured to adjust the critical contrast parameter value as a brightness
  • the contrast parameter value in the system adjusts the brightness and contrast of all the pixels in the current image frame, and outputs the gray value of all the pixels after the brightness and contrast adjustment; meanwhile, the critical brightness parameter is used
  • the value is used as the brightness parameter value in the brightness adjustment relationship, and the brightness and contrast of all the pixels in the current image frame are adjusted, and the gray values of all the pixels after the brightness and contrast adjustment are output.
  • the threshold value calculation unit inputs the calculated critical contrast parameter value and/or the brightness parameter value to the image brightness and contrast adjustment unit, and the image brightness and contrast adjustment unit uses the critical contrast parameter value and/or the critical brightness parameter value as the brightness adjustment relationship. Contrast parameters and/or brightness parameters in , and calculate the output gray value of all pixels.
  • the video processor converts the output gray value into an RGB signal and sends it to the liquid crystal module.
  • the liquid crystal module adjusts the voltage of the driving circuit according to the RGB signal, thereby controlling the deflection of the liquid crystal molecules, and finally realizing the adjustment of the brightness and contrast of the image.
  • some embodiments of the present disclosure provide an image processing apparatus by which adjustment of image brightness and contrast can be realized, the apparatus comprising:
  • At least one processor 71 and,
  • a memory 72 communicatively coupled to the at least one processor
  • the memory 72 stores instructions executable by the at least one processor 71, the instructions being executed by the at least one processor 71 to enable the at least one processor 71 to:
  • the instructions are executed by the at least one processor 71 to enable the at least one processor 71 to:
  • the critical parameter value includes a critical contrast parameter value, the instructions being executed by the at least one processor 71 to enable the at least one processor 71 to further:
  • the value obtained by subtracting the preset contrast value from the corresponding contrast parameter value when the first output gray value and the second output gray value are equal is determined as the critical contrast parameter value.
  • the critical parameter value comprises a critical brightness parameter value
  • the instructions being executed by the at least one processor 71 to enable the at least one processor 71 to further:
  • the value obtained by subtracting the preset brightness value from the corresponding brightness parameter value when the first output gray value and the second output gray value are equal is determined as the critical brightness parameter value.
  • the critical parameter value comprises a critical contrast parameter value and a critical brightness parameter value
  • the instructions being executed by the at least one processor 71 to enable the at least one processor 71 to further:
  • the corresponding contrast parameter value and the brightness parameter value are respectively subtracted from the preset value, and the value is determined as the critical contrast parameter value and the critical brightness parameter value.
  • the instructions are executed by the at least one processor 71 to enable the at least one processor 71 to:
  • All the pixels are sorted according to the gray value from light to dark, and a gray histogram of all the pixels is established;
  • the first gray value and the second gray value are determined according to the gray histogram.
  • the first gray value is a maximum gray value
  • the second gray value is a second largest gray value.
  • the instructions are executed by the at least one processor 71 to enable the at least one processor 71 to:
  • the maximum gray value and the second largest gray value are selected.
  • the first gray value is a minimum gray value
  • the second gray value is a second small gray value
  • the instruction is executed by the at least one processor 71 to cause the At least one processor 71 is also capable of:
  • a minimum gray value and a second small gray value are selected according to the reordered gray histogram.
  • the instructions are executed by the at least one processor 71 to enable the at least one processor 71 to:
  • the gray values of the adjacent two pixel points are sequentially compared until all the pixel points are compared;
  • the maximum and second largest values of the final comparison gray value are determined as the maximum gray value and the second largest gray value, or the minimum and second small values of the final comparison gray value are determined as the minimum gray value and the second small gray value. .
  • Some embodiments of the present disclosure further provide a liquid crystal display device including a liquid crystal module, a backlight module, a video processor, and a memory storing instructions executable by the video processor, the video processor and the liquid crystal respectively
  • the module and the backlight module are electrically connected to send the parsed video signal to the liquid crystal module and the backlight module, and control the display brightness, contrast and color of the liquid crystal module, and control the brightness of the backlight module; ,
  • the instructions are executed by the video processor to enable the video processor to:

Landscapes

  • Engineering & Computer Science (AREA)
  • Chemical & Material Sciences (AREA)
  • Crystallography & Structural Chemistry (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Television Receiver Circuits (AREA)
  • Liquid Crystal Display Device Control (AREA)
  • Transforming Electric Information Into Light Information (AREA)

Abstract

Disclosed are an image processing device and method, and a liquid crystal display device. The device comprises: at least one processor, and a memory. The memory stores instructions that can be executed by the at least one processor, and is used for reading the instructions for executing: obtaining gray scale values of all pixel points in a current image frame (S101); selecting a first gray scale value and a second gray scale value, which satisfy preset requirements, from the gray scale values of all the pixel points in the current image frame (S102); using the first gray scale value and the second gray scale value as input gray scale values, and determining, in a preset range according to a brightness adjustment relation, critical parameter values of a difference between output gray scale values respectively corresponding to the first gray scale value and the second gray scale value (S103); and adjusting the parameters in the brightness adjustment relation according to the critical parameter values, and adjusting the brightness and contrast ratio of all the pixel points in the current image frame according to the adjusted brightness adjustment relation (S104).

Description

图像处理装置及方法、液晶显示装置Image processing device and method, liquid crystal display device
本申请要求在2016年11月8日提交中国专利局、申请号为201610981698.9的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。The present application claims the priority of the Chinese Patent Application, the entire disclosure of which is hereby incorporated by reference.
技术领域Technical field
本公开涉及图像信号处理技术领域,尤其涉及一种图像处理装置及方法、液晶显示装置。The present disclosure relates to the field of image signal processing technologies, and in particular, to an image processing apparatus and method, and a liquid crystal display device.
背景技术Background technique
如图1所示,液晶显示器主要包括液晶模组1、背光模组(图中未示出)、视频处理器4等,其中,液晶模组1主要包括液晶面板2和薄膜晶体管-液晶显示(Thin Film Transistor-Liquid Crystal Display,TFT-LCD)驱动电路3,液晶面板2上设置有以阵列方式排布的液晶显示单元21,TFT-LCD驱动电路3与液晶面板2电连接;背光模组设置在液晶面板2的背面,为液晶显示单元21提供背光源;视频处理器4接收信号源发送的图像信号,解析所述图像信号中的亮度信号和色度信号等数字信号,并发送至TFT-LCD驱动电路3,TFT-LCD驱动电路3将这些数字信号转换成电信号,驱动液晶显示单元21显示不同的亮度和色度。因此,视频处理器4在处理图像信号时,通过调整图像信号,可以控制液晶显示单元21的显示亮度和色度,从而保证液晶显示屏的显示效果。As shown in FIG. 1 , the liquid crystal display mainly includes a liquid crystal module 1 , a backlight module (not shown), a video processor 4 , and the like. The liquid crystal module 1 mainly includes a liquid crystal panel 2 and a thin film transistor-liquid crystal display ( a thin film Transistor-Liquid Crystal Display (TFT-LCD) driving circuit 3 is provided with a liquid crystal display unit 21 arranged in an array on the liquid crystal panel 2, and the TFT-LCD driving circuit 3 is electrically connected to the liquid crystal panel 2; On the back side of the liquid crystal panel 2, a backlight is provided for the liquid crystal display unit 21; the video processor 4 receives an image signal transmitted by the signal source, analyzes a digital signal such as a luminance signal and a chrominance signal in the image signal, and transmits the digital signal to the TFT- The LCD drive circuit 3, the TFT-LCD drive circuit 3 converts these digital signals into electrical signals, and drives the liquid crystal display unit 21 to display different brightness and chromaticity. Therefore, when the image processor 4 processes the image signal, by adjusting the image signal, the display brightness and chromaticity of the liquid crystal display unit 21 can be controlled, thereby ensuring the display effect of the liquid crystal display.
发明内容Summary of the invention
本公开提供一种图像处理装置及方法、液晶显示装置。The present disclosure provides an image processing apparatus and method, and a liquid crystal display device.
一方面,本公开一些实施例提供了一种图像处理装置,包括:In one aspect, some embodiments of the present disclosure provide an image processing apparatus, including:
至少一个处理器;以及,At least one processor; and,
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
获取当前图像帧中所有像素点的灰度值;Obtaining the gray value of all pixels in the current image frame;
从所述当前图像帧的所有像素点的灰度值中选择第一灰度值和第二灰度值;其中,所述第一灰度值为最大灰度值,所述第二灰度值为次大灰度值;或者,所述第一灰度 值为最小灰度值,所述第二灰度值为次小灰度值;Selecting a first gray value and a second gray value from gray values of all pixels of the current image frame; wherein the first gray value is a maximum gray value, and the second gray value The second largest gray value; or the first gray level a value of a minimum gray value, and the second gray value is a second small gray value;
将所述第一灰度值和第二灰度值作为输入灰度值,按照亮度调整关系式,确定所述第一灰度值对应的第一输出灰度值与所述第二灰度值对应的第二输出灰度值的差值在预设范围内时的临界参数值;其中,所述临界参数值包括临界对比度参数值和/或临界亮度参数值;Taking the first gray value and the second gray value as input gray values, determining a first output gray value corresponding to the first gray value and the second gray value according to a brightness adjustment relationship a critical parameter value when a difference between the corresponding second output gray value is within a preset range; wherein the critical parameter value includes a critical contrast parameter value and/or a critical brightness parameter value;
根据所述临界参数值调整所述亮度调整关系式中的参数,并根据调整后的亮度调整关系式对所述当前图像帧中的所有像素点的亮度和对比度进行调整,并输出亮度和对比度调整后的所有所述像素点的灰度值。Adjusting a parameter in the brightness adjustment relationship according to the critical parameter value, and adjusting brightness and contrast of all pixel points in the current image frame according to the adjusted brightness adjustment relationship, and outputting brightness and contrast adjustment The gray value of all subsequent pixels.
第二方面,本公开一些实施例提供一种图像处理方法,包括:获取当前图像帧中所有像素点的灰度值;In a second aspect, some embodiments of the present disclosure provide an image processing method, including: acquiring gray values of all pixels in a current image frame;
从所述当前图像帧的所有像素点的灰度值中选择第一灰度值和第二灰度值;其中,所述第一灰度值为最大灰度值,所述第二灰度值为次大灰度值;或者,所述第一灰度值为最小灰度值,所述第二灰度值为次小灰度值;Selecting a first gray value and a second gray value from gray values of all pixels of the current image frame; wherein the first gray value is a maximum gray value, and the second gray value a second largest gray value; or the first gray value is a minimum gray value; the second gray value is a second small gray value;
将所述第一灰度值和第二灰度值作为输入灰度值,按照亮度调整关系式,确定所述第一灰度值对应的第一输出灰度值与所述第二灰度值对应的第二输出灰度值的差值在预设范围内时的临界参数值;其中,所述临界参数值包括临界对比度参数值和/或临界亮度参数值;Taking the first gray value and the second gray value as input gray values, determining a first output gray value corresponding to the first gray value and the second gray value according to a brightness adjustment relationship a critical parameter value when a difference between the corresponding second output gray value is within a preset range; wherein the critical parameter value includes a critical contrast parameter value and/or a critical brightness parameter value;
根据所述临界参数值调整所述亮度调整关系式中的参数,并根据调整后的亮度调整关系式对所述当前图像帧中的所有像素点的亮度和对比度进行调整,并输出亮度和对比度调整后的所有所述像素点的灰度值。Adjusting a parameter in the brightness adjustment relationship according to the critical parameter value, and adjusting brightness and contrast of all pixel points in the current image frame according to the adjusted brightness adjustment relationship, and outputting brightness and contrast adjustment The gray value of all subsequent pixels.
第三方面,本公开一些实施例提供一种液晶显示装置,包括:液晶模组、背光模组、视频处理器及存储有可被所述视频处理器执行的指令的存储器,所述视频处理器分别与所述液晶模组和背光模组电连接,并控制所述液晶模组的显示及背光模组的发光;其中,In a third aspect, some embodiments of the present disclosure provide a liquid crystal display device, including: a liquid crystal module, a backlight module, a video processor, and a memory storing instructions executable by the video processor, the video processor Electrically connecting with the liquid crystal module and the backlight module, and controlling display of the liquid crystal module and illumination of the backlight module; wherein
所述指令被所述视频处理器执行,以使所述视频处理器能够:The instructions are executed by the video processor to enable the video processor to:
获取当前图像帧中所有像素点的灰度值;Obtaining the gray value of all pixels in the current image frame;
从所述当前图像帧的所有像素点的灰度值中选择第一灰度值和第二灰度值;其中,所述第一灰度值为最大灰度值,所述第二灰度值为次大灰度值;或者,所述第一灰度值为最小灰度值,所述第二灰度值为次小灰度值;Selecting a first gray value and a second gray value from gray values of all pixels of the current image frame; wherein the first gray value is a maximum gray value, and the second gray value a second largest gray value; or the first gray value is a minimum gray value; the second gray value is a second small gray value;
将所述第一灰度值和第二灰度值作为输入灰度值,按照亮度调整关系式,确定所述第一灰度值对应的第一输出灰度值与所述第二灰度值对应的第二输出灰度值的差值 在预设范围内时的临界参数值;其中,所述临界参数值包括临界对比度参数值和/或临界亮度参数值;Taking the first gray value and the second gray value as input gray values, determining a first output gray value corresponding to the first gray value and the second gray value according to a brightness adjustment relationship Corresponding second output gray value difference a critical parameter value when in a preset range; wherein the critical parameter value comprises a critical contrast parameter value and/or a critical brightness parameter value;
根据所述临界参数值调整所述亮度调整关系式中的参数,并根据调整后的亮度调整关系式对所述当前图像帧中的所有像素点的亮度和对比度进行调整,并输出亮度和对比度调整后的所有所述像素点的灰度值。Adjusting a parameter in the brightness adjustment relationship according to the critical parameter value, and adjusting brightness and contrast of all pixel points in the current image frame according to the adjusted brightness adjustment relationship, and outputting brightness and contrast adjustment The gray value of all subsequent pixels.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。The above general description and the following detailed description are intended to be illustrative and not restrictive.
附图说明DRAWINGS
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in the specification
为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings used in the embodiments or the prior art description will be briefly described below, and it will be apparent to those skilled in the art that In other words, other drawings can be obtained based on these drawings without paying for creative labor.
图1为相关技术提供的一种液晶显示器结构示意图;1 is a schematic structural view of a liquid crystal display provided by the related art;
图2为本公开一些实施例提供的一种图像处理方法的流程示意图;FIG. 2 is a schematic flowchart diagram of an image processing method according to some embodiments of the present disclosure;
图3为本公开一些实施例提供的一种确定临界对比度参数值和/或临界亮度参数值的方法的流程示意图;FIG. 3 is a schematic flowchart of a method for determining a critical contrast parameter value and/or a critical brightness parameter value according to some embodiments of the present disclosure;
图4为本公开一些实施例提供的一种确定第一灰度值和第二灰度值的方法的流程示意图;4 is a schematic flowchart of a method for determining a first gray value and a second gray value according to some embodiments of the present disclosure;
图5为本公开一些实施例提供的一种根据灰度直方图确定最大灰度值和次大灰度值的方法的流程示意图;FIG. 5 is a schematic flowchart of a method for determining a maximum gray value and a second largest gray value according to a gray histogram according to some embodiments of the present disclosure;
图6为本公开一些实施例提供的另一种确定第一灰度值和第二灰度值的方法的流程示意图;FIG. 6 is a schematic flowchart diagram of another method for determining a first gray value and a second gray value according to some embodiments of the present disclosure;
图7为本公开一些实施例提供的一种图像处理装置的结构示意图。FIG. 7 is a schematic structural diagram of an image processing apparatus according to some embodiments of the present disclosure.
具体实施方式detailed description
为了使本公开的目的、技术方案和优点更加清楚,下面将结合附图对本公开作进一步地详细描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动前提下 所获得的所有其它实施例,都属于本公开保护的范围。The present disclosure will be further described in detail with reference to the accompanying drawings, in which FIG. Based on the embodiments in the present disclosure, those skilled in the art can make no creative work. All other embodiments obtained are within the scope of the disclosure.
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. The following description refers to the same or similar elements in the different figures unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with aspects of the present disclosure as detailed in the appended claims.
通常来讲,液晶面板主要由两块玻璃基板夹着一个由偏光板、液晶层和彩色滤光片构成的夹层组成,其中,偏光板决定了什么样的光线可以通过,液晶层决定了有多少光可以通过,彩色滤光片决定了生成什么颜色的光线。液晶被灌在两个制作精良的平面之间构成液晶层,这两个平行的平面上设置有沟槽,单独平面上的沟槽都是平行的,但是两个平行平面上的沟槽是互相垂直的。背光模组发光,且产生均匀的光线,这些光线通过液晶面板,如果给液晶层施加电压刺激液晶分子偏转产生点、线、面的图像,不同偏转状态的液晶分子对背光源发出光线的通过率不同。因此,TFT-LCD驱动电路通过控制施加在液晶分子上的电压控制像素点的亮度。Generally speaking, the liquid crystal panel is mainly composed of two glass substrates sandwiching a sandwich layer composed of a polarizing plate, a liquid crystal layer and a color filter, wherein the polarizing plate determines what kind of light can pass, and the liquid crystal layer determines how many Light can pass, and the color filter determines what color of light is generated. The liquid crystal is poured between two well-formed planes to form a liquid crystal layer. The two parallel planes are provided with grooves, and the grooves on the individual planes are all parallel, but the grooves on the two parallel planes are mutually vertical. The backlight module emits light and generates uniform light. The light passes through the liquid crystal panel. If a voltage is applied to the liquid crystal layer to stimulate the deflection of the liquid crystal molecules to generate images of dots, lines and surfaces, the liquid crystal molecules of different deflection states emit light to the backlight. different. Therefore, the TFT-LCD drive circuit controls the brightness of the pixel dots by controlling the voltage applied to the liquid crystal molecules.
相关技术中,液晶显示器中的视频处理器在处理图像信号时,为了增强液晶显示屏的显示效果,运用亮度调整关系式:Y(out)=Gain·Y(in)+Offset,对图像信号进行调整增强,其中,Gain指对比度参数,Offset指亮度参数,Y(in)和Y(out)分别指图像信号的每个像素点的输入灰度值和亮度调整后的输出灰度值。视频处理器在解析出Y(in)时,通过亮度调整关系式对Y(in)进行增强处理,从而得到增强后的Y(out)。视频处理器将Y(out)发送至液晶显示器中的TFT-LCD驱动电路,TFT-LCD驱动电路将Y(out)转换成电信号,驱动液晶显示单元,从而使液晶显示器显示画面亮度和对比度增强。一般情况下,液晶显示器出厂时,会设置对比度参数Gain和亮度参数Offset的默认值,使Y(in)在亮度增强后,不会出现饱和的情况,从而保证显示画面灰阶的完整性。In the related art, in order to enhance the display effect of the liquid crystal display, the video processor in the liquid crystal display uses the brightness adjustment relationship: Y(out)=Gain·Y(in)+Offset to process the image signal. Adjustment enhancement, wherein Gain refers to a contrast parameter, Offset refers to a brightness parameter, and Y(in) and Y(out) refer to an input gradation value and a brightness-adjusted output gradation value of each pixel of the image signal, respectively. When the video processor parses Y(in), the Y(in) is enhanced by the brightness adjustment relation to obtain the enhanced Y(out). The video processor sends Y(out) to the TFT-LCD driving circuit in the liquid crystal display, and the TFT-LCD driving circuit converts Y(out) into an electrical signal to drive the liquid crystal display unit, thereby enhancing the display brightness and contrast of the liquid crystal display. . Under normal circumstances, when the liquid crystal display is shipped from the factory, the default values of the contrast parameter Gain and the brightness parameter Offset are set, so that Y(in) does not appear saturated after the brightness is enhanced, thereby ensuring the integrity of the gray scale of the display screen.
但是,液晶显示器中的每个液晶显示单元具有所能达到的最大灰度值和最小灰度值,以8bit系统为例,每个像素点的灰度值在经过亮度调整关系式增强后,输出灰度值最大达到255,当输出灰度值大于255值,输出灰度值均取255。因此,当用户通过遥控器或液晶显示器上的按键调整亮度或对比度使亮度参数或对比度参数增大时,高亮度部分灰阶的像素点会存在在调整后均会达到最大灰度值的情形(示例性的,调整前的245灰阶和调整前的235灰阶,在进行亮度增强后均会取255灰阶),同样的,在暗场增强的调整过程中,低亮度灰阶值会存在暗场增强调整后均会达到最低灰度值的情形(示例性的,调整前的5灰阶和调整前的15灰阶,在进行亮度调整后均会取0 灰阶),从而使显示画面出现高灰阶合并或低灰阶合并的现象,导致显示画面层次感差。However, each liquid crystal display unit in the liquid crystal display has a maximum gray value and a minimum gray value that can be achieved. Taking an 8-bit system as an example, the gray value of each pixel is enhanced after the brightness adjustment relationship is enhanced. The gray value is up to 255. When the output gray value is greater than 255, the output gray value is 255. Therefore, when the user adjusts the brightness or the contrast by the button on the remote controller or the liquid crystal display to increase the brightness parameter or the contrast parameter, the pixel of the high-intensity gray-scale portion may have a maximum gray value after the adjustment ( Exemplarily, the 245 grayscale before adjustment and the 235 grayscale before adjustment will take 255 grayscale after brightness enhancement. Similarly, in the dark field enhancement adjustment process, low-luminance grayscale values will exist. The dark field enhancement will achieve the lowest gray value (exemplary, the 5 gray scale before adjustment and the 15 gray scale before adjustment, will take 0 after the brightness adjustment Gray scale), so that the display screen appears high gray scale merge or low gray scale merge phenomenon, resulting in poor display layering.
本公开一些实施例提供了一种图像处理方法,通过该方法可实现对图像亮度和对比度的调整,有效解决图像灰阶丢失的问题,并且保证图像的层次感,增强视觉感受。Some embodiments of the present disclosure provide an image processing method, by which adjustment of image brightness and contrast can be realized, the problem of image gray scale loss is effectively solved, and the layering of the image is ensured, and the visual experience is enhanced.
参见图2,本公开一些实施例提供了一种图像处理方法。Referring to FIG. 2, some embodiments of the present disclosure provide an image processing method.
在步骤S101中,获取当前图像帧中所有像素点的灰度值。In step S101, gray values of all pixel points in the current image frame are acquired.
视频处理器接收到视频信号时,会解码出视频信号中的RGB信号,并将RGB信号转换成YUV信号,其中,“Y”表示亮度,也就是灰度,“U”和“V”则表示色度,用于描述图像色彩和饱和度。因此,在视频处理器解析出视频信号后,便可以获取所有像素点的灰度值。将所有像素点的灰度值存储在存储器中,或者保存在处理器分配的数据节点中。When the video processor receives the video signal, it decodes the RGB signal in the video signal and converts the RGB signal into a YUV signal, where "Y" represents brightness, that is, gray level, and "U" and "V" indicate Chroma, used to describe image color and saturation. Therefore, after the video processor parses out the video signal, the gray value of all the pixels can be acquired. The gray value of all pixels is stored in memory or saved in the data node assigned by the processor.
在步骤S102中,从当前图像帧的所有像素点的灰度值中选择第一灰度值和第二灰度值;其中,所述第一灰度值为最大灰度值,所述第二灰度值为次大灰度值;或者,所述第一灰度值为最小灰度值,所述第二灰度值为次小灰度值。In step S102, a first gray value and a second gray value are selected from gray values of all pixels of the current image frame; wherein the first gray value is a maximum gray value, the second The gray value is a second largest gray value; or the first gray value is a minimum gray value, and the second gray value is a second small gray value.
例如,在通过亮度调整公式进行亮度增强时,由于亮度调整公式是线性公式,因此,灰度值大的像素点的灰阶值会首先达到高阶饱和。为了防止图像帧中的像素点在亮度增强后达到高阶饱和,首先需要保证所有像素点中最大灰阶值和次大灰阶值不能达到饱和,从而可以保证其他像素点的灰阶值也不会达到高阶饱和,因此,在本公开实施例提供的方法中,需要从所有像素点的灰度值中选择最大灰度值和次大灰度值,其中最大灰度值和次大灰度值可以分别对应多个像素点。For example, when the brightness enhancement is performed by the brightness adjustment formula, since the brightness adjustment formula is a linear formula, the gray level value of the pixel point having a large gray value first reaches the high order saturation. In order to prevent the pixel points in the image frame from reaching high-order saturation after the brightness is enhanced, it is first necessary to ensure that the maximum gray scale value and the second largest gray scale value of all the pixel points cannot be saturated, thereby ensuring that the gray scale values of other pixel points are also not satisfied. The high-order saturation is achieved. Therefore, in the method provided by the embodiment of the present disclosure, the maximum gray value and the second largest gray value are selected from the gray values of all the pixel points, wherein the maximum gray value and the second largest gray level. The values can correspond to multiple pixels.
再如,在通过亮度调整公式对图像的亮度进行减弱时,由于亮度调整公式是线性公式,因此,灰度值小的像素点会首先达到低阶饱和(或称为暗场饱和)。为了防止图像帧中的像素点在亮度调整后达到暗场饱和,首先需要保证所有像素点中最小灰阶值和次小灰阶亮度值不能达到暗场饱和,从而可以保证图像帧中暗的像素点更暗,并且凸显出图像的层次感,使得显示效果更佳。For another example, when the brightness of the image is weakened by the brightness adjustment formula, since the brightness adjustment formula is a linear formula, the pixel point having a small gray value first reaches low-order saturation (or dark field saturation). In order to prevent the pixel points in the image frame from reaching the dark field saturation after the brightness adjustment, firstly, it is necessary to ensure that the minimum gray scale value and the second small gray scale luminance value of all the pixel points cannot reach the dark field saturation, thereby ensuring dark pixels in the image frame. The dots are darker and the layering of the image is highlighted, making the display better.
在步骤S103中,将所述第一灰度值和第二灰度值作为输入灰度值,按照亮度调整关系式,确定所述第一灰度值对应的第一输出灰度值与所述第二灰度值对应的第二输出灰度值的差值在预设范围内时的临界参数值;其中,所述临界参数值包括临界对比度参数值和/或临界亮度参数值。In step S103, the first gray value and the second gray value are used as input gray values, and the first output gray value corresponding to the first gray value is determined according to the brightness adjustment relationship. a critical parameter value when a difference between the second output gray value corresponding to the second gray value is within a preset range; wherein the critical parameter value comprises a critical contrast parameter value and/or a critical brightness parameter value.
在一些实施例中,所述亮度调整关系式为:In some embodiments, the brightness adjustment relationship is:
Y(out)=Gain·Y(in)+OffsetY(out)=Gain·Y(in)+Offset
其中,Gain表示对比度参数,Offset表示亮度参数,Y(in)和Y(out)分别表示图 像信号的每个像素点的输入灰度值和亮度调整后的输出灰度值。Among them, Gain represents the contrast parameter, Offset represents the brightness parameter, and Y(in) and Y(out) represent the graph respectively. The input gray value of each pixel of the signal and the output gray value of the brightness adjustment.
所述预设范围例如可以设定为大于0且小于或等于2,确定所述第一输出灰度值与所述第二输出灰度值的差值在预设范围内时的临界参数值,也即是确定所述第一输出灰度值与所述第二输出灰度值趋近相等时的临界参数值,从而保证图像中所有像素点的灰度值均达不到饱和。The preset range may be set to be greater than 0 and less than or equal to 2, and determine a critical parameter value when a difference between the first output gray value and the second output gray value is within a preset range, That is, the critical parameter value when the first output gray value and the second output gray value are nearly equal are determined, thereby ensuring that the gray values of all the pixels in the image are not saturated.
例如,将所有像素点中的第一灰度值和第二灰度值作为输入灰度值,输入亮度调整关系式中,通过亮度调整关系式计算出所述第一灰度值对应的第一输出灰度值和所述第二灰度值对应的第二输出灰度值。当所述第一灰度值为最大灰度值,所述第二灰度值为次大灰度值时,为了保证最大灰度值和次大灰度值不达到饱和,同时,显示最大灰度值和次大灰度值的像素点的亮度能够增强,使显示出的画面更明亮,并且层次感更强,因此,需要计算临界参数值,使最大灰度值和次大灰度值趋近相等。当所述第一灰度值为最小灰度值,所述第二灰度值为次小灰度值时,为了保证最小灰度值和次小灰度值不达到饱和,图像帧中暗的像素点更暗,并且凸显出图像的层次感,因此,需要计算临界参数值,使所述最小灰度值对应的输出灰度值与所述次小灰度值对应的输出灰度值趋近相等。For example, the first gray value and the second gray value of all the pixels are used as the input gray value, and the brightness adjustment relationship is input, and the first corresponding to the first gray value is calculated by the brightness adjustment relation. And outputting a second gray value corresponding to the gray value and the second gray value. When the first gray value is the maximum gray value and the second gray value is the second largest gray value, in order to ensure that the maximum gray value and the second largest gray value do not reach saturation, at the same time, the maximum gray is displayed. The brightness of the pixel points of the degree value and the second largest gray value can be enhanced, so that the displayed picture is brighter and the layering is stronger. Therefore, it is necessary to calculate the critical parameter value so that the maximum gray value and the second largest gray value value Nearly equal. When the first gray value is a minimum gray value, and the second gray value is a second small gray value, in order to ensure that the minimum gray value and the second small gray value do not reach saturation, the image frame is dark The pixel points are darker and the layering of the image is highlighted. Therefore, the critical parameter value needs to be calculated such that the output gray value corresponding to the minimum gray value is close to the output gray value corresponding to the second small gray value. equal.
在一些实施例中,使所述第一灰度值对应的第一输出灰度值和第二灰度值对应的第二输出灰度值趋近相等的调整方式,可以是单独调整对比度参数值,亮度参数值保持默认值,计算出临界对比度参数值,也可以是单独调整亮度参数值,对比度参数值保持默认值,计算出临界亮度参数值,也可以是同时调整对比度参数值和亮度参数值,计算出临界对比度参数值和临界亮度参数值,具体采用何种调整方式,可根据实际应用情况确定。In some embodiments, the first output gray value corresponding to the first gray value and the second gray value corresponding to the second gray value are adjusted to be equal, and the contrast parameter value may be separately adjusted. The brightness parameter value is kept at the default value, the critical contrast parameter value is calculated, or the brightness parameter value is separately adjusted, the contrast parameter value is kept at the default value, the critical brightness parameter value is calculated, or the contrast parameter value and the brightness parameter value are simultaneously adjusted. Calculate the critical contrast parameter value and the critical brightness parameter value. The specific adjustment method can be determined according to the actual application.
在步骤S104中,根据所述临界参数值调整所述亮度调整关系式中的参数,并根据调整后的亮度调整关系式对所述当前图像帧中的所有像素点的亮度和对比度进行调整,输出亮度和对比度调整后的所有所述像素点的灰度值。In step S104, the parameters in the brightness adjustment relationship are adjusted according to the critical parameter value, and the brightness and contrast of all the pixels in the current image frame are adjusted according to the adjusted brightness adjustment relationship, and the output is output. The gray value of all the pixels after the brightness and contrast adjustment.
例如,当所述临界参数值包括临界对比度参数值和临界亮度参数值时,在计算出临界对比度参数值和临界亮度参数值后,将临界对比度参数值和临界亮度参数值代入亮度调整关系式中,即将亮度调整关系式中的对比度参数值调整为临界对比度参数值,以及将亮度调整关系式中的亮度参数值调整为临界亮度参数值,得到调整后的亮度调整关系式,之后将所有的像素点通过调整后的亮度调整关系式进行亮度和对比度的调整,得到所有像素点的输出灰度值。视频处理器将输出灰度值信号和其它信号转换成RGB信号后发送至液晶模组的驱动电路,由驱动电路控制液晶面板显示出增强后的图 像画面。For example, when the critical parameter value includes the critical contrast parameter value and the critical brightness parameter value, after the critical contrast parameter value and the critical brightness parameter value are calculated, the critical contrast parameter value and the critical brightness parameter value are substituted into the brightness adjustment relationship. , the contrast parameter value in the brightness adjustment relationship is adjusted to the critical contrast parameter value, and the brightness parameter value in the brightness adjustment relationship is adjusted to the critical brightness parameter value, and the adjusted brightness adjustment relationship is obtained, and then all the pixels are obtained. The brightness and contrast are adjusted by adjusting the brightness adjustment relationship to obtain the output gray value of all the pixels. The video processor converts the output gray value signal and other signals into RGB signals and sends them to the driving circuit of the liquid crystal module, and the driving circuit controls the liquid crystal panel to display the enhanced image. Like a picture.
由上述描述可知,本公开实施例提供的方法通过自适应调整对比度参数和/或亮度参数,计算临界参数值,使得图像帧中的像素点达不到饱和灰度值,从而避免了图像帧中灰阶丢失的现象,保证图像帧的显示更加有层次感,显示效果更佳。例如,当所述第一灰度值为最大灰度值,所述第二灰度值为次大灰度值时,通过使最大灰度值和次大灰度值不达到高阶饱和,实现图像帧中的所有的像素点不出现高阶饱和的现象,从而不仅能够保证图像帧的灰阶的完整性,同时,在保证最大灰度值和次大灰度值不达到高阶饱和的前提下,增大所有像素点的亮度,使整个图像的画面亮度增强,并且层次感好,从而保证了液晶显示屏的显示效果。又如,当所述第一灰度值为最小灰度值,所述第二灰度值为次小灰度值时,通过使最小灰度值和次小灰度值不达到饱和,使图像帧的所有像素点达不到最小灰度值,当具有最小灰度值和次小灰度值的像素点不达到低阶饱和时,所有的像素点便不会出现低阶饱和的现象,从而保证图像帧的显示画面中暗的像素点更暗,进而使画面层次感更强,显示效果更佳。It can be seen from the above description that the method provided by the embodiment of the present disclosure calculates the critical parameter value by adaptively adjusting the contrast parameter and/or the brightness parameter, so that the pixel in the image frame does not reach the saturated gray value, thereby avoiding the image frame. The phenomenon of gray scale loss ensures that the display of image frames is more layered and the display effect is better. For example, when the first gradation value is the maximum gradation value and the second gradation value is the second largest gradation value, the maximum gradation value and the sub-large gradation value are not achieved by the high-order saturation. All the pixels in the image frame do not exhibit high-order saturation, so that not only the gray level integrity of the image frame can be guaranteed, but also the requirement that the maximum gray value and the second largest gray value do not reach high-order saturation. Next, increase the brightness of all the pixels, so that the brightness of the entire image is enhanced, and the layering is good, thereby ensuring the display effect of the liquid crystal display. For another example, when the first gray value is a minimum gray value and the second gray value is a second small gray value, the image is made to be saturated by making the minimum gray value and the second small gray value not saturated. All the pixels of the frame do not reach the minimum gray value. When the pixel with the smallest gray value and the second small gray value does not reach the low-order saturation, all the pixels will not have low-order saturation. It ensures that the dark pixels in the display of the image frame are darker, which makes the picture more layered and the display effect is better.
在一些实施例中,确定临界参数值的方法,参见图3。In some embodiments, a method of determining a critical parameter value is shown in FIG.
在步骤S201中,获取当前图像帧中所有像素点的灰度值。In step S201, gray values of all the pixels in the current image frame are acquired.
在步骤S202中,将所述第一灰度值和第二灰度值作为输入灰度值,调整所述亮度调整关系式中的对比度参数值和/或亮度参数值,并根据所述调整后的亮度调整关系式,确定所述第一输出灰度值与所述第二输出灰度值之间的差值。In step S202, the first gray value and the second gray value are used as input gray values, and the contrast parameter value and/or the brightness parameter value in the brightness adjustment relationship are adjusted, and according to the adjustment And a brightness adjustment relationship determining a difference between the first output gray value and the second output gray value.
例如,将最大灰度值和次大灰度值作为输入灰度值,通过亮度调整关系式对灰度值进行增强,使最大灰度值和次大灰度值的像素点更亮,每经过一次增强(即增大对比度参数值和/或亮度参数值),便计算一次最大灰度值和次大灰度值分别对应的输出灰度值之间的差值,直到得到满足要求的差值,进而得到满足最大灰度值对应的第一输出灰度值和次大灰度值对应的第二输出灰度值的差值在预设范围内时的临界参数值。For example, the maximum gray value and the second largest gray value are used as the input gray value, and the gray value is enhanced by the brightness adjustment relation, so that the pixel points of the maximum gray value and the second largest gray value are brighter. Once the enhancement (ie, increasing the contrast parameter value and/or the brightness parameter value), the difference between the output gray value corresponding to the maximum gray value and the second largest gray value is calculated until the difference is satisfied. And obtaining a critical parameter value when the difference between the first output gray value corresponding to the maximum gray value and the second output gray value corresponding to the second largest gray value is within a preset range.
再如,将最小灰度值和次小灰度值作为输入灰度值,通过亮度调整关系式对灰度值进行减弱,使最小灰度值和次小灰度值的像素点更暗,每经过一次减弱(即减小对比度参数值和/或亮度参数值),便计算一次最小灰度值和次小灰度值分别对应的输出灰度值之间的差值,直到得到满足要求的差值,进而得到满足最小灰度值对应的输出灰度值和次小灰度值对应的输出灰度值的差值在预设范围内时的临界参数值。For another example, the minimum gray value and the second small gray value are used as the input gray value, and the gray value is weakened by the brightness adjustment relation, so that the pixel points of the minimum gray value and the second small gray value are darker. After a weakening (ie, reducing the contrast parameter value and/or the brightness parameter value), the difference between the output gray value corresponding to the minimum gray value and the second small gray value is calculated until the difference is satisfied. The value, in turn, obtains a critical parameter value when the difference between the output gray value corresponding to the minimum gray value and the output gray value corresponding to the second small gray value is within a preset range.
视频处理器在计算临界参数值时,从存储器或数据节点中提取第一灰度值、第二灰度值和亮度调整关系式进行计算,计算出第一灰度值对应的第一输出灰度值和第二 灰度值对应的第二的输出灰度值后,计算第一输出灰度值和第二输出灰度值之间的差值。When calculating the critical parameter value, the video processor extracts the first gray value, the second gray value, and the brightness adjustment relation from the memory or the data node to calculate, and calculates the first output gray level corresponding to the first gray value. Value and second After the second output gray value corresponding to the gray value, the difference between the first output gray value and the second output gray value is calculated.
在步骤S203中,判断所述差值是否在预设范围内。In step S203, it is determined whether the difference is within a preset range.
以8bit系统为例,灰度值具有256个灰阶,由0-255个灰度值组成。每一个灰度值表示一个灰阶,输出灰度值的差值大小决定输出灰度值之间亮度的差值。在一些实施例中,所述预设范围设置为大于0且小于等于2,也就是说,输出灰度值间的差值不超过两个灰阶。当输出灰度值之间的差值小于预设差值时,规定此时第一输出灰度值和第二输出灰度值趋近相等。Taking an 8-bit system as an example, the gray value has 256 gray levels and is composed of 0-255 gray values. Each gray value represents a gray scale, and the magnitude of the difference of the output gray values determines the difference in luminance between the output gray values. In some embodiments, the preset range is set to be greater than 0 and less than or equal to 2, that is, the difference between the output gray values does not exceed two gray levels. When the difference between the output gray values is less than the preset difference, it is prescribed that the first output gray value and the second output gray value are nearly equal at this time.
在步骤S204中,当所述差值在预设范围内时,确定所述调整后的对比度参数值和/或调整后的亮度参数值为临界参数值。In step S204, when the difference is within a preset range, it is determined that the adjusted contrast parameter value and/or the adjusted brightness parameter value is a critical parameter value.
例如,当对比度参数值为a,亮度参数值为b时,第一灰度值和第二灰度值分别对应的输出灰度值的差值在预设范围内,此时,确定a为临界对比度参数值,b为临界亮度参数值。For example, when the contrast parameter value is a and the brightness parameter value is b, the difference between the output gray value corresponding to the first gray value and the second gray value is within a preset range. At this time, it is determined that a is a critical value. Contrast parameter value, b is the critical brightness parameter value.
当然,如果基于现有的亮度调整关系式计算出的第一灰度值和第二灰度值分别对应的输出值的差值已经在预设范围内,此时,不需要再计算临界参数值,直接通过现有亮度调整关系式对图像进行处理,输出所有像素点的输出灰度值即可。Of course, if the difference between the output values corresponding to the first gray value and the second gray value calculated based on the existing brightness adjustment relationship is already within the preset range, at this time, the critical parameter value does not need to be calculated again. The image is processed directly by the existing brightness adjustment relationship, and the output gray value of all the pixels is output.
由上述描述可知,本公开实施例提供的确定临界参数值方法,通过计算第一灰度值和第二灰度值分别对应的输出灰度值在预设范围内时的差值,并不断调整对比度参数值和/或亮度参数值,将输出灰度值的差值校正在预设范围内,从而确定临界参数值。It can be seen from the above description that the method for determining the critical parameter value provided by the embodiment of the present disclosure calculates the difference between the first gray value and the second gray value respectively corresponding to the output gray value within a preset range, and continuously adjusts The contrast parameter value and/or the brightness parameter value correct the difference of the output gray value within a preset range to determine the critical parameter value.
在一些实施例中,进一步提供了另一种确定临界参数值的方法,以下分三种情况进行详细说明。In some embodiments, another method of determining a critical parameter value is further provided, which is described in detail in three cases.
情况1:临界参数值包括临界对比度参数值。Case 1: The critical parameter value includes the critical contrast parameter value.
该情况下,确定临界参数值的方法包括:In this case, the method of determining the critical parameter value includes:
将第一灰度值和第二灰度值作为输入灰度值,调整所述亮度调整关系式中的对比度参数值,并根据所述调整后的亮度调整关系式,确定所述第一输出灰度值和第二输出灰度值相等时对应的对比度参数值;Using the first gray value and the second gray value as the input gray value, adjusting the contrast parameter value in the brightness adjustment relationship, and determining the first output gray according to the adjusted brightness adjustment relationship Corresponding contrast parameter value when the degree value and the second output gray value are equal;
将所述第一输出灰度值和第二输出灰度值相等时对应的对比度参数值减去预设值后的值确定为临界对比度参数值。The value obtained by subtracting the preset contrast value from the corresponding contrast parameter value when the first output gray value and the second output gray value are equal is determined as the critical contrast parameter value.
情况2:临界参数值包括临界亮度参数值。Case 2: The critical parameter value includes the critical brightness parameter value.
在该情况下:确定临界参数值的方法包括:In this case: the method of determining the critical parameter value includes:
将所述第一灰度值和第二灰度值作为输入灰度值,调整所述亮度调整关系式中的 亮度参数值,并根据所述调整后的亮度调整关系式,确定所述第一输出灰度值和第二输出灰度值相等时对应的亮度参数值;Adjusting the first gray value and the second gray value as input gray values to adjust the brightness adjustment relationship a brightness parameter value, and determining, according to the adjusted brightness adjustment relationship, a brightness parameter value corresponding to the first output gray value and the second output gray value being equal;
将所述第一输出灰度值和第二输出灰度值相等时对应的亮度参数值减去预设值后的值确定为临界亮度参数值。The value obtained by subtracting the preset brightness value from the corresponding brightness parameter value when the first output gray value and the second output gray value are equal is determined as the critical brightness parameter value.
情况3:临界参数值包括临界对比度参数值和临界亮度参数值。Case 3: Critical parameter values include critical contrast parameter values and critical brightness parameter values.
在该情况下:确定临界参数值的方法包括:In this case: the method of determining the critical parameter value includes:
将所述第一灰度值和第二灰度值作为输入灰度值,调整所述亮度调整关系式中的对比度参数值和亮度参数值,并根据所述调整后的亮度调整关系式,确定所述第一输出灰度值和第二输出灰度值相等时对应的对比度参数值和亮度参数值;Using the first gray value and the second gray value as the input gray value, adjusting the contrast parameter value and the brightness parameter value in the brightness adjustment relationship, and determining the relationship according to the adjusted brightness adjustment relationship a contrast parameter value and a brightness parameter value when the first output gray value and the second output gray value are equal;
将所述第一输出灰度值和第二输出灰度值的差值相等时对应的对比度参数值和亮度参数值分别减去预设值后的值确定为临界对比度参数值和临界亮度参数值。When the difference between the first output gray value and the second output gray value is equal, the corresponding contrast parameter value and the brightness parameter value are respectively subtracted from the preset value, and the value is determined as the critical contrast parameter value and the critical brightness parameter value. .
由上述描述可知,本公开实施例提供的计算临界对比度参数值和/或临界亮度参数值的方法,将对比度参数值和/或亮度参数值作为未知数,令第一输出灰度值和第二输出灰度值相等,从而得出第一输出灰度值和第二输出灰度值相等时对应的对比度参数值和/或亮度参数值,然后,为了保证所有像素点的输出灰度值不达到饱和,将确定出的对比度参数值减去预设值,得到临界对比度参数值,将确定出的亮度参数值减去预设值,得到临界亮度参数值。It can be seen from the above description that the method for calculating the critical contrast parameter value and/or the critical brightness parameter value provided by the embodiment of the present disclosure has the contrast parameter value and/or the brightness parameter value as an unknown number, the first output gray value and the second output. The gray values are equal, so that the contrast parameter value and/or the brightness parameter value corresponding to the first output gray value and the second output gray value are equal, and then, in order to ensure that the output gray value of all the pixel points does not reach saturation The determined contrast parameter value is subtracted from the preset value to obtain a critical contrast parameter value, and the determined brightness parameter value is subtracted from the preset value to obtain a critical brightness parameter value.
在一些实施例中,进一步对确定第一灰度值和第二灰度值的方法进行了优化,参见图4。In some embodiments, the method of determining the first gray value and the second gray value is further optimized, see FIG.
在步骤S401中,获取当前图像帧中所有像素点的灰度值。In step S401, gray values of all pixel points in the current image frame are acquired.
在步骤S402中,将所有像素点根据灰度值由亮到暗进行排序,建立所有像素点的灰度直方图。In step S402, all the pixel points are sorted from light to dark according to the gray value, and a gray histogram of all the pixel points is established.
获取到所有像素点的灰度值后,将所有像素点由亮到暗进行排序,由于每个灰阶均对应多个像素点,也就是说存在多个像素点的灰度值相同。因此,通过灰度直方图统计所有像素点,可以确定每个灰度对应的像素点个数。同时,根据灰度直方图也可以快速确定最大灰度值和次大灰度值,也可以快速确定最小灰度值和次小灰度值。After obtaining the gray value of all the pixels, all the pixels are sorted from light to dark, since each gray level corresponds to multiple pixels, that is, there are multiple pixels with the same gray value. Therefore, by counting all the pixels by the gray histogram, the number of pixels corresponding to each gradation can be determined. At the same time, according to the gray histogram, the maximum gray value and the second largest gray value can be quickly determined, and the minimum gray value and the second small gray value can be quickly determined.
在步骤S403中,根据灰度直方图,确定第一灰度值和第二灰度值。In step S403, the first gray value and the second gray value are determined according to the gray histogram.
例如,当第一灰度值为最大灰度值,第二灰度值为次大灰度值时,通过灰度直方图对所有像素点的灰度值进行统计,不仅可以快速确定最大灰度值和次大灰度值,同时还可以统计每一个灰阶的像素点个数。灰度直方图可以根据灰度值由大到小进行排序,也可以根据灰度值由小到大进行排序,因此,通过灰度直方图可以快速确定最大 灰度值和次大灰度值。For example, when the first gray value is the maximum gray value and the second gray value is the second largest gray value, the gray value of all the pixel points is counted by the gray histogram, and the maximum gray level can be quickly determined. The value and the second largest gray value, and the number of pixels of each gray level can also be counted. The gray histogram can be sorted according to the gray value from large to small, or can be sorted according to the gray value from small to large, so the maximum can be quickly determined by the gray histogram. Gray value and second largest gray value.
当然,灰度直方图只是一种统计方式,还可以使用饼状图或线条统计图进行统计,确定第一灰度值和第二灰度值。Of course, the gray histogram is only a statistical method, and the pie chart or the line chart can also be used for statistics to determine the first gray value and the second gray value.
在一些实施例中,提供了根据灰度直方图确定第一灰度值和第二灰度值的方法,下面分两种情况进行阐述。In some embodiments, a method of determining a first gray value and a second gray value from a gray histogram is provided, which is illustrated below in two cases.
情况一:所述第一灰度值为最大灰度值,所述第二灰度值为次大灰度值Case 1: the first gray value is a maximum gray value, and the second gray value is a second largest gray value.
根据灰度直方图确定最大灰度值和次大灰度值的方法,参见图5。A method of determining the maximum gray value and the second largest gray value based on the gray histogram is shown in FIG.
在步骤S4031中,根据灰度直方图,确定所有像素点的平均灰度值。In step S4031, the average gradation value of all the pixel points is determined based on the gradation histogram.
灰度直方图中给出了所有像素点的所有灰阶值,以及每个灰阶值对应的像素点个数。因此,计算灰阶值与像素点个数的乘积的和值,然后将和值比上像素点个数,得到平均灰度值。The grayscale histogram gives all the grayscale values of all the pixels, and the number of pixels corresponding to each grayscale value. Therefore, the sum of the product of the gray scale value and the number of pixel points is calculated, and then the sum value is compared with the number of pixel points to obtain an average gray value.
因为在确定临界参数值时,需要保证最大灰度值和次大灰度值趋近相等即可,因此,为了计算方便,可以在确定过程中,舍掉小于平均灰度值的像素点。Therefore, when determining the critical parameter value, it is necessary to ensure that the maximum gray value and the second largest gray value are close to each other. Therefore, for the convenience of calculation, the pixel point smaller than the average gray value may be discarded in the determination process.
在步骤S4032中,选择灰度值大于平均灰度值的像素点,并确定所选择的像素点中不同灰度值的像素点分别在所述选择的像素点中的占比。In step S4032, pixel points whose gradation values are larger than the average gradation value are selected, and the proportion of the pixel points of the different gradation values in the selected pixel points in the selected pixel points is determined.
在步骤S4033中,舍去占比小于预设比例值的像素点,得到重新排序的灰度直方图。In step S4033, the pixel points whose ratio is smaller than the preset scale value are discarded, and a reordered gray histogram is obtained.
如果最大灰度值或次大灰度值对应的像素点个数相对较少的话,当最大灰度值和次大灰度值分别对应的输出值相等时,对图像帧的显示画面影响较小,可以忽略不计,因此,即使最大灰度值和次大灰度值分别对应的输出灰度值相等,视觉上也难以察觉到,此时可以忽略这种灰度值饱和情况。因此,在该步骤S4033中,需要舍去比例小于预设比例值的像素点。If the maximum gray value or the second largest gray value corresponds to a relatively small number of pixels, when the output values corresponding to the maximum gray value and the second largest gray value are equal, the display image of the image frame is less affected. It can be ignored. Therefore, even if the output gray values corresponding to the maximum gray value and the second largest gray value are equal, it is visually difficult to detect, and the gray value saturation can be ignored at this time. Therefore, in this step S4033, it is necessary to discard the pixel points whose ratio is smaller than the preset scale value.
在步骤S4034中,根据重新排序的灰度直方图,选择最大灰度值和次大灰度值。In step S4034, the maximum gray value and the second largest gray value are selected according to the reordered gray histogram.
由于占比小的像素点的灰度值对画面视觉影响小,因此,可以忽略占比小的像素点。所以,在本步骤中,舍去比例小于预设比例值的像素点,不计入统计范围内,在一些实施例中,预设比例值设置为3%-5%。舍去之后,按照原排序前移补位,得到新的排序,根据重新排序的灰度直方图确定最大灰度值和次大灰度值。Since the gray value of the small pixel is less affected by the visual effect of the screen, the pixel point with a smaller ratio can be ignored. Therefore, in this step, the pixel points whose ratio is less than the preset ratio value are not counted in the statistical range. In some embodiments, the preset ratio value is set to 3%-5%. After rounding off, the pre-position is complemented by the original sort to obtain a new sort, and the maximum gray value and the second largest gray value are determined according to the reordered gray histogram.
情况二:所述第一灰度值为最小灰度值,所述第二灰度值为次小灰度值Case 2: the first gray value is a minimum gray value, and the second gray value is a second small gray value
根据灰度直方图确定最小灰度值和次小灰度值的方法,包括:A method for determining a minimum gray value and a second small gray value according to a gray histogram, including:
根据所述灰度直方图,确定所有像素点的平均灰度值;Determining an average gray value of all pixels according to the gray histogram;
选择灰度值小于所述平均灰度值的像素点,并确定所选择的像素点中不同灰度值 的像素点分别在所述选择的像素点中的占比;Selecting a pixel point whose gray value is smaller than the average gray value, and determining different gray values in the selected pixel point The proportion of pixels in the selected pixel points;
舍去占比小于预设比例值的像素点,得到重新排序的灰度直方图;Retrieving a pixel whose ratio is smaller than a preset scale value, and obtaining a reordered gray histogram;
根据所述重新排序的灰度直方图,选择最小灰度值和次小灰度值。A minimum gray value and a second small gray value are selected according to the reordered gray histogram.
在该方法中,与上述实施例相同或相似的部分,在此不再赘述。In this method, the same or similar parts as those of the above embodiment will not be described herein.
由上述描述可知,本公开实施例提供的方法,通过保证第一灰度值和第二灰度值对应的像素点的比例,即舍去不同灰度值对应的像素点的比例小于预设比例的像素点,从而确定出有效的第一灰度值和第二灰度值,从而保证显示画面效果更好。It can be seen from the above description that the method provided by the embodiment of the present disclosure ensures that the proportion of the pixel points corresponding to the different gray values is less than the preset ratio by ensuring the ratio of the pixel points corresponding to the first gray value and the second gray value. The pixels are determined to determine the effective first gray value and the second gray value, thereby ensuring a better display effect.
参见图6,本公开一些实施例提供了另一种确定第一灰度值和第二灰度值的方法。Referring to Figure 6, some embodiments of the present disclosure provide another method of determining a first gray value and a second gray value.
在步骤S501中,获取当前图像帧中所有像素点的灰度值。In step S501, gray values of all the pixels in the current image frame are acquired.
在步骤S502中,根据所有像素点的阵列排序顺序,依次比较相邻两个像素点的灰度值,直至比较完所有的像素点。In step S502, the gray values of the adjacent two pixel points are sequentially compared according to the array sorting order of all the pixel points until all the pixel points are compared.
在步骤S503中,确定最终比较的灰度值最大和次大的值为最大灰度值和次大灰度值,或,确定最终比较的灰度值最小和次小的值为最小灰度值和次小灰度值。In step S503, it is determined that the maximum and second largest values of the final compared gray value are the maximum gray value and the second largest gray value, or that the minimum and minimum values of the final compared gray value are the minimum gray value. And the second small gray value.
视频处理器在解析视频信号后,获取像素点在显示屏上的排列顺序,根据像素点的排列次序,依次比较相邻两个像素点的灰度值。例如,在确定最大灰度值和次大灰度值时,比较第一个像素点和第二个像素点的灰度值,当第二个像素点的灰度值大于第一个像素点时,比较第二个像素点和第三个像素点的灰度值,依次比较直至比较完所有像素点,进而确定出最大灰度值和次大灰度值。又如,在确定最小灰度值和次小灰度值时,比较第一个像素点和第二个像素点的灰度值,当第一个像素点的灰度值小于第二个像素点时,比较第一个像素点和第三个像素点的灰度值,依次比较直至比较完所有像素点,进而确定出最小灰度值和次小灰度值。After parsing the video signal, the video processor obtains the order of the pixels on the display screen, and sequentially compares the gray values of the adjacent two pixels according to the order of the pixels. For example, when determining the maximum gray value and the second largest gray value, comparing the gray values of the first pixel point and the second pixel point, when the gray value of the second pixel point is greater than the first pixel point Comparing the gray values of the second pixel and the third pixel, and sequentially comparing until all the pixels are compared, thereby determining the maximum gray value and the second largest gray value. For another example, when determining the minimum gray value and the second small gray value, comparing the gray value of the first pixel point and the second pixel point, when the gray value of the first pixel point is smaller than the second pixel point When the gray values of the first pixel and the third pixel are compared, the pixels are compared in sequence until all the pixels are compared, thereby determining the minimum gray value and the second small gray value.
由上述描述可知,本公开实施例提供了一种确定第一灰度值和第二灰度值的方法,在确定第一灰度值和第二灰度值时,根据所有像素点的排列次数依次比较相邻两个像素点的灰度值,直至比较完所有的像素点。本实施例提供的方法计算简单方便,可以在短时间内计算出第一灰度值和第二灰度值。As can be seen from the above description, the embodiment of the present disclosure provides a method for determining a first gray value and a second gray value, according to the number of times of all pixel points when determining the first gray value and the second gray value. The gray values of the adjacent two pixels are compared in turn until all the pixels are compared. The method provided in this embodiment is simple and convenient to calculate, and the first gray value and the second gray value can be calculated in a short time.
在一些实施例中,第一灰度值为最大灰度值,第二灰度值为次大灰度值,将最大灰度值和次大灰度值作为输入灰度值,调整亮度调整关系式中的对比度参数值,当最大灰度值和次大灰度值分别对应的输出值的差值在预设范围内时,确定调整后的对比度参数值为临界对比度参数值,将临界对比度参数值作为对比度参数值代入亮度调整关系式,同时保持亮度参数值为默认值,进而得到调整后的亮度调整关系式,通过调整后的亮度调整关系式,对所述当前图像帧中的所有像素点的亮度和对比度进行调整, 输出亮度和对比度调整后的所有所述像素点的灰度值。In some embodiments, the first gray value is a maximum gray value, the second gray value is a second largest gray value, and the maximum gray value and the second largest gray value are used as input gray values, and the brightness adjustment relationship is adjusted. The value of the contrast parameter in the formula, when the difference between the output value corresponding to the maximum gray value and the second largest gray value is within a preset range, determining that the adjusted contrast parameter value is a critical contrast parameter value, and the critical contrast parameter is The value is substituted into the brightness adjustment relationship as the contrast parameter value, and the brightness parameter value is kept as the default value, thereby obtaining the adjusted brightness adjustment relationship, and all the pixels in the current image frame are adjusted by the adjusted brightness adjustment relationship. Adjust the brightness and contrast, The gray value of all the pixels after the brightness and contrast adjustment are output.
在一些实施例中,第一灰度值为最小灰度值,第二灰度值为次小灰度值,将最小灰度值和次小灰度值作为输入灰度值,当最小灰度值和次小灰度值分别对应的输出值的差值在预设范围内时,确定调整后的亮度参数值为临界亮度参数值,将临界亮度参数值作为亮度参数值代入亮度调整关系式,同时保持对比度参数值为默认值,进而得到调整后的亮度调整关系式,通过调整后的亮度调整关系式,对所述当前图像帧中的所有像素点的亮度和对比度进行调整,输出亮度和对比度调整后的所有所述像素点的灰度值。In some embodiments, the first gray value is a minimum gray value, the second gray value is a second small gray value, and the minimum gray value and the second small gray value are used as input gray values, when the minimum gray level is When the difference between the output value corresponding to the value and the second small gray value is within a preset range, it is determined that the adjusted brightness parameter value is a critical brightness parameter value, and the critical brightness parameter value is substituted as a brightness parameter value into the brightness adjustment relationship. At the same time, the contrast parameter value is kept as the default value, and the adjusted brightness adjustment relationship is obtained, and the brightness and contrast of all the pixels in the current image frame are adjusted by the adjusted brightness adjustment relationship, and the brightness and contrast are output. The adjusted gray value of all the pixels.
在一些实施例中,在调整图像的亮度和对比度时,先根据上述实施例计算临界亮度参数值,然后再计算临界对比度参数值,最后根据调整后的亮度调整关系式,计算所有像素点的输出灰度值,从而达到调整图像帧的亮度和对比度的作用。In some embodiments, when adjusting the brightness and contrast of the image, the critical brightness parameter value is first calculated according to the above embodiment, and then the critical contrast parameter value is calculated, and finally, the output of all the pixel points is calculated according to the adjusted brightness adjustment relationship. The gray value is used to adjust the brightness and contrast of the image frame.
通过上述实施例计算的像素点的输出灰度值,使灰度值低的像素点灰度值降低,也就是说使暗的像素点更暗,同时,使亮的像素点更亮,从而使图像帧的显示更加具有层次感,进而使画面的显示效果更好。The output gray value of the pixel point calculated by the above embodiment reduces the gray value of the pixel point with a low gray value, that is, makes the dark pixel point darker, and at the same time, makes the bright pixel point brighter, thereby making the bright pixel point brighter. The display of the image frame is more layered, which in turn makes the display of the picture better.
本公开实施例还提供了一种视频处理器,包括灰度值获取单元、最大和次大灰度值选择单元、临界值计算单元及图像亮度和对比度调整单元,其中:The embodiment of the present disclosure further provides a video processor, including a gray value acquiring unit, maximum and second large gray value selecting units, a threshold calculating unit, and an image brightness and contrast adjusting unit, wherein:
灰度值获取单元,用于获取当前图像帧中所有像素点的灰度值。视频处理器在解码图像帧后,获取所有像素点的灰度值。A gray value acquisition unit is configured to acquire gray values of all pixels in the current image frame. After decoding the image frame, the video processor acquires the gray values of all the pixels.
所述最大和次大灰度值选择单元,用于从所述当前图像帧的所有像素点的灰度值中选择最大灰度值和次大灰度值。其中,最大和次大灰度值选择单元可配置为根据计算所有像素点的灰度直方图,然后根据灰度值直方图确定最大灰度值和次大灰度值,或者,配置为根据像素点的排列次序,依次比较相邻两个像素点的灰度值,从而确定最大灰度值和次大灰度值。The maximum and second largest gray value selection units are configured to select a maximum gray value and a second largest gray value from gray values of all pixel points of the current image frame. The maximum and second largest gray value selection unit may be configured to calculate a gray histogram of all the pixels according to the gray value histogram, and then determine the maximum gray value and the second largest gray value, or configured to be based on the pixel. The order of the dots is sequentially compared with the gray values of the adjacent two pixels to determine the maximum gray value and the second largest gray value.
所述临界值计算单元,用于按照亮度调整关系式,调整对比度参数,将所述最大灰度值和次大灰度值作为输入灰度值,计算所述最大灰度值和次大灰度值分别对应的输出灰度值趋近相等时的临界对比度参数值。The threshold value calculation unit is configured to adjust a relationship according to a brightness adjustment, adjust a contrast parameter, and use the maximum gray value and the second largest gray value as an input gray value, and calculate the maximum gray value and the second largest gray level. The values of the critical contrast parameters when the values of the output gray values correspond to each other.
同时,临界值计算单元,用于按照亮度调整关系式,调整亮度参数,将最小灰度值和次小灰度值作为输入灰度值,计算最小灰度值和次小灰度值分别对应的输出灰度值趋近相等时的临界亮度参数值。临界值计算单元在计算临界值时,先计算临界亮度参数值,再计算临界对比度参数值。Meanwhile, the threshold value calculation unit is configured to adjust the relationship according to the brightness, adjust the brightness parameter, use the minimum gray value and the second small gray value as the input gray value, and calculate the minimum gray value and the second small gray value respectively. The value of the critical brightness parameter when the output gray values approach the same. When calculating the critical value, the threshold calculation unit first calculates the critical brightness parameter value and then calculates the critical contrast parameter value.
所述图像亮度和对比度调整单元,用于将所述临界对比度参数值作为亮度调整关 系式中的对比度参数值,对当前图像帧中的所有像素点的亮度和对比度进行调整,并输出亮度和对比度调整后的所有像素点的灰度值;同时,用于将所述临界亮度参数值作为亮度调整关系式中的亮度参数值,对当前图像帧中的所有像素点的亮度和对比度进行调整,并输出亮度和对比度调整后的所有像素点的灰度值。The image brightness and contrast adjustment unit is configured to adjust the critical contrast parameter value as a brightness The contrast parameter value in the system adjusts the brightness and contrast of all the pixels in the current image frame, and outputs the gray value of all the pixels after the brightness and contrast adjustment; meanwhile, the critical brightness parameter is used The value is used as the brightness parameter value in the brightness adjustment relationship, and the brightness and contrast of all the pixels in the current image frame are adjusted, and the gray values of all the pixels after the brightness and contrast adjustment are output.
临界值计算单元将计算得到的临界对比度参数值和/或亮度参数值输入至图像亮度和对比度调整单元,图像亮度和对比度调整单元将临界对比度参数值和/或临界亮度参数值作为亮度调整关系式中的对比度参数和/或亮度参数,并计算所有像素点的输出灰度值。The threshold value calculation unit inputs the calculated critical contrast parameter value and/or the brightness parameter value to the image brightness and contrast adjustment unit, and the image brightness and contrast adjustment unit uses the critical contrast parameter value and/or the critical brightness parameter value as the brightness adjustment relationship. Contrast parameters and/or brightness parameters in , and calculate the output gray value of all pixels.
视频处理器将输出灰度值转换为RGB信号发送至液晶模组,液晶模组根据RGB信号调整驱动电路的电压,从而控制液晶分子的偏转,最终实现图像亮度和对比度的调整。The video processor converts the output gray value into an RGB signal and sends it to the liquid crystal module. The liquid crystal module adjusts the voltage of the driving circuit according to the RGB signal, thereby controlling the deflection of the liquid crystal molecules, and finally realizing the adjustment of the brightness and contrast of the image.
参见图7,本公开一些实施例提供了一种图像处理装置,通过该装置可实现对图像亮度和对比度的调整,该装置包括:Referring to FIG. 7, some embodiments of the present disclosure provide an image processing apparatus by which adjustment of image brightness and contrast can be realized, the apparatus comprising:
至少一个处理器71;以及,At least one processor 71; and,
与所述至少一个处理器通信连接的存储器72;其中,a memory 72 communicatively coupled to the at least one processor; wherein
所述存储器72存储有可被所述至少一个处理器71执行的指令,所述指令被所述至少一个处理器71执行,以使所述至少一个处理器71能够:The memory 72 stores instructions executable by the at least one processor 71, the instructions being executed by the at least one processor 71 to enable the at least one processor 71 to:
获取当前图像帧中所有像素点的灰度值;Obtaining the gray value of all pixels in the current image frame;
从所述当前图像帧的所有像素点的灰度值中选择第一灰度值和第二灰度值;其中,所述第一灰度值为最大灰度值,所述第二灰度值为次大灰度值;或者,所述第一灰度值为最小灰度值,所述第二灰度值为次小灰度值;Selecting a first gray value and a second gray value from gray values of all pixels of the current image frame; wherein the first gray value is a maximum gray value, and the second gray value a second largest gray value; or the first gray value is a minimum gray value; the second gray value is a second small gray value;
将所述第一灰度值和第二灰度值作为输入灰度值,按照亮度调整关系式,确定所述第一灰度值对应的第一输出灰度值与所述第二灰度值对应的第二输出灰度值的差值在预设范围内时的临界参数值;其中,所述临界参数值包括临界对比度参数值和/或临界亮度参数值;Taking the first gray value and the second gray value as input gray values, determining a first output gray value corresponding to the first gray value and the second gray value according to a brightness adjustment relationship a critical parameter value when a difference between the corresponding second output gray value is within a preset range; wherein the critical parameter value includes a critical contrast parameter value and/or a critical brightness parameter value;
根据所述临界参数值调整所述亮度调整关系式中的参数,并根据调整后的亮度调整关系式对所述当前图像帧中的所有像素点的亮度和对比度进行调整,并输出亮度和对比度调整后的所有所述像素点的灰度值。Adjusting a parameter in the brightness adjustment relationship according to the critical parameter value, and adjusting brightness and contrast of all pixel points in the current image frame according to the adjusted brightness adjustment relationship, and outputting brightness and contrast adjustment The gray value of all subsequent pixels.
在一些实施例中,所述指令被所述至少一个处理器71执行,以使所述至少一个处理器71还能够:In some embodiments, the instructions are executed by the at least one processor 71 to enable the at least one processor 71 to:
将所述第一灰度值和第二灰度值作为输入灰度值,调整所述亮度调整关系式中的 对比度参数值和/或亮度参数值,并根据所述调整后的亮度调整关系式,确定所述第一输出灰度值与所述第二输出灰度值之间的差值;Adjusting the first gray value and the second gray value as input gray values to adjust the brightness adjustment relationship a contrast parameter value and/or a brightness parameter value, and determining a difference between the first output gray value and the second output gray value according to the adjusted brightness adjustment relationship;
判断所述差值是否在预设范围内;Determining whether the difference is within a preset range;
当所述差值在预设范围内时,确定所述调整后的对比度参数值和/或调整后的亮度参数值为临界参数值。When the difference is within a preset range, determining that the adjusted contrast parameter value and/or the adjusted brightness parameter value is a critical parameter value.
在一些实施例中,所述临界参数值包括临界对比度参数值,所述指令被所述至少一个处理器71执行,以使所述至少一个处理器71还能够:In some embodiments, the critical parameter value includes a critical contrast parameter value, the instructions being executed by the at least one processor 71 to enable the at least one processor 71 to further:
将所述第一灰度值和第二灰度值作为输入灰度值,调整所述亮度调整关系式中的对比度参数值,并根据所述调整后的亮度调整关系式,确定所述第一输出灰度值和第二输出灰度值相等时对应的对比度参数值;Using the first gray value and the second gray value as input gray values, adjusting a contrast parameter value in the brightness adjustment relationship, and determining the first according to the adjusted brightness adjustment relationship Corresponding contrast parameter value when the output gray value and the second output gray value are equal;
将所述第一输出灰度值和第二输出灰度值相等时对应的对比度参数值减去预设值后的值确定为临界对比度参数值。The value obtained by subtracting the preset contrast value from the corresponding contrast parameter value when the first output gray value and the second output gray value are equal is determined as the critical contrast parameter value.
在一些实施例中,所述临界参数值包括临界亮度参数值,所述指令被所述至少一个处理器71执行,以使所述至少一个处理器71还能够:In some embodiments, the critical parameter value comprises a critical brightness parameter value, the instructions being executed by the at least one processor 71 to enable the at least one processor 71 to further:
将所述第一灰度值和第二灰度值作为输入灰度值,调整所述亮度调整关系式中的亮度参数值,并根据所述调整后的亮度调整关系式,确定所述第一输出灰度值和第二输出灰度值相等时对应的亮度参数值;Using the first gray value and the second gray value as the input gray value, adjusting the brightness parameter value in the brightness adjustment relationship, and determining the first according to the adjusted brightness adjustment relationship Corresponding brightness parameter value when the output gray value and the second output gray value are equal;
将所述第一输出灰度值和第二输出灰度值相等时对应的亮度参数值减去预设值后的值确定为临界亮度参数值。The value obtained by subtracting the preset brightness value from the corresponding brightness parameter value when the first output gray value and the second output gray value are equal is determined as the critical brightness parameter value.
在一些实施例中,所述临界参数值包括临界对比度参数值和临界亮度参数值,所述指令被所述至少一个处理器71执行,以使所述至少一个处理器71还能够:In some embodiments, the critical parameter value comprises a critical contrast parameter value and a critical brightness parameter value, the instructions being executed by the at least one processor 71 to enable the at least one processor 71 to further:
将所述第一灰度值和第二灰度值作为输入灰度值,调整所述亮度调整关系式中的对比度参数值和亮度参数值,并根据所述调整后的亮度调整关系式,确定所述第一输出灰度值和第二输出灰度值相等时对应的对比度参数值和亮度参数值;Using the first gray value and the second gray value as the input gray value, adjusting the contrast parameter value and the brightness parameter value in the brightness adjustment relationship, and determining the relationship according to the adjusted brightness adjustment relationship a contrast parameter value and a brightness parameter value when the first output gray value and the second output gray value are equal;
将所述第一输出灰度值和第二输出灰度值相等时对应的对比度参数值和亮度参数值分别减去预设值后的值确定为临界对比度参数值和临界亮度参数值。When the first output gray value and the second output gray value are equal, the corresponding contrast parameter value and the brightness parameter value are respectively subtracted from the preset value, and the value is determined as the critical contrast parameter value and the critical brightness parameter value.
在一些实施例中,所述指令被所述至少一个处理器71执行,以使所述至少一个处理器71还能够:In some embodiments, the instructions are executed by the at least one processor 71 to enable the at least one processor 71 to:
将所有所述像素点根据灰度值由亮到暗进行排序,建立所有像素点的灰度直方图;All the pixels are sorted according to the gray value from light to dark, and a gray histogram of all the pixels is established;
根据所述灰度直方图,确定所述第一灰度值和第二灰度值。The first gray value and the second gray value are determined according to the gray histogram.
在一些实施例中,所述第一灰度值为最大灰度值,所述第二灰度值为次大灰度值, 所述指令被所述至少一个处理器71执行,以使所述至少一个处理器71还能够:In some embodiments, the first gray value is a maximum gray value, and the second gray value is a second largest gray value. The instructions are executed by the at least one processor 71 to enable the at least one processor 71 to:
根据所述灰度直方图,确定所有像素点的平均灰度值;Determining an average gray value of all pixels according to the gray histogram;
选择灰度值大于所述平均灰度值的像素点,并确定所选择的像素点中不同灰度值的像素点分别在所述选择的像素点中的占比;Selecting a pixel point whose gray value is greater than the average gray value, and determining a ratio of pixel points of different gray value values in the selected pixel point to the selected pixel point respectively;
舍去占比小于预设比例值的像素点,得到重新排序的灰度直方图;Retrieving a pixel whose ratio is smaller than a preset scale value, and obtaining a reordered gray histogram;
根据所述重新排序的灰度直方图,选择最大灰度值和次大灰度值。According to the reordered gray histogram, the maximum gray value and the second largest gray value are selected.
在一些实施例中,所述第一灰度值为最小灰度值,所述第二灰度值为次小灰度值,所述指令被所述至少一个处理器71执行,以使所述至少一个处理器71还能够:In some embodiments, the first gray value is a minimum gray value, the second gray value is a second small gray value, and the instruction is executed by the at least one processor 71 to cause the At least one processor 71 is also capable of:
根据所述灰度直方图,确定所有像素点的平均灰度值;Determining an average gray value of all pixels according to the gray histogram;
选择灰度值小于所述平均灰度值的像素点,并确定所选择的像素点中不同灰度值的像素点分别在所述选择的像素点中的占比;Selecting a pixel point whose gray value is smaller than the average gray value, and determining a ratio of pixel points of different gray value values in the selected pixel point to the selected pixel point respectively;
舍去占比小于预设比例值的像素点,得到重新排序的灰度直方图;Retrieving a pixel whose ratio is smaller than a preset scale value, and obtaining a reordered gray histogram;
根据所述重新排序的灰度直方图,选择最小灰度值和次小灰度值。A minimum gray value and a second small gray value are selected according to the reordered gray histogram.
在一些实施例中,所述指令被所述至少一个处理器71执行,以使所述至少一个处理器71还能够:In some embodiments, the instructions are executed by the at least one processor 71 to enable the at least one processor 71 to:
根据所有所述像素点的阵列排布顺序,依次比较相邻两个像素点的灰度值,直至比较完所有的像素点;According to the array arrangement order of all the pixel points, the gray values of the adjacent two pixel points are sequentially compared until all the pixel points are compared;
确定最终比较的灰度值最大和次大的值为最大灰度值和次大灰度值,或确定最终比较的灰度值最小和次小的值为最小灰度值和次小灰度值。The maximum and second largest values of the final comparison gray value are determined as the maximum gray value and the second largest gray value, or the minimum and second small values of the final comparison gray value are determined as the minimum gray value and the second small gray value. .
本公开一些实施例还提供了一种液晶显示装置,包括液晶模组、背光模组、视频处理器及存储有可被所述视频处理器执行的指令的存储器,所述视频处理器分别与液晶模组和背光模组电连接,用于将解析后的视频信号发送至液晶模组和背光模组中,控制液晶模组的显示亮度、对比度及色彩等,同时控制背光模组的亮度;其中,Some embodiments of the present disclosure further provide a liquid crystal display device including a liquid crystal module, a backlight module, a video processor, and a memory storing instructions executable by the video processor, the video processor and the liquid crystal respectively The module and the backlight module are electrically connected to send the parsed video signal to the liquid crystal module and the backlight module, and control the display brightness, contrast and color of the liquid crystal module, and control the brightness of the backlight module; ,
所述指令被所述视频处理器执行,以使所述视频处理器能够:The instructions are executed by the video processor to enable the video processor to:
获取当前图像帧中所有像素点的灰度值;Obtaining the gray value of all pixels in the current image frame;
从所述当前图像帧的所有像素点的灰度值中选择第一灰度值和第二灰度值;其中,所述第一灰度值为最大灰度值,所述第二灰度值为次大灰度值;或者,所述第一灰度值为最小灰度值,所述第二灰度值为次小灰度值;Selecting a first gray value and a second gray value from gray values of all pixels of the current image frame; wherein the first gray value is a maximum gray value, and the second gray value a second largest gray value; or the first gray value is a minimum gray value; the second gray value is a second small gray value;
将所述第一灰度值和第二灰度值作为输入灰度值,按照亮度调整关系式,确定所述第一灰度值对应的第一输出灰度值与所述第二灰度值对应的第二输出灰度值的差值在预设范围内时的临界参数值;其中,所述临界参数值包括临界对比度参数值和/或临 界亮度参数值;Taking the first gray value and the second gray value as input gray values, determining a first output gray value corresponding to the first gray value and the second gray value according to a brightness adjustment relationship a critical parameter value when a difference between the corresponding second output gray value is within a preset range; wherein the critical parameter value includes a critical contrast parameter value and/or Boundary brightness parameter value;
根据所述临界参数值调整所述亮度调整关系式中的参数,并根据调整后的亮度调整关系式对所述当前图像帧中的所有像素点的亮度和对比度进行调整,并输出亮度和对比度调整后的所有所述像素点的灰度值。Adjusting a parameter in the brightness adjustment relationship according to the critical parameter value, and adjusting brightness and contrast of all pixel points in the current image frame according to the adjusted brightness adjustment relationship, and outputting brightness and contrast adjustment The gray value of all subsequent pixels.
在通过上述液晶显示装置实现对图像的亮度和对比度的调整时,其具体实现方式可参考上文中任一实施例,在此不再赘述。For the specific implementation of the adjustment of the brightness and the contrast of the image by the above-mentioned liquid crystal display device, refer to any of the above embodiments, and details are not described herein again.
本领域技术人员在考虑说明书及实践这里发明的公开后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the present disclosure will be apparent to those skilled in the <RTIgt; The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure, which are in accordance with the general principles of the present disclosure and include common general knowledge or conventional technical means in the art that are not disclosed in the present disclosure. . The specification and examples are to be regarded as illustrative only,
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围的情况下进行各种修改和改变。这样,倘若本公开的这些修改和变型属于本公开权利要求及其等同技术的范围之内,则本公开也意图包含这些改动和变型在内。 It is to be understood that the present invention is not limited to the precise structures shown and described in the drawings, and various modifications and changes can be made without departing from the scope thereof. Thus, it is intended that the present invention cover the modifications and the modifications

Claims (20)

  1. 一种图像处理装置,其特征在于,包括:至少一个处理器;以及,An image processing apparatus, comprising: at least one processor;
    与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
    获取当前图像帧中所有像素点的灰度值;Obtaining the gray value of all pixels in the current image frame;
    从所述当前图像帧的所有像素点的灰度值中选择第一灰度值和第二灰度值;其中,所述第一灰度值为最大灰度值,所述第二灰度值为次大灰度值;或者,所述第一灰度值为最小灰度值,所述第二灰度值为次小灰度值;Selecting a first gray value and a second gray value from gray values of all pixels of the current image frame; wherein the first gray value is a maximum gray value, and the second gray value a second largest gray value; or the first gray value is a minimum gray value; the second gray value is a second small gray value;
    将所述第一灰度值和第二灰度值作为输入灰度值,按照亮度调整关系式,确定所述第一灰度值对应的第一输出灰度值与所述第二灰度值对应的第二输出灰度值的差值在预设范围内时的临界参数值;其中,所述临界参数值包括临界对比度参数值和/或临界亮度参数值;Taking the first gray value and the second gray value as input gray values, determining a first output gray value corresponding to the first gray value and the second gray value according to a brightness adjustment relationship a critical parameter value when a difference between the corresponding second output gray value is within a preset range; wherein the critical parameter value includes a critical contrast parameter value and/or a critical brightness parameter value;
    根据所述临界参数值调整所述亮度调整关系式中的参数,并根据调整后的亮度调整关系式对所述当前图像帧中的所有像素点的亮度和对比度进行调整,并输出亮度和对比度调整后的所有所述像素点的灰度值。Adjusting a parameter in the brightness adjustment relationship according to the critical parameter value, and adjusting brightness and contrast of all pixel points in the current image frame according to the adjusted brightness adjustment relationship, and outputting brightness and contrast adjustment The gray value of all subsequent pixels.
  2. 根据权利要求1所述的装置,其特征在于,所述指令被所述至少一个处理器执行,以使所述至少一个处理器还能够:The apparatus of claim 1 wherein said instructions are executed by said at least one processor such that said at least one processor is further capable of:
    将所述第一灰度值和第二灰度值作为输入灰度值,调整所述亮度调整关系式中的对比度参数值和/或亮度参数值,并根据所述调整后的亮度调整关系式,确定所述第一输出灰度值与所述第二输出灰度值之间的差值;Using the first gray value and the second gray value as input gray values, adjusting a contrast parameter value and/or a brightness parameter value in the brightness adjustment relationship, and adjusting a relationship according to the adjusted brightness Determining a difference between the first output gray value and the second output gray value;
    判断所述差值是否在预设范围内;Determining whether the difference is within a preset range;
    当所述差值在预设范围内时,确定所述调整后的对比度参数值和/或调整后的亮度参数值为临界参数值。When the difference is within a preset range, determining that the adjusted contrast parameter value and/or the adjusted brightness parameter value is a critical parameter value.
  3. 根据权利要求1所述的装置,其特征在于,所述临界参数值包括临界对比度参数值,所述指令被所述至少一个处理器执行,以使所述至少一个处理器还能够:The apparatus of claim 1 wherein said critical parameter value comprises a critical contrast parameter value, said instructions being executed by said at least one processor to enable said at least one processor to further:
    将所述第一灰度值和第二灰度值作为输入灰度值,调整所述亮度调整关系式中的对比度参数值,并根据所述调整后的亮度调整关系式,确定所述第一输出灰度值和第二输出灰度值相等时的对比度参数值;Using the first gray value and the second gray value as input gray values, adjusting a contrast parameter value in the brightness adjustment relationship, and determining the first according to the adjusted brightness adjustment relationship a contrast parameter value when the output gray value and the second output gray value are equal;
    将所述第一输出灰度值和第二输出灰度值相等时对应的对比度参数值减去预设 值后的值确定为临界对比度参数值。Subtracting the preset contrast parameter value when the first output gray value and the second output gray value are equal The value after the value is determined as the critical contrast parameter value.
  4. 根据权利要求1所述的装置,其特征在于,所述临界参数值包括临界亮度参数值,所述指令被所述至少一个处理器执行,以使所述至少一个处理器还能够:The apparatus of claim 1 wherein said critical parameter value comprises a critical brightness parameter value, said instructions being executed by said at least one processor to enable said at least one processor to further:
    将所述第一灰度值和第二灰度值作为输入灰度值,调整所述亮度调整关系式中的亮度参数值,并根据所述调整后的亮度调整关系式,确定所述第一输出灰度值和第二输出灰度值相等时对应的亮度参数值;Using the first gray value and the second gray value as the input gray value, adjusting the brightness parameter value in the brightness adjustment relationship, and determining the first according to the adjusted brightness adjustment relationship Corresponding brightness parameter value when the output gray value and the second output gray value are equal;
    将所述第一输出灰度值和第二输出灰度值相等时对应的亮度参数值减去预设值后的值确定为临界亮度参数值。The value obtained by subtracting the preset brightness value from the corresponding brightness parameter value when the first output gray value and the second output gray value are equal is determined as the critical brightness parameter value.
  5. 根据权利要求1所述的装置,其特征在于,所述临界参数值包括临界对比度参数值和临界亮度参数值,所述指令被所述至少一个处理器执行,以使所述至少一个处理器还能够:The apparatus of claim 1 wherein said critical parameter value comprises a critical contrast parameter value and a critical brightness parameter value, said instructions being executed by said at least one processor to cause said at least one processor to further were able:
    将所述第一灰度值和第二灰度值作为输入灰度值,调整所述亮度调整关系式中的对比度参数值和亮度参数值,并根据所述调整后的亮度调整关系式,确定所述第一输出灰度值和第二输出灰度值相等时对应的对比度参数值和亮度参数值;Using the first gray value and the second gray value as the input gray value, adjusting the contrast parameter value and the brightness parameter value in the brightness adjustment relationship, and determining the relationship according to the adjusted brightness adjustment relationship a contrast parameter value and a brightness parameter value when the first output gray value and the second output gray value are equal;
    将所述第一输出灰度值和第二输出灰度值相等时对应的对比度参数值和亮度参数值分别减去预设值后的值确定为临界对比度参数值和临界亮度参数值。When the first output gray value and the second output gray value are equal, the corresponding contrast parameter value and the brightness parameter value are respectively subtracted from the preset value, and the value is determined as the critical contrast parameter value and the critical brightness parameter value.
  6. 根据权利要求1所述的装置,其特征在于,所述指令被所述至少一个处理器执行,以使所述至少一个处理器还能够:The apparatus of claim 1 wherein said instructions are executed by said at least one processor such that said at least one processor is further capable of:
    将所有所述像素点根据灰度值由亮到暗进行排序,建立所有像素点的灰度直方图;根据所述灰度直方图,确定所述第一灰度值和第二灰度值。All the pixels are sorted according to the gray value from light to dark, and a gray histogram of all the pixels is established; and the first gray value and the second gray value are determined according to the gray histogram.
  7. 根据权利要求6所述的装置,其特征在于,所述第一灰度值为最大灰度值,所述第二灰度值为次大灰度值,所述指令被所述至少一个处理器执行,以使所述至少一个处理器还能够:The apparatus according to claim 6, wherein said first gray value is a maximum gray value, said second gray value is a second largest gray value, said instruction being said at least one processor Executing to enable the at least one processor to also:
    根据所述灰度直方图,确定所有像素点的平均灰度值;Determining an average gray value of all pixels according to the gray histogram;
    选择灰度值大于所述平均灰度值的像素点,并确定所选择的像素点中不同灰度值的像素点分别在所述选择的像素点中的占比;Selecting a pixel point whose gray value is greater than the average gray value, and determining a ratio of pixel points of different gray value values in the selected pixel point to the selected pixel point respectively;
    舍去占比小于预设比例值的像素点,得到重新排序的灰度直方图;Retrieving a pixel whose ratio is smaller than a preset scale value, and obtaining a reordered gray histogram;
    根据所述重新排序的灰度直方图,选择最大灰度值和次大灰度值。According to the reordered gray histogram, the maximum gray value and the second largest gray value are selected.
  8. 根据权利要求6所述的装置,其特征在于,所述第一灰度值为最小灰度值,所述第二灰度值为次小灰度值,所述指令被所述至少一个处理器执行,以使所述至少一个处理器还能够: The apparatus according to claim 6, wherein said first gray value is a minimum gray value, said second gray value is a second small gray value, said instruction being said at least one processor Executing to enable the at least one processor to also:
    根据所述灰度直方图,确定所有像素点的平均灰度值;Determining an average gray value of all pixels according to the gray histogram;
    选择灰度值小于所述平均灰度值的像素点,并确定所选择的像素点中不同灰度值的像素点分别在所述选择的像素点中的占比;Selecting a pixel point whose gray value is smaller than the average gray value, and determining a ratio of pixel points of different gray value values in the selected pixel point to the selected pixel point respectively;
    舍去占比小于预设比例值的像素点,得到重新排序的灰度直方图;Retrieving a pixel whose ratio is smaller than a preset scale value, and obtaining a reordered gray histogram;
    根据所述重新排序的灰度直方图,选择最小灰度值和次小灰度值。A minimum gray value and a second small gray value are selected according to the reordered gray histogram.
  9. 根据权利要求1所述的装置,其特征在于,所述指令被所述至少一个处理器执行,以使所述至少一个处理器还能够:The apparatus of claim 1 wherein said instructions are executed by said at least one processor such that said at least one processor is further capable of:
    根据所有所述像素点的阵列排布顺序,依次比较相邻两个像素点的灰度值,直至比较完所有的像素点;According to the array arrangement order of all the pixel points, the gray values of the adjacent two pixel points are sequentially compared until all the pixel points are compared;
    确定最终比较的灰度值最大和次大的值为最大灰度值和次大灰度值,或,确定最终比较的灰度值最小和次小的值为最小灰度值和次小灰度值。The maximum and second largest values of the final comparison gray value are determined as the maximum gray value and the second largest gray value, or the minimum and second small values of the final comparison gray value are determined as the minimum gray value and the second small gray level. value.
  10. 一种图像处理方法,其特征在于,包括:An image processing method, comprising:
    获取当前图像帧中所有像素点的灰度值;Obtaining the gray value of all pixels in the current image frame;
    从所述当前图像帧的所有像素点的灰度值中选择第一灰度值和第二灰度值;其中,所述第一灰度值为最大灰度值,所述第二灰度值为次大灰度值;或者,所述第一灰度值为最小灰度值,所述第二灰度值为次小灰度值;Selecting a first gray value and a second gray value from gray values of all pixels of the current image frame; wherein the first gray value is a maximum gray value, and the second gray value a second largest gray value; or the first gray value is a minimum gray value; the second gray value is a second small gray value;
    将所述第一灰度值和第二灰度值作为输入灰度值,按照亮度调整关系式,确定所述第一灰度值对应的第一输出灰度值与所述第二灰度值对应的第二输出灰度值的差值在预设范围内时的临界参数值;其中,所述临界参数值包括临界对比度参数值和/或临界亮度参数值;Taking the first gray value and the second gray value as input gray values, determining a first output gray value corresponding to the first gray value and the second gray value according to a brightness adjustment relationship a critical parameter value when a difference between the corresponding second output gray value is within a preset range; wherein the critical parameter value includes a critical contrast parameter value and/or a critical brightness parameter value;
    根据所述临界参数值调整所述亮度调整关系式中的参数,并根据调整后的亮度调整关系式对所述当前图像帧中的所有像素点的亮度和对比度进行调整,输出亮度和对比度调整后的所有所述像素点的灰度值。Adjusting a parameter in the brightness adjustment relationship according to the critical parameter value, and adjusting brightness and contrast of all pixel points in the current image frame according to the adjusted brightness adjustment relationship, and outputting brightness and contrast adjustment The gray value of all the pixels.
  11. 根据权利要求10所述的方法,其特征在于,将所述第一灰度值和第二灰度值作为输入灰度值,按照亮度调整关系式,确定所述第一灰度值对应的第一输出值与所述第二灰度值对应的第二输出灰度值的差值在预设范围内时的临界参数值,包括:The method according to claim 10, wherein the first gray value and the second gray value are used as input gray values, and the first gray value is determined according to the brightness adjustment relationship. A critical parameter value when a difference between the output value and the second output gray value corresponding to the second gray value is within a preset range, including:
    将所述第一灰度值和第二灰度值作为输入灰度值,调整所述亮度调整关系式中的对比度参数值和/或亮度参数值,并根据所述调整后的亮度调整关系式,确定所述第一输出灰度值与所述第二输出灰度值之间的差值;Using the first gray value and the second gray value as input gray values, adjusting a contrast parameter value and/or a brightness parameter value in the brightness adjustment relationship, and adjusting a relationship according to the adjusted brightness Determining a difference between the first output gray value and the second output gray value;
    判断所述差值是否在预设范围内;Determining whether the difference is within a preset range;
    当所述差值在预设范围内时,确定所述调整后的对比度参数值和/或调整后的亮度 参数值为临界参数值。Determining the adjusted contrast parameter value and/or the adjusted brightness when the difference is within a preset range The parameter value is a critical parameter value.
  12. 根据权利要求10所述的方法,其特征在于,所述临界参数值包括临界对比度参数值,将所述第一灰度值和第二灰度值作为输入灰度值,按照亮度调整关系式,确定所述第一灰度值对应的第一输出值与所述第二灰度值对应的第二输出灰度值的差值在预设范围内时的临界参数值包括:The method according to claim 10, wherein the critical parameter value comprises a critical contrast parameter value, and the first gray value and the second gray value are used as input gray values, and the relationship is adjusted according to the brightness. The determining the critical parameter value when the difference between the first output value corresponding to the first gray value and the second output gray value corresponding to the second gray value is within a preset range includes:
    将所述第一灰度值和第二灰度值作为输入灰度值,调整所述亮度调整关系式中的对比度参数值,并根据所述调整后的亮度调整关系式,确定所述第一输出灰度值和第二输出灰度值相等时对应的对比度参数值;Using the first gray value and the second gray value as input gray values, adjusting a contrast parameter value in the brightness adjustment relationship, and determining the first according to the adjusted brightness adjustment relationship Corresponding contrast parameter value when the output gray value and the second output gray value are equal;
    将所述第一输出灰度值和第二输出灰度值相等时对应的对比度参数值减去预设值后的值确定为临界对比度参数值。The value obtained by subtracting the preset contrast value from the corresponding contrast parameter value when the first output gray value and the second output gray value are equal is determined as the critical contrast parameter value.
  13. 根据权利要求10所述的方法,其特征在于,所述临界参数值包括临界亮度参数值,将所述第一灰度值和第二灰度值作为输入灰度值,按照亮度调整关系式,确定所述第一灰度值对应的第一输出值与所述第二灰度值对应的第二输出灰度值的差值在预设范围内时的临界参数值包括:The method according to claim 10, wherein the critical parameter value comprises a critical brightness parameter value, and the first gray value and the second gray value are used as input gray values, and the relationship is adjusted according to the brightness. The determining the critical parameter value when the difference between the first output value corresponding to the first gray value and the second output gray value corresponding to the second gray value is within a preset range includes:
    将所述第一灰度值和第二灰度值作为输入灰度值,调整所述亮度调整关系式中的亮度参数值,并根据所述调整后的亮度调整关系式,确定所述第一输出灰度值和第二输出灰度值相等时对应的亮度参数值;Using the first gray value and the second gray value as the input gray value, adjusting the brightness parameter value in the brightness adjustment relationship, and determining the first according to the adjusted brightness adjustment relationship Corresponding brightness parameter value when the output gray value and the second output gray value are equal;
    将所述第一输出灰度值和第二输出灰度值相等时对应的亮度参数值减去预设值后的值确定为临界亮度参数值。The value obtained by subtracting the preset brightness value from the corresponding brightness parameter value when the first output gray value and the second output gray value are equal is determined as the critical brightness parameter value.
  14. 根据权利要求10所述的方法,其特征在于,所述临界参数值包括临界对比度参数值和临界亮度参数值,将所述第一灰度值和第二灰度值作为输入灰度值,按照亮度调整关系式,确定所述第一灰度值对应的第一输出值与所述第二灰度值对应的第二输出灰度值的差值在预设范围内时的临界参数值包括:The method according to claim 10, wherein the critical parameter value comprises a critical contrast parameter value and a critical brightness parameter value, and the first gray value and the second gray value are used as input gray values, according to The brightness adjustment relationship determines that the critical parameter value when the difference between the first output value corresponding to the first gray value and the second output gray value corresponding to the second gray value is within a preset range includes:
    将所述第一灰度值和第二灰度值作为输入灰度值,调整所述亮度调整关系式中的对比度参数值和亮度参数值,并根据所述调整后的亮度调整关系式,确定所述第一输出灰度值和第二输出灰度值相等时对应的对比度参数值和亮度参数值;Using the first gray value and the second gray value as the input gray value, adjusting the contrast parameter value and the brightness parameter value in the brightness adjustment relationship, and determining the relationship according to the adjusted brightness adjustment relationship a contrast parameter value and a brightness parameter value when the first output gray value and the second output gray value are equal;
    将所述第一输出灰度值和第二输出灰度值相等时对应的对比度参数值和亮度参数值分别减去预设值后的值确定为临界对比度参数值和临界亮度参数值。When the first output gray value and the second output gray value are equal, the corresponding contrast parameter value and the brightness parameter value are respectively subtracted from the preset value, and the value is determined as the critical contrast parameter value and the critical brightness parameter value.
  15. 根据权利要求10所述的方法,其特征在于,从所述当前图像帧的所有像素点的灰度值中选择第一灰度值和第二灰度值包括:The method according to claim 10, wherein selecting the first gray value and the second gray value from gray values of all pixels of the current image frame comprises:
    将所有所述像素点根据灰度值由亮到暗进行排序,建立所有像素点的灰度直方图; All the pixels are sorted according to the gray value from light to dark, and a gray histogram of all the pixels is established;
    根据所述灰度直方图,确定所述第一灰度值和第二灰度值。The first gray value and the second gray value are determined according to the gray histogram.
  16. 根据权利要求15所述的方法,其特征在于,所述第一灰度值为最大灰度值,所述第二灰度值为次大灰度值,根据所述灰度直方图,确定所述最大灰度值和次大灰度值包括:The method according to claim 15, wherein said first gray value is a maximum gray value, and said second gray value is a second largest gray value, and said gray level histogram is used to determine The maximum gray value and the second largest gray value include:
    根据所述灰度直方图,确定所有像素点的平均灰度值;Determining an average gray value of all pixels according to the gray histogram;
    选择灰度值大于所述平均灰度值的像素点,并确定所选择的像素点中不同灰度值的像素点分别在所述选择的像素点中的占比;Selecting a pixel point whose gray value is greater than the average gray value, and determining a ratio of pixel points of different gray value values in the selected pixel point to the selected pixel point respectively;
    舍去占比小于预设比例值的像素点,得到重新排序的灰度直方图;Retrieving a pixel whose ratio is smaller than a preset scale value, and obtaining a reordered gray histogram;
    根据所述重新排序的灰度直方图,选择最大灰度值和次大灰度值。According to the reordered gray histogram, the maximum gray value and the second largest gray value are selected.
  17. 根据权利要求15所述的方法,其特征在于,所述第一灰度值为最小灰度值,所述第二灰度值为次小灰度值,根据所述灰度直方图,确定所述最小灰度值和次小灰度值包括:The method according to claim 15, wherein said first gray value is a minimum gray value, and said second gray value is a second small gray value, and said gray level histogram is used to determine The minimum gray value and the second small gray value include:
    根据所述灰度直方图,确定所有像素点的平均灰度值;Determining an average gray value of all pixels according to the gray histogram;
    选择灰度值小于所述平均灰度值的像素点,并确定所选择的像素点中不同灰度值的像素点分别在所述选择的像素点中的占比;Selecting a pixel point whose gray value is smaller than the average gray value, and determining a ratio of pixel points of different gray value values in the selected pixel point to the selected pixel point respectively;
    舍去占比小于预设比例值的像素点,得到重新排序的灰度直方图;Retrieving a pixel whose ratio is smaller than a preset scale value, and obtaining a reordered gray histogram;
    根据所述重新排序的灰度直方图,选择最小灰度值和次小灰度值。A minimum gray value and a second small gray value are selected according to the reordered gray histogram.
  18. 根据权利要求10所述的方法,其特征在于,从所述当前图像帧的所有像素点的灰度值中选择第一灰度值和第二灰度值包括:The method according to claim 10, wherein selecting the first gray value and the second gray value from gray values of all pixels of the current image frame comprises:
    根据所有所述像素点的阵列排布顺序,依次比较相邻两个像素点的灰度值,直至比较完所有的像素点;According to the array arrangement order of all the pixel points, the gray values of the adjacent two pixel points are sequentially compared until all the pixel points are compared;
    确定最终比较的灰度值最大和次大的值为最大灰度值和次大灰度值,或,确定最终比较的灰度值最小和次小的值为最小灰度值和次小灰度值。The maximum and second largest values of the final comparison gray value are determined as the maximum gray value and the second largest gray value, or the minimum and second small values of the final comparison gray value are determined as the minimum gray value and the second small gray level. value.
  19. 根据权利要求10所述的方法,其特征在于,所述亮度调整关系式为:The method of claim 10 wherein said brightness adjustment relationship is:
    Y(out)=Gain·Y(in)+Offset;Y(out)=Gain·Y(in)+Offset;
    其中,Y(out)表示图像信号中的像素点的亮度调整后的输出灰度值,Y(in)表示图像信号中像素点的输入灰度值,Gain表示对比度参数,Offset表示亮度参数。Wherein Y(out) represents the output gradation value after the brightness adjustment of the pixel point in the image signal, Y(in) represents the input gradation value of the pixel point in the image signal, Gain represents the contrast parameter, and Offset represents the illuminance parameter.
  20. 一种液晶显示装置,其特征在于,包括:液晶模组、背光模组、视频处理器及存储有可被所述视频处理器执行的指令的存储器,所述视频处理器分别与所述液晶模组和背光模组电连接,并控制所述液晶模组的显示及背光模组的发光;其中,A liquid crystal display device, comprising: a liquid crystal module, a backlight module, a video processor, and a memory storing instructions executable by the video processor, wherein the video processor and the liquid crystal mode respectively The group and the backlight module are electrically connected, and control the display of the liquid crystal module and the illumination of the backlight module; wherein
    所述指令被所述视频处理器执行,以使所述视频处理器能够: The instructions are executed by the video processor to enable the video processor to:
    获取当前图像帧中所有像素点的灰度值;Obtaining the gray value of all pixels in the current image frame;
    从所述当前图像帧的所有像素点的灰度值中选择第一灰度值和第二灰度值;其中,所述第一灰度值为最大灰度值,所述第二灰度值为次大灰度值;或者,所述第一灰度值为最小灰度值,所述第二灰度值为次小灰度值;Selecting a first gray value and a second gray value from gray values of all pixels of the current image frame; wherein the first gray value is a maximum gray value, and the second gray value a second largest gray value; or the first gray value is a minimum gray value; the second gray value is a second small gray value;
    将所述第一灰度值和第二灰度值作为输入灰度值,按照亮度调整关系式,确定所述第一灰度值对应的第一输出灰度值与所述第二灰度值对应的第二输出灰度值的差值在预设范围内时的临界参数值;其中,所述临界参数值包括临界对比度参数值和/或临界亮度参数值;Taking the first gray value and the second gray value as input gray values, determining a first output gray value corresponding to the first gray value and the second gray value according to a brightness adjustment relationship a critical parameter value when a difference between the corresponding second output gray value is within a preset range; wherein the critical parameter value includes a critical contrast parameter value and/or a critical brightness parameter value;
    根据所述临界参数值调整所述亮度调整关系式中的参数,并根据调整后的亮度调整关系式对所述当前图像帧中的所有像素点的亮度和对比度进行调整,并输出亮度和对比度调整后的所有所述像素点的灰度值。 Adjusting a parameter in the brightness adjustment relationship according to the critical parameter value, and adjusting brightness and contrast of all pixel points in the current image frame according to the adjusted brightness adjustment relationship, and outputting brightness and contrast adjustment The gray value of all subsequent pixels.
PCT/CN2017/095337 2016-11-08 2017-07-31 Image processing device and method, and a liquid crystal display device WO2018086388A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610981698.9 2016-11-08
CN201610981698.9A CN106531092B (en) 2016-11-08 2016-11-08 Adjust method, video processor and the display device of brightness of image and contrast

Publications (1)

Publication Number Publication Date
WO2018086388A1 true WO2018086388A1 (en) 2018-05-17

Family

ID=58350277

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/095337 WO2018086388A1 (en) 2016-11-08 2017-07-31 Image processing device and method, and a liquid crystal display device

Country Status (2)

Country Link
CN (1) CN106531092B (en)
WO (1) WO2018086388A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112863010A (en) * 2020-12-29 2021-05-28 宁波友好智能安防科技有限公司 Video image processing system of anti-theft lock
CN113808045A (en) * 2021-09-18 2021-12-17 凌云光技术股份有限公司 Image brightness adjusting method and device

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106531092B (en) * 2016-11-08 2019-08-06 青岛海信电器股份有限公司 Adjust method, video processor and the display device of brightness of image and contrast
CN107610669B (en) * 2017-10-30 2020-05-12 海信视像科技股份有限公司 Image gray scale brightness compensation method and device
CN108009997B (en) * 2017-11-08 2022-05-13 海信视像科技股份有限公司 Method and device for adjusting image contrast
CN107945163B (en) * 2017-11-23 2020-04-28 广州酷狗计算机科技有限公司 Image enhancement method and device
CN108447037B (en) * 2018-03-26 2022-02-18 上海顺久电子科技有限公司 Method and device for enhancing dynamic range of image
CN108830815B (en) * 2018-06-22 2022-02-11 上海顺久电子科技有限公司 Method, device and terminal for improving contrast of image dark area
CN109246669A (en) * 2018-09-27 2019-01-18 江西华兴信息产业有限公司 A kind of dynamic lamp box based on bluetooth transmission
CN109285521B (en) 2018-11-20 2020-09-08 惠科股份有限公司 Pixel driving method, pixel driving device and computer equipment
CN110766636B (en) * 2019-10-28 2022-06-07 河南大学 Intelligent image processing method for AI chip
CN113963643A (en) * 2020-07-20 2022-01-21 深圳光峰科技股份有限公司 Display method and related device
CN112184685B (en) * 2020-10-09 2022-11-18 合肥芯颖科技有限公司 Image data determination method and device
CN112365861B (en) * 2020-10-26 2022-07-08 深圳Tcl新技术有限公司 Display image adjusting method, electronic device and computer readable storage medium
CN113099200B (en) * 2021-06-10 2021-09-03 深圳市火乐科技发展有限公司 Method, apparatus, storage medium, and electronic device for processing video signal
CN117640853B (en) * 2023-11-29 2024-07-09 惠然科技有限公司 Method for automatically adjusting brightness and contrast of scanning electron microscope image and related product

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2403095A (en) * 1994-05-17 1995-12-05 University Of British Columbia, The System for reducing beat type impairments in a tv signal
JP2011049753A (en) * 2009-08-26 2011-03-10 Konica Minolta Business Technologies Inc Image processing apparatus
CN103310765A (en) * 2013-06-14 2013-09-18 青岛海信信芯科技有限公司 Backlight brightness compensation method and display device
CN104240666A (en) * 2014-09-17 2014-12-24 深圳市华星光电技术有限公司 Video processing method and device
CN104732487A (en) * 2013-12-20 2015-06-24 比亚迪股份有限公司 Method and system for enhancing picture contrast
CN106531092A (en) * 2016-11-08 2017-03-22 青岛海信电器股份有限公司 Method for adjusting image brightness and contrast ratio, video processor and display device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101030544B1 (en) * 2003-12-29 2011-04-26 엘지디스플레이 주식회사 Method and Apparatus of Driving Liquid Crystal Display
CN2838184Y (en) * 2005-10-19 2006-11-15 上海广电(集团)有限公司中央研究院 Border-based bar chart equalizer
CN101206322A (en) * 2006-12-22 2008-06-25 奇美电子股份有限公司 Method and device for adjusting pixel gray level value of LCD
CN101399909B (en) * 2007-09-28 2011-05-04 奇景光电股份有限公司 Adaptive image regulating method and image processing device using the method
CN201910868U (en) * 2010-12-30 2011-07-27 无锡华润矽科微电子有限公司 Automatic dynamic contrast control circuit
CN102752604B (en) * 2012-06-18 2015-04-29 深圳创维-Rgb电子有限公司 Image display method and intelligent device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2403095A (en) * 1994-05-17 1995-12-05 University Of British Columbia, The System for reducing beat type impairments in a tv signal
JP2011049753A (en) * 2009-08-26 2011-03-10 Konica Minolta Business Technologies Inc Image processing apparatus
CN103310765A (en) * 2013-06-14 2013-09-18 青岛海信信芯科技有限公司 Backlight brightness compensation method and display device
CN104732487A (en) * 2013-12-20 2015-06-24 比亚迪股份有限公司 Method and system for enhancing picture contrast
CN104240666A (en) * 2014-09-17 2014-12-24 深圳市华星光电技术有限公司 Video processing method and device
CN106531092A (en) * 2016-11-08 2017-03-22 青岛海信电器股份有限公司 Method for adjusting image brightness and contrast ratio, video processor and display device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112863010A (en) * 2020-12-29 2021-05-28 宁波友好智能安防科技有限公司 Video image processing system of anti-theft lock
CN112863010B (en) * 2020-12-29 2022-08-05 宁波友好智能安防科技有限公司 Video image processing system of anti-theft lock
CN113808045A (en) * 2021-09-18 2021-12-17 凌云光技术股份有限公司 Image brightness adjusting method and device

Also Published As

Publication number Publication date
CN106531092A (en) 2017-03-22
CN106531092B (en) 2019-08-06

Similar Documents

Publication Publication Date Title
WO2018086388A1 (en) Image processing device and method, and a liquid crystal display device
WO2020224387A1 (en) Drive method, drive apparatus, display device, and computer-readable medium
US10008148B2 (en) Image processing apparatus, image processing method, display device, computer program and computer-readable medium
WO2017121140A1 (en) Display control method and device for liquid crystal display screen
JP5575900B2 (en) Display control method, display control device, liquid crystal display device, display control program, and computer-readable recording medium
CN101383132B (en) Liquid crystal display method
US9990878B2 (en) Data clipping method using red, green, blue and white data, and display device using the same
WO2013099350A1 (en) Image display device
CN101281730A (en) Liquid crystal display method
US10204568B2 (en) Driving methods and driving devices of display panels
US9508281B2 (en) Apparatus and method for image analysis and image display
CN110784701B (en) Display apparatus and image processing method thereof
CN109637437B (en) Image display control method, device, medium and display screen control system
US7684638B2 (en) Dynamic image contrast enhancement device
US20180182344A1 (en) Display driving circuit and liquid crystal display (lcd) panel thereof
US10347199B2 (en) Driving methods and driving devices of display panels
US10593293B2 (en) Display device and backlight driving method thereof
WO2019080446A1 (en) Display apparatus driving method, and display apparatus
US11605356B2 (en) Driving display apparatus and method acquiring current duty to drive backlight unit based on excluding text area in input image
US8576158B2 (en) Contrast ratio promotion method
CN110570824B (en) Liquid crystal display, image display method thereof and backlight control device
TWI410943B (en) Liquid crystal display for reducing motion blur
CN108962155A (en) Luminance regulating method and display
US10685607B2 (en) Adjustment method for display de-Mura
CN109640155B (en) Image processing method based on backlight adjustment, smart television and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17869520

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17869520

Country of ref document: EP

Kind code of ref document: A1