[go: up one dir, main page]

CN113467739B - An image processing method, device, electronic equipment and storage medium - Google Patents

An image processing method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113467739B
CN113467739B CN202110757813.5A CN202110757813A CN113467739B CN 113467739 B CN113467739 B CN 113467739B CN 202110757813 A CN202110757813 A CN 202110757813A CN 113467739 B CN113467739 B CN 113467739B
Authority
CN
China
Prior art keywords
target
gray
value
image
displayed
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202110757813.5A
Other languages
Chinese (zh)
Other versions
CN113467739A (en
Inventor
邵继洋
毕育欣
高峰
孙宾华
訾峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group Co Ltd
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 BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN202110757813.5A priority Critical patent/CN113467739B/en
Publication of CN113467739A publication Critical patent/CN113467739A/en
Application granted granted Critical
Publication of CN113467739B publication Critical patent/CN113467739B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1407General aspects irrespective of display type, e.g. determination of decimal point position, display with fixed or driving decimal point, suppression of non-significant zeros
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/94Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The embodiment of the invention provides an image processing method, an image processing device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring an image to be displayed and target display state information of a display screen, wherein the target display state information comprises environment light intensity and/or temperature; determining a target gray threshold based on the target display state information and a pre-established corresponding relation between the display state information and the gray threshold; determining a target compensation coefficient based on the target display state information and a corresponding relation between the display state information and the compensation coefficient, which is established in advance; and determining a target gray level value according to the target compensation coefficient, the target gray level threshold value and the original gray level value of the image to be displayed, and adjusting the gray level value of the image to be displayed according to the target gray level value. The compensation coefficient marks the gray level value to be compensated under different display state information, and the gray level value is adjusted according to the target gray level value, so that the image to be displayed can be adjusted to a proper gray level value, and the display picture effect of the display screen is improved.

Description

一种图像处理方法、装置、电子设备及存储介质An image processing method, device, electronic equipment and storage medium

技术领域Technical field

本发明涉及图像显示控制技术领域,特别是涉及一种图像处理方法、装置、电子设备及存储介质。The present invention relates to the technical field of image display control, and in particular to an image processing method, device, electronic equipment and storage medium.

背景技术Background technique

目前,各种显示屏的应用越来越广泛。而显示屏的显示效果会受到环境光强和/或温度的影响,在户外环境使用时,由于环境光较强,可能造成无法清楚的观看显示画面的问题。At present, various display screens are used more and more widely. The display effect of the display screen will be affected by the ambient light intensity and/or temperature. When used in an outdoor environment, the strong ambient light may cause the problem of being unable to clearly view the display screen.

温度也会严重影响显示屏的显示画面效果。例如,TFT(thin-film transistor,薄膜晶体管)的特性受环境温度影响较大,在低温环境下,TFT驱动能力不足,显示屏上TFT本身能提供的电流变小。Oxide晶体管随温度升高迁移率升高,导通电流更大,漏电流也会增大。Temperature will also seriously affect the display effect of the display screen. For example, the characteristics of TFT (thin-film transistor, thin-film transistor) are greatly affected by the ambient temperature. In a low-temperature environment, the driving capability of TFT is insufficient, and the current that the TFT itself can provide on the display becomes smaller. The mobility of Oxide transistors increases as the temperature increases, the conduction current becomes larger, and the leakage current also increases.

LED(Light Emitting Diode,发光二极管)显示器对温度则极为敏感,温度升高会影响LED光效、光波长、色温、正向电压、最大注入电流等。因此,需要一种能够改善显示屏的显示画面效果的方法。LED (Light Emitting Diode, light-emitting diode) displays are extremely sensitive to temperature. Increased temperature will affect LED light efficiency, light wavelength, color temperature, forward voltage, maximum injection current, etc. Therefore, a method that can improve the display effect of the display screen is needed.

发明内容Contents of the invention

本发明实施例的目的在于提供一种图像处理方法、装置、电子设备及存储介质,用以改善显示屏的显示画面效果。具体技术方案如下:The purpose of embodiments of the present invention is to provide an image processing method, device, electronic equipment and storage medium to improve the display effect of the display screen. The specific technical solutions are as follows:

第一方面,本发明实施例提供了一种图像处理方法,所述方法包括:In a first aspect, an embodiment of the present invention provides an image processing method, which method includes:

获取待显示图像以及用于显示所述待显示图像的显示屏的目标显示状态信息,其中,所述目标显示状态信息包括所述显示屏所处环境的环境光强和/或所述显示屏的温度;Obtain the image to be displayed and the target display status information of the display screen used to display the image to be displayed, wherein the target display status information includes the ambient light intensity of the environment in which the display screen is located and/or the brightness of the display screen. temperature;

基于所述目标显示状态信息以及预先建立的显示状态信息与灰度阈值之间的对应关系,确定所述目标显示状态信息对应的目标灰度阈值;Determine the target grayscale threshold corresponding to the target display status information based on the target display status information and the pre-established correspondence relationship between the display status information and the grayscale threshold;

基于所述目标显示状态信息以及预先建立的显示状态信息与补偿系数之间的对应关系,确定所述目标显示状态信息对应的目标补偿系数,其中,所述补偿系数用于标识各个灰度值在不同的显示状态信息下对应的所需补偿的灰度值;Based on the target display status information and the pre-established correspondence relationship between the display status information and the compensation coefficient, the target compensation coefficient corresponding to the target display status information is determined, wherein the compensation coefficient is used to identify where each grayscale value is The corresponding grayscale values required for compensation under different display status information;

根据所述目标补偿系数、所述目标灰度阈值以及所述待显示图像的原始灰度值,确定目标灰度值,并按照所述目标灰度值对所述待显示图像进行灰度值调整。According to the target compensation coefficient, the target grayscale threshold and the original grayscale value of the image to be displayed, the target grayscale value is determined, and the grayscale value of the image to be displayed is adjusted according to the target grayscale value. .

可选的,所述获取待显示图像以及用于显示所述待显示图像的显示屏的目标显示状态信息的步骤,包括:Optionally, the step of obtaining the image to be displayed and the target display status information of the display screen used to display the image to be displayed includes:

获取显示屏分区对应的目标显示状态信息以及待显示图像,其中,所述显示屏分区为预先对用于显示所述待显示图像的显示屏进行划分得到的区域;Obtain the target display status information and the image to be displayed corresponding to the display screen partition, where the display screen partition is an area obtained by dividing the display screen for displaying the image to be displayed in advance;

所述按照所述目标灰度值对所述待显示图像进行灰度值调整的步骤,包括:The step of adjusting the grayscale value of the image to be displayed according to the target grayscale value includes:

将各个显示屏分区对应的目标灰度值,按照所述各个显示屏分区的位置关系整合为所述待显示图像对应的灰度数据;Integrate the target grayscale values corresponding to each display screen partition into grayscale data corresponding to the image to be displayed according to the positional relationship of each display screen partition;

按照所述灰度数据对所述待显示图像进行灰度值调整。The grayscale value of the image to be displayed is adjusted according to the grayscale data.

可选的,所述获取显示屏分区对应的目标显示状态信息的步骤,包括:Optionally, the step of obtaining the target display status information corresponding to the display screen partition includes:

获取显示屏分区所包括的目标分区对应的目标显示状态信息,其中,所述显示屏分区还包括过渡分区;Obtain the target display status information corresponding to the target partition included in the display screen partition, wherein the display screen partition also includes a transition partition;

所述根据所述目标补偿系数、所述目标灰度阈值以及所述待显示图像的原始灰度值,确定目标灰度值的步骤,包括:The step of determining the target grayscale value based on the target compensation coefficient, the target grayscale threshold and the original grayscale value of the image to be displayed includes:

针对每个所述目标分区,根据该目标分区对应的目标补偿系数、目标灰度阈值以及该目标分区对应的所述待显示图像中的原始灰度值,确定该目标分区对应的目标灰度值;For each target partition, determine the target gray value corresponding to the target partition according to the target compensation coefficient, the target grayscale threshold corresponding to the target partition, and the original grayscale value in the image to be displayed corresponding to the target partition. ;

针对每个所述过渡分区,根据与该过渡分区相邻的目标分区对应的目标灰度值,计算得到该过渡分区对应的目标灰度值。For each transition partition, the target gray value corresponding to the transition partition is calculated based on the target gray value corresponding to the target partition adjacent to the transition partition.

可选的,所述目标显示状态信息包括所述显示屏所处环境的环境光强和所述显示屏的温度;Optionally, the target display status information includes the ambient light intensity of the environment where the display screen is located and the temperature of the display screen;

所述基于所述目标显示状态信息以及预先建立的显示状态信息与灰度阈值之间的对应关系,确定所述目标显示状态信息对应的目标灰度阈值的步骤,包括:The step of determining the target grayscale threshold corresponding to the target display status information based on the target display status information and the pre-established correspondence relationship between the display status information and the grayscale threshold includes:

基于所述环境光强以及预先建立的光强与灰度阈值之间的对应关系,确定第一目标灰度阈值;基于所述温度以及预先建立的温度与灰度阈值之间的对应关系,确定第二目标灰度阈值;Based on the ambient light intensity and the pre-established correspondence between the light intensity and the gray threshold, determine the first target gray threshold; based on the temperature and the pre-established correspondence between the temperature and the gray threshold, determine Second target grayscale threshold;

所述基于所述目标显示状态信息以及预先建立的显示状态信息与补偿系数之间的对应关系,确定所述目标显示状态信息对应的目标补偿系数的步骤,包括:The step of determining the target compensation coefficient corresponding to the target display status information based on the target display status information and the pre-established correspondence relationship between the display status information and the compensation coefficient includes:

基于所述环境光强以及预先建立的光强与补偿系数之间的对应关系,确定第一目标补偿系数;基于所述温度以及预先建立的温度与补偿系数之间的对应关系,确定第二目标补偿系数;Based on the ambient light intensity and the pre-established correspondence between the light intensity and the compensation coefficient, the first target compensation coefficient is determined; based on the temperature and the pre-established correspondence between the temperature and the compensation coefficient, the second target is determined Compensation coefficient;

所述根据所述目标补偿系数、所述目标灰度阈值以及所述待显示图像的原始灰度值,确定目标灰度值的步骤,包括:The step of determining the target grayscale value based on the target compensation coefficient, the target grayscale threshold and the original grayscale value of the image to be displayed includes:

根据所述第一目标补偿系数、所述第一目标灰度阈值、所述第二目标补偿系数、所述第二目标灰度阈值以及所述待显示图像的原始灰度值,确定所述待显示图像的目标灰度值。According to the first target compensation coefficient, the first target gray threshold, the second target compensation coefficient, the second target gray threshold and the original gray value of the image to be displayed, the to-be-displayed image is determined. Displays the target grayscale value of the image.

可选的,所述根据所述第一目标补偿系数、所述第一目标灰度阈值、所述第二目标补偿系数、所述第二目标灰度阈值以及所述待显示图像的原始灰度值,确定所述待显示图像的目标灰度值的步骤,包括:Optionally, the method is based on the first target compensation coefficient, the first target grayscale threshold, the second target compensation coefficient, the second target grayscale threshold and the original grayscale of the image to be displayed. value, the step of determining the target grayscale value of the image to be displayed includes:

根据所述第一目标补偿系数、所述第一目标灰度阈值以及所述待显示图像的原始灰度值,确定第一目标灰度值;Determine a first target grayscale value according to the first target compensation coefficient, the first target grayscale threshold and the original grayscale value of the image to be displayed;

根据所述第二目标补偿系数、所述第二目标灰度阈值以及所述待显示图像的原始灰度值,确定第二目标灰度值;Determine a second target grayscale value according to the second target compensation coefficient, the second target grayscale threshold and the original grayscale value of the image to be displayed;

基于所述第一目标灰度值及所述第二目标灰度值,按照预设计算方式确定所述待显示图像中像素点的目标灰度值。Based on the first target gray value and the second target gray value, the target gray value of the pixel in the image to be displayed is determined according to a preset calculation method.

可选的,所述根据所述第一目标补偿系数、所述第一目标灰度阈值、所述第二目标补偿系数、所述第二目标灰度阈值以及所述待显示图像的原始灰度值,确定所述待显示图像的目标灰度值的步骤,包括:Optionally, the method is based on the first target compensation coefficient, the first target grayscale threshold, the second target compensation coefficient, the second target grayscale threshold and the original grayscale of the image to be displayed. value, the step of determining the target grayscale value of the image to be displayed includes:

根据所述待显示图像中像素点的原始灰度值与所述第一目标灰度阈值以及所述第二目标灰度阈值之间的大小关系,确定第一类像素点、第二类像素点、第三类像素点以及第四类像素点,其中,所述第一类像素点为仅需进行环境光补偿的像素点,所述第二类像素点为仅需进行温度补偿的像素点,所述第三类像素点为即需进行环境光补偿又需要进行温度补偿的像素点,所述第四类像素点为无需补偿的像素点;According to the size relationship between the original gray value of the pixel in the image to be displayed and the first target gray threshold and the second target gray threshold, determine the first type of pixels and the second type of pixels. , the third type of pixels and the fourth type of pixels, wherein the first type of pixels are pixels that only need ambient light compensation, and the second type of pixels are pixels that only need temperature compensation, The third type of pixels are pixels that require both ambient light compensation and temperature compensation, and the fourth type of pixels are pixels that do not require compensation;

针对所述第一类像素点,基于所述第一类像素点的原始灰度值与其对应的第一目标补偿系数确定所述第一类像素点的目标灰度值;For the first type of pixel, determine the target gray value of the first type of pixel based on the original gray value of the first type of pixel and its corresponding first target compensation coefficient;

针对所述第二类像素点,基于所述第二类像素点的原始灰度值与其对应的第二目标补偿系数确定所述第二类像素点的目标灰度值;For the second type of pixel, determine the target gray value of the second type of pixel based on the original gray value of the second type of pixel and its corresponding second target compensation coefficient;

针对所述第三类像素点,基于所述第三类像素点的原始灰度值与其对应的第一目标补偿系数以及第二目标补偿系数,确定所述第三类像素点的目标灰度值;For the third type of pixel, determine the target gray value of the third type of pixel based on the original gray value of the third type of pixel and its corresponding first target compensation coefficient and second target compensation coefficient. ;

针对所述第四类像素点,将所述第四类像素点的原始灰度值确定为其对应的目标灰度值。For the fourth type of pixel point, the original gray value of the fourth type pixel point is determined as its corresponding target gray value.

可选的,所述显示屏设置有光学传感器和/或温度传感器;Optionally, the display screen is provided with an optical sensor and/or a temperature sensor;

所述获取待显示图像以及用于显示所述待显示图像的显示屏的目标显示状态信息的步骤,包括:The step of obtaining the image to be displayed and the target display status information of the display screen used to display the image to be displayed includes:

获取待显示图像以及所述光学传感器采集的所述显示屏所处环境的环境光强和/或所述温度传感器采集的所述显示屏的温度。Obtain the image to be displayed and the ambient light intensity of the environment where the display screen is located collected by the optical sensor and/or the temperature of the display screen collected by the temperature sensor.

第二方面,本发明实施例提供了一种图像处理装置,所述装置包括:In a second aspect, an embodiment of the present invention provides an image processing device, which includes:

状态信息获取模块,用于获取待显示图像以及用于显示所述待显示图像的显示屏的目标显示状态信息,其中,所述目标显示状态信息包括所述显示屏所处环境的环境光强和/或所述显示屏的温度;A state information acquisition module, configured to obtain the image to be displayed and the target display state information of the display screen used to display the image to be displayed, wherein the target display state information includes the ambient light intensity and the ambient light intensity of the environment in which the display screen is located. /or the temperature of the display screen;

灰度阈值确定模块,用于基于所述目标显示状态信息以及预先建立的显示状态信息与灰度阈值之间的对应关系,确定所述目标显示状态信息对应的目标灰度阈值;A grayscale threshold determination module, configured to determine the target grayscale threshold corresponding to the target display status information based on the target display status information and the pre-established correspondence relationship between the display status information and the grayscale threshold;

补偿系数确定模块,用于基于所述目标显示状态信息以及预先建立的显示状态信息与补偿系数之间的对应关系,确定所述目标显示状态信息对应的目标补偿系数,其中,所述补偿系数用于标识各个灰度值在不同的显示状态信息下对应的所需补偿的灰度值;A compensation coefficient determination module, configured to determine the target compensation coefficient corresponding to the target display state information based on the target display state information and the pre-established correspondence relationship between the display state information and the compensation coefficient, wherein the compensation coefficient is To identify the required compensated gray value corresponding to each gray value under different display status information;

灰度调整模块,用于根据所述目标补偿系数、所述目标灰度阈值以及所述待显示图像的原始灰度值,确定目标灰度值,并按照所述目标灰度值对所述待显示图像进行灰度值调整。A grayscale adjustment module, configured to determine a target grayscale value according to the target compensation coefficient, the target grayscale threshold and the original grayscale value of the image to be displayed, and adjust the target grayscale value according to the target grayscale value. Display image for grayscale adjustment.

可选的,所述状态信息获取模块包括:Optionally, the status information acquisition module includes:

分区信息获取单元,用于获取显示屏分区对应的目标显示状态信息以及待显示图像,其中,所述显示屏分区为预先对用于显示所述待显示图像的显示屏进行划分得到的区域;a partition information acquisition unit, used to obtain the target display status information corresponding to the display screen partition and the image to be displayed, wherein the display screen partition is an area obtained by dividing the display screen used to display the image to be displayed in advance;

所述灰度调整模块包括:The grayscale adjustment module includes:

整合单元,用于将各个显示屏分区对应的目标灰度值,按照所述各个显示屏分区的位置关系整合为所述待显示图像对应的灰度数据;An integration unit configured to integrate the target grayscale values corresponding to each display screen partition into grayscale data corresponding to the image to be displayed according to the positional relationship of each display screen partition;

调整单元,用于按照所述灰度数据对所述待显示图像进行灰度值调整。An adjustment unit, configured to adjust the grayscale value of the image to be displayed according to the grayscale data.

可选的,所述分区信息获取单元包括:Optionally, the partition information acquisition unit includes:

分区信息获取子单元,用于获取显示屏分区所包括的目标分区对应的目标显示状态信息,其中,所述显示屏分区还包括过渡分区;The partition information acquisition subunit is used to obtain the target display status information corresponding to the target partition included in the display screen partition, wherein the display screen partition also includes a transition partition;

所述灰度调整模块包括:The grayscale adjustment module includes:

第一灰度值确定单元,用于针对每个所述目标分区,根据该目标分区对应的目标补偿系数、目标灰度阈值以及该目标分区对应的所述待显示图像中的原始灰度值,确定该目标分区对应的目标灰度值;A first grayscale value determination unit configured to determine, for each target partition, the target compensation coefficient corresponding to the target partition, the target grayscale threshold, and the original grayscale value in the image to be displayed corresponding to the target partition, Determine the target gray value corresponding to the target partition;

第二灰度值确定单元,用于针对每个所述过渡分区,根据与该过渡分区相邻的目标分区对应的目标灰度值,计算得到该过渡分区对应的目标灰度值。The second gray value determination unit is configured to calculate, for each transition partition, the target gray value corresponding to the transition partition based on the target gray value corresponding to the target partition adjacent to the transition partition.

可选的,所述目标显示状态信息包括所述显示屏所处环境的环境光强和所述显示屏的温度;Optionally, the target display status information includes the ambient light intensity of the environment where the display screen is located and the temperature of the display screen;

所述灰度阈值确定模块包括:The gray threshold determination module includes:

阈值确定单元,用于基于所述环境光强以及预先建立的光强与灰度阈值之间的对应关系,确定第一目标灰度阈值;基于所述温度以及预先建立的温度与灰度阈值之间的对应关系,确定第二目标灰度阈值;A threshold determination unit configured to determine a first target gray threshold based on the ambient light intensity and a pre-established correspondence between the light intensity and the gray threshold; based on the temperature and the pre-established relationship between the temperature and the gray threshold. Correspondence between, determine the second target grayscale threshold;

所述补偿系数确定模块包括:The compensation coefficient determination module includes:

补偿系数确定单元,用于基于所述环境光强以及预先建立的光强与补偿系数之间的对应关系,确定第一目标补偿系数;基于所述温度以及预先建立的温度与补偿系数之间的对应关系,确定第二目标补偿系数;A compensation coefficient determination unit configured to determine a first target compensation coefficient based on the ambient light intensity and a pre-established correspondence between the light intensity and the compensation coefficient; based on the temperature and the pre-established relationship between the temperature and the compensation coefficient. Corresponding relationship, determine the second target compensation coefficient;

所述灰度调整模块包括:The grayscale adjustment module includes:

灰度值确定单元,用于根据所述第一目标补偿系数、所述第一目标灰度阈值、所述第二目标补偿系数、所述第二目标灰度阈值以及所述待显示图像的原始灰度值,确定所述待显示图像的目标灰度值。A grayscale value determination unit configured to determine the original value of the image to be displayed based on the first target compensation coefficient, the first target grayscale threshold, the second target compensation coefficient, the second target grayscale threshold, and the original value of the image to be displayed. Grayscale value, determine the target grayscale value of the image to be displayed.

可选的,所述灰度值确定单元包括:Optionally, the gray value determination unit includes:

第一灰度确定子单元,用于根据所述第一目标补偿系数、所述第一目标灰度阈值以及所述待显示图像的原始灰度值,确定第一目标灰度值;A first grayscale determination subunit configured to determine a first target grayscale value based on the first target compensation coefficient, the first target grayscale threshold, and the original grayscale value of the image to be displayed;

第二灰度确定子单元,用于根据所述第二目标补偿系数、所述第二目标灰度阈值以及所述待显示图像的原始灰度值,确定第二目标灰度值;A second grayscale determination subunit, configured to determine a second target grayscale value based on the second target compensation coefficient, the second target grayscale threshold, and the original grayscale value of the image to be displayed;

第三灰度确定子单元,用于基于所述第一目标灰度值及所述第二目标灰度值,按照预设计算方式确定所述待显示图像中像素点的目标灰度值。The third grayscale determination subunit is configured to determine the target grayscale value of the pixel in the image to be displayed based on the first target grayscale value and the second target grayscale value according to a preset calculation method.

可选的,所述灰度值确定单元包括:Optionally, the gray value determination unit includes:

像素点分类子单元,用于根据所述待显示图像中像素点的原始灰度值与所述第一目标灰度阈值以及所述第二目标灰度阈值之间的大小关系,确定第一类像素点、第二类像素点、第三类像素点以及第四类像素点,其中,所述第一类像素点为仅需进行环境光补偿的像素点,所述第二类像素点为仅需进行温度补偿的像素点,所述第三类像素点为即需进行环境光补偿又需要进行温度补偿的像素点,所述第四类像素点为无需补偿的像素点;Pixel classification subunit, used to determine the first category based on the size relationship between the original gray value of the pixel in the image to be displayed and the first target gray threshold and the second target gray threshold. pixels, second type pixels, third type pixels and fourth type pixels, where the first type of pixels are pixels that only require ambient light compensation, and the second type of pixels are only pixels that require ambient light compensation. Pixels that require temperature compensation, the third type of pixels are pixels that require both ambient light compensation and temperature compensation, and the fourth type of pixels are pixels that do not require compensation;

第一类灰度确定子单元,用于针对所述第一类像素点,基于所述第一类像素点的原始灰度值与其对应的第一目标补偿系数确定所述第一类像素点的目标灰度值;The first type of grayscale determination subunit is used for determining the first type of pixel point based on the original grayscale value of the first type of pixel point and its corresponding first target compensation coefficient. Target gray value;

第二类灰度确定子单元,用于针对所述第二类像素点,基于所述第二类像素点的原始灰度值与其对应的第二目标补偿系数确定所述第二类像素点的目标灰度值;The second type of grayscale determination subunit is used for determining the second type of pixels based on the original grayscale value of the second type of pixels and its corresponding second target compensation coefficient for the second type of pixels. Target gray value;

第三类灰度确定子单元,用于针对所述第三类像素点,基于所述第三类像素点的原始灰度值与其对应的第一目标补偿系数以及第二目标补偿系数,确定所述第三类像素点的目标灰度值;The third type of grayscale determination subunit is configured to determine, for the third type of pixel point, the original grayscale value of the third type of pixel point and its corresponding first target compensation coefficient and second target compensation coefficient. Describe the target grayscale value of the third type of pixel;

第四类灰度确定子单元,用于针对所述第四类像素点,将所述第四类像素点的原始灰度值确定为其对应的目标灰度值。The fourth type of grayscale determination subunit is used to determine the original grayscale value of the fourth type of pixel point as its corresponding target grayscale value for the fourth type of pixel point.

可选的,所述显示屏设置有光学传感器和/或温度传感器;Optionally, the display screen is provided with an optical sensor and/or a temperature sensor;

所述状态信息获取模块包括:The status information acquisition module includes:

状态信息获取单元,用于获取待显示图像以及所述光学传感器采集的所述显示屏所处环境的环境光强和/或所述温度传感器采集的所述显示屏的温度。A status information acquisition unit is configured to acquire the image to be displayed and the ambient light intensity of the environment where the display screen is located collected by the optical sensor and/or the temperature of the display screen collected by the temperature sensor.

第三方面,本发明实施例提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;In a third aspect, embodiments of the present invention provide an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;

存储器,用于存放计算机程序;Memory, used to store computer programs;

处理器,用于执行存储器上所存放的程序时,实现上述第一方面任一所述的方法步骤。The processor is used to implement any of the method steps described in the first aspect when executing a program stored in the memory.

第四方面,本发明实施例提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述第一方面任一所述的方法步骤。In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium. A computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, any of the methods described in the first aspect are implemented. Method steps.

本发明实施例有益效果:Beneficial effects of the embodiments of the present invention:

本发明实施例提供的方案中,处理器可以获取待显示图像以及用于显示待显示图像的显示屏的目标显示状态信息,其中,目标显示状态信息包括显示屏所处环境的环境光强和/或显示屏的温度,基于目标显示状态信息以及预先建立的显示状态信息与灰度阈值之间的对应关系,确定目标显示状态信息对应的目标灰度阈值,基于目标显示状态信息以及预先建立的显示状态信息与补偿系数之间的对应关系,确定目标显示状态信息对应的目标补偿系数,其中,补偿系数用于标识各个灰度值在不同的显示状态信息下对应的所需补偿的灰度值,进而根据目标补偿系数、目标灰度阈值以及待显示图像的原始灰度值,确定目标灰度值,并按照目标灰度值对待显示图像进行灰度值调整。由于补偿系数可以标识各个灰度值在不同的显示状态信息下对应的所需补偿的灰度值,所以根据预先建立的显示状态信息与灰度阈值之间的对应关系确定的目标灰度阈值可以准确标识各个灰度值在目标显示状态信息下对应的所需补偿的灰度值,进而,电子设备根据该目标补偿系数确定目标灰度值,并按照目标灰度值对待显示图像进行灰度值调整,可以将待显示图像的灰度值调整至合适的值,减弱环境光强和/或显示屏的温度对显示屏的影响,从而改善显示屏的显示画面效果。In the solution provided by the embodiment of the present invention, the processor can obtain the image to be displayed and the target display status information of the display screen used to display the image to be displayed, where the target display status information includes the ambient light intensity and/or the ambient light intensity of the environment in which the display screen is located. Or the temperature of the display screen, based on the target display status information and the corresponding relationship between the pre-established display status information and the gray scale threshold, determine the target gray scale threshold corresponding to the target display status information, based on the target display status information and the pre-established display The corresponding relationship between the status information and the compensation coefficient determines the target compensation coefficient corresponding to the target display status information, where the compensation coefficient is used to identify the required compensated grayscale value corresponding to each grayscale value under different display status information, Then, according to the target compensation coefficient, the target grayscale threshold and the original grayscale value of the image to be displayed, the target grayscale value is determined, and the grayscale value of the image to be displayed is adjusted according to the target grayscale value. Since the compensation coefficient can identify the gray value that needs to be compensated for each gray value under different display state information, the target gray threshold determined based on the pre-established correspondence between the display state information and the gray threshold can be Accurately identify the corresponding gray value of each gray value that needs to be compensated under the target display status information. Then, the electronic device determines the target gray value based on the target compensation coefficient, and performs the gray value of the image to be displayed according to the target gray value. Adjustment can adjust the grayscale value of the image to be displayed to an appropriate value, weaken the impact of ambient light intensity and/or the temperature of the display screen on the display screen, thereby improving the display effect of the display screen.

附图说明Description of the drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的实施例。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other embodiments can be obtained based on these drawings without exerting creative efforts.

图1为发明实施例所提供的图像处理方法应用的电子设备的第一种结构示意图;Figure 1 is a first structural schematic diagram of an electronic device to which the image processing method provided by an embodiment of the invention is applied;

图2为发明实施例所提供的图像处理方法应用的电子设备的第二种结构示意图;Figure 2 is a second structural schematic diagram of an electronic device to which the image processing method provided by the embodiment of the invention is applied;

图3为发明实施例所提供的一种图像处理方法的流程图;Figure 3 is a flow chart of an image processing method provided by an embodiment of the invention;

图4为基于图3所示实施例的显示屏划分方式的一种示意图;Figure 4 is a schematic diagram of a display screen division method based on the embodiment shown in Figure 3;

图5为基于图3所示实施例的目标灰度值的确定方式的第一种流程图;Figure 5 is a first flow chart of a method for determining a target grayscale value based on the embodiment shown in Figure 3;

图6为基于图3所示实施例的目标灰度值的确定方式的第二种流程图;Figure 6 is a second flow chart of a method for determining a target grayscale value based on the embodiment shown in Figure 3;

图7(a)为基于图3所示实施例的显示屏的第一种示意图;Figure 7(a) is a first schematic diagram of a display screen based on the embodiment shown in Figure 3;

图7(b)为基于图3所示实施例的显示屏的第二种示意图;Figure 7(b) is a second schematic diagram of the display screen based on the embodiment shown in Figure 3;

图7(c)为基于图3所示实施例的显示屏的第三种示意图;Figure 7(c) is a third schematic diagram of a display screen based on the embodiment shown in Figure 3;

图8为发明实施例所提供的一种图像处理装置的结构示意图;Figure 8 is a schematic structural diagram of an image processing device provided by an embodiment of the invention;

图9为发明实施例所提供的一种电子设备的结构示意图。Figure 9 is a schematic structural diagram of an electronic device provided by an embodiment of the invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.

为了减弱环境光强和/或显示屏的温度对显示屏的影响,改善显示屏的显示画面效果,本发明实施例提供了一种图像处理方法、装置、电子设备、计算机可读存储介质以及计算机程序产品。In order to reduce the influence of ambient light intensity and/or the temperature of the display screen on the display screen and improve the display effect of the display screen, embodiments of the present invention provide an image processing method, device, electronic equipment, computer-readable storage medium and computer Program Products.

下面首先对本发明实施例所提供的一种图像处理方法进行介绍。本发明实施例所提供的一种图像处理方法可以应用于电子设备中用于控制显示屏的处理器、控制器、处理芯片等,在此不做具体限定,为了描述清楚,以下称为处理器。该电子设备可以柔性LED显示器、Mini LED显示器等,在此不做具体限定。An image processing method provided by an embodiment of the present invention is first introduced below. An image processing method provided by an embodiment of the present invention can be applied to processors, controllers, processing chips, etc. used to control display screens in electronic devices. This is not specifically limited here. For clarity of description, it is hereinafter referred to as a processor. . The electronic device can be a flexible LED display, a Mini LED display, etc., and is not specifically limited here.

为了方便理解本发明实施例所提供的图像处理方法,下面对本发明实施例所提供的图像处理方法可以应用的第一种电子设备的结构进行举例介绍。如图1所示,电子设备可以包括MCU(Micro Control Unit,微控制单元)101、FPGA (Field Programmable GateArray,现场可编程逻辑门阵列)板102、显示屏103、PMIC(Power Management IC,电源管理集成电路)104、电源105、视频模块106、WIFI(Wireless Fidelity,无线上网)/蓝牙模块107、按键108、UART(Universal Asynchronous Receiver/Transmitter,通用异步收发传输器)串口109等。In order to facilitate understanding of the image processing method provided by the embodiment of the present invention, the following is an example of the structure of the first electronic device to which the image processing method provided by the embodiment of the present invention can be applied. As shown in Figure 1, the electronic device may include an MCU (Micro Control Unit) 101, an FPGA (Field Programmable Gate Array) board 102, a display screen 103, and a PMIC (Power Management IC). Integrated circuit) 104, power supply 105, video module 106, WIFI (Wireless Fidelity, wireless Internet)/Bluetooth module 107, button 108, UART (Universal Asynchronous Receiver/Transmitter, Universal Asynchronous Receiver/Transmitter) serial port 109, etc.

其中,显示屏103分别与FPGA板102以及PMIC 104电连接,电源105与PMIC 104电连接,FPGA板102、PMIC 104、视频模块106、WIFI/蓝牙模块107、按键108分别与MCU 101电连接。UART串口109可以用于接收设备调试数据等。本发明实施例所提供的图像处理方法可以应用于MCU 101,用于对显示屏103所显示的图像进行处理,改善显示屏103的显示画面效果。Among them, the display screen 103 is electrically connected to the FPGA board 102 and the PMIC 104 respectively, the power supply 105 is electrically connected to the PMIC 104, and the FPGA board 102, PMIC 104, video module 106, WIFI/Bluetooth module 107, and button 108 are electrically connected to the MCU 101 respectively. UART serial port 109 can be used to receive device debugging data, etc. The image processing method provided by the embodiment of the present invention can be applied to the MCU 101 to process the image displayed on the display screen 103 and improve the display effect of the display screen 103 .

图2所示为本发明实施例所提供的图像处理方法可以应用的第二种电子设备的结构示意图,该电子设备可以包括FPGA/AP(Wireless Access Point,无线接入点)201、显示屏202、PMIC 203、充电管理模块204、电源205、WIFI/蓝牙模块206、按键207、UART串口208等。Figure 2 shows a schematic structural diagram of a second electronic device to which the image processing method provided by the embodiment of the present invention can be applied. The electronic device may include an FPGA/AP (Wireless Access Point, wireless access point) 201 and a display screen 202 , PMIC 203, charging management module 204, power supply 205, WIFI/Bluetooth module 206, button 207, UART serial port 208, etc.

其中,显示屏202、WIFI/蓝牙模块206以及按键207分别与FPGA/AP 201电连接,电源205、充电管理模块204及PMIC 203依次电连接,用于对电源205进行充电管理。UART串口208可以用于接收设备调试数据等。本发明实施例所提供的图像处理方法可以应用于FPGA/AP 201,用于对显示屏202所显示的图像进行处理,改善显示屏202的显示画面效果。Among them, the display screen 202, the WIFI/Bluetooth module 206 and the button 207 are electrically connected to the FPGA/AP 201 respectively, and the power supply 205, the charging management module 204 and the PMIC 203 are electrically connected in sequence for charging management of the power supply 205. UART serial port 208 can be used to receive device debugging data, etc. The image processing method provided by the embodiment of the present invention can be applied to the FPGA/AP 201 to process the image displayed on the display screen 202 and improve the display effect of the display screen 202 .

如图3所示,一种图像处理方法,所述方法包括:As shown in Figure 3, an image processing method includes:

S301,获取待显示图像以及用于显示所述待显示图像的显示屏的目标显示状态信息;S301. Obtain the image to be displayed and the target display status information of the display screen used to display the image to be displayed;

其中,所述目标显示状态信息包括所述显示屏所处环境的环境光强和/或所述显示屏的温度。Wherein, the target display status information includes the ambient light intensity of the environment where the display screen is located and/or the temperature of the display screen.

S302,基于所述目标显示状态信息以及预先建立的显示状态信息与灰度阈值之间的对应关系,确定所述目标显示状态信息对应的目标灰度阈值;S302: Determine the target grayscale threshold corresponding to the target display status information based on the target display status information and the pre-established correspondence relationship between the display status information and the grayscale threshold;

S303,基于所述目标显示状态信息以及预先建立的显示状态信息与补偿系数之间的对应关系,确定所述目标显示状态信息对应的目标补偿系数;S303: Determine the target compensation coefficient corresponding to the target display status information based on the target display status information and the pre-established correspondence relationship between the display status information and the compensation coefficient;

其中,所述补偿系数用于标识各个灰度值在不同的显示状态信息下对应的所需补偿的灰度值。Wherein, the compensation coefficient is used to identify the gray value corresponding to each gray value that needs to be compensated under different display state information.

S304,根据所述目标补偿系数、所述目标灰度阈值以及所述待显示图像的原始灰度值,确定目标灰度值,并按照所述目标灰度值对所述待显示图像进行灰度值调整。S304: Determine the target grayscale value according to the target compensation coefficient, the target grayscale threshold and the original grayscale value of the image to be displayed, and perform grayscale processing on the image to be displayed according to the target grayscale value. value adjustment.

可见,本发明实施例提供的方案中,处理器可以获取待显示图像以及用于显示待显示图像的显示屏的目标显示状态信息,其中,目标显示状态信息包括显示屏所处环境的环境光强和/或显示屏的温度,基于目标显示状态信息以及预先建立的显示状态信息与灰度阈值之间的对应关系,确定目标显示状态信息对应的目标灰度阈值,基于目标显示状态信息以及预先建立的显示状态信息与补偿系数之间的对应关系,确定目标显示状态信息对应的目标补偿系数,其中,补偿系数用于标识各个灰度值在不同的显示状态信息下对应的所需补偿的灰度值,进而根据目标补偿系数、目标灰度阈值以及待显示图像的原始灰度值,确定目标灰度值,并按照目标灰度值对待显示图像进行灰度值调整。由于补偿系数可以标识各个灰度值在不同的显示状态信息下对应的所需补偿的灰度值,所以根据预先建立的显示状态信息与灰度阈值之间的对应关系确定的目标灰度阈值可以准确标识各个灰度值在目标显示状态信息下对应的所需补偿的灰度值,进而,电子设备根据该目标补偿系数确定目标灰度值,并按照目标灰度值对待显示图像进行灰度值调整,可以将待显示图像的灰度值调整至合适的值,减弱环境光强和/或显示屏的温度对显示屏的影响,从而改善显示屏的显示画面效果。It can be seen that in the solution provided by the embodiment of the present invention, the processor can obtain the image to be displayed and the target display status information of the display screen used to display the image to be displayed, where the target display status information includes the ambient light intensity of the environment in which the display screen is located. and/or the temperature of the display screen, based on the target display status information and the pre-established correspondence between the display status information and the gray threshold, determine the target gray threshold corresponding to the target display status information, based on the target display status information and the pre-established The corresponding relationship between the display status information and the compensation coefficient is to determine the target compensation coefficient corresponding to the target display status information, where the compensation coefficient is used to identify the required compensated grayscale corresponding to each grayscale value under different display status information. value, and then determine the target gray value according to the target compensation coefficient, the target gray threshold and the original gray value of the image to be displayed, and adjust the gray value of the image to be displayed according to the target gray value. Since the compensation coefficient can identify the gray value that needs to be compensated for each gray value under different display state information, the target gray threshold determined based on the pre-established correspondence between the display state information and the gray threshold can be Accurately identify the corresponding gray value of each gray value that needs to be compensated under the target display status information. Then, the electronic device determines the target gray value based on the target compensation coefficient, and performs the gray value of the image to be displayed according to the target gray value. Adjustment can adjust the grayscale value of the image to be displayed to an appropriate value, weaken the impact of ambient light intensity and/or the temperature of the display screen on the display screen, thereby improving the display effect of the display screen.

在需要进行图像显示时,处理器可以获取待显示图像,该待显示图像即为显示屏所需显示的图像。为了能够减弱环境光强和/或显示屏的温度对于图像显示效果的影响,处理器可以获取用于显示该待显示图像的显示屏的目标显示状态信息,其中,目标显示状态信息可以包括显示屏所处环境的环境光强或显示屏的温度,或者可以包括显示屏所处环境的环境光强和显示屏的温度,在此不做具体限定。When image display is required, the processor can obtain the image to be displayed, and the image to be displayed is the image to be displayed on the display screen. In order to reduce the influence of the ambient light intensity and/or the temperature of the display screen on the image display effect, the processor can obtain the target display status information of the display screen used to display the image to be displayed, where the target display status information can include the display screen The ambient light intensity of the environment or the temperature of the display screen, or may include the ambient light intensity of the environment where the display screen is located and the temperature of the display screen, are not specifically limited here.

为了方便对待显示图像的灰度值进行调整,可以预先建立显示状态信息与灰度阈值之间的对应关系,其中,该灰度阈值可以标识不同显示状态信息下,图像中所需调整的灰度的门限值,或者,可以标识不同显示状态信息下,显示屏所显示的画面效果发生变化的灰度的门限值等,在此不做具体限定。In order to facilitate the adjustment of the grayscale value of the image to be displayed, the corresponding relationship between the display status information and the grayscale threshold can be established in advance, where the grayscale threshold can identify the grayscale that needs to be adjusted in the image under different display status information. The threshold value, or the grayscale threshold value that can indicate the change of the image effect displayed on the display screen under different display status information, etc. is not specifically limited here.

这样,处理器在获取了上述目标显示状态信息后,便可以基于该目标显示状态信息以及预先建立的显示状态信息与灰度阈值之间的对应关系,确定目标显示状态信息对应的目标灰度阈值,即执行上述步骤S302。In this way, after the processor obtains the above target display status information, it can determine the target grayscale threshold corresponding to the target display status information based on the target display status information and the pre-established correspondence between the display status information and the grayscale threshold. , that is, the above step S302 is executed.

针对上述目标显示状态信息仅包括环境光强的情况,上述对应关系可以为环境光强与灰度阈值之间的对应关系。处理器可以根据目标显示状态信息所包括的环境光强,从该对应关系中查找到该环境光强对应的灰度阈值,作为目标灰度阈值。For the situation where the above target display status information only includes ambient light intensity, the above correspondence relationship may be a correspondence relationship between ambient light intensity and grayscale threshold. The processor can find the grayscale threshold corresponding to the ambient light intensity from the corresponding relationship according to the ambient light intensity included in the target display status information, and use it as the target grayscale threshold.

针对上述目标显示状态信息仅包括温度的情况,上述对应关系可以为温度与灰度阈值之间的对应关系。处理器可以根据目标显示状态信息所包括的温度,从该对应关系中查找到该温度对应的灰度阈值,作为目标灰度阈值。For the case where the target display status information only includes temperature, the corresponding relationship may be a corresponding relationship between temperature and grayscale threshold. The processor can find the grayscale threshold corresponding to the temperature from the corresponding relationship according to the temperature included in the target display status information, and use it as the target grayscale threshold.

针对上述目标显示状态信息即包括环境光强又包括温度的情况,上述对应关系具体可以包括两种对应关系,即环境光强与灰度阈值之间的对应关系以及温度与灰度阈值之间的对应关系。处理器可以分别根据环境光强和温度确定对应的目标灰度阈值,为了方案清晰,对于该种方式后续会进行详细介绍。In view of the situation that the above target display status information includes both ambient light intensity and temperature, the above correspondence relationship may specifically include two correspondence relationships, namely, the correspondence relationship between the ambient light intensity and the grayscale threshold value, and the correspondence relationship between the temperature and the grayscale threshold value. Correspondence. The processor can determine the corresponding target grayscale threshold according to the ambient light intensity and temperature. For the sake of clarity of the solution, this method will be introduced in detail later.

上述对应关系也可以为环境光强和温度整体与灰度阈值之间的对应关系。那么处理器可以根据目标显示状态信息所包括的环境光强和温度,从该对应关系中查找到该环境光强和温度对应的灰度阈值,作为目标灰度阈值,这也是合理的。The above correspondence relationship may also be a correspondence relationship between the overall ambient light intensity and temperature and the grayscale threshold. Then the processor can find the grayscale threshold corresponding to the ambient light intensity and temperature based on the ambient light intensity and temperature included in the target display status information from the corresponding relationship, and use it as the target grayscale threshold, which is also reasonable.

上述任一对应关系均可以采用查找表的形式进行记录,例如,温度与灰度阈值之间的对应关系可以如下查找表所示:Any of the above correspondences can be recorded in the form of a lookup table. For example, the correspondence between temperature and grayscale threshold can be shown in the following lookup table:

序号serial number 温度(℃)Temperature(℃) 灰度阈值Grayscale threshold 11 -40-40 GaGa 22 -39-39 GbGb 101101 6161 G35G35 NN 8080 GnG

那么,如果处理器获取的目标显示状态信息包括的显示屏的温度为60℃,那么根据上述查找表,处理器可以确定目标灰度阈值为60℃对应的灰度阈值,即为G35。Then, if the temperature of the display screen included in the target display status information obtained by the processor is 60°C, then according to the above lookup table, the processor can determine that the target grayscale threshold is the grayscale threshold corresponding to 60°C, which is G35.

处理器还可以预先建立显示状态信息与补偿系数之间的对应关系,其中,该补偿系数可以用于标识各个灰度值在不同的显示状态信息下对应的所需补偿的灰度值。该对应关系可以预先根据多次测试或模拟确定,在测试或模拟的过程中确定在不同显示状态信息下,如果想要显示屏的画面效果良好,需要对原始图像进行的灰度值的补偿系数,即可以得到显示状态信息与补偿系数之间的对应关系。The processor can also pre-establish a corresponding relationship between the display status information and the compensation coefficient, wherein the compensation coefficient can be used to identify the grayscale value that needs to be compensated for each grayscale value under different display status information. This corresponding relationship can be determined in advance based on multiple tests or simulations. During the test or simulation process, it is determined that under different display status information, if you want the display screen to have a good picture effect, the grayscale value compensation coefficient of the original image is required. , that is, the corresponding relationship between the display status information and the compensation coefficient can be obtained.

那么,在上述步骤S303中,处理器便可以根据目标显示状态信息,在预先建立的显示状态信息与补偿系数之间的对应关系中进行查找,查找到目标显示状态信息对应的补偿系数,作为目标显示状态信息对应的目标补偿系数。其中,不同的显示状态信息对应的补偿系数可以不同,也可以相同,在此不做具体限定。Then, in the above step S303, the processor can search in the pre-established correspondence between the display status information and the compensation coefficient according to the target display status information, and find the compensation coefficient corresponding to the target display status information, as the target Display the target compensation coefficient corresponding to the status information. The compensation coefficients corresponding to different display status information may be different or the same, and are not specifically limited here.

在一种实施方式中,预先建立的显示状态信息与补偿系数之间的对应关系具体可以为:环境光强与补偿系数之间的对应关系和温度与补偿系数之间的对应关系。在这种情况下,处理器可以显示状态信息具体包括的内容,在环境光强与补偿系数之间的对应关系和/或温度与补偿系数之间的对应关系中进行查找,以确定目标显示状态信息对应的目标补偿系数。In one implementation, the pre-established correspondence between the display status information and the compensation coefficient may specifically be: the correspondence between ambient light intensity and the compensation coefficient, and the correspondence between the temperature and the compensation coefficient. In this case, the processor can display the specific content included in the status information, and search in the correspondence between the ambient light intensity and the compensation coefficient and/or the correspondence between the temperature and the compensation coefficient to determine the target display state. The target compensation coefficient corresponding to the information.

在另一种实施方式中,预先建立的显示状态信息与补偿系数之间的对应关系具体可以为:环境光强和温度整体与补偿系数之间的对应关系。在这种情况下,处理器可以显示状态信息具体包括的环境光强和温度,在该对应关系中进行查找,以确定目标显示状态信息对应的目标补偿系数。In another implementation manner, the pre-established correspondence between the display status information and the compensation coefficient may specifically be: the correspondence between the overall ambient light intensity and temperature and the compensation coefficient. In this case, the processor can display the ambient light intensity and temperature specifically included in the status information, and search in the corresponding relationship to determine the target compensation coefficient corresponding to the target display status information.

上述关于补偿系数的对应关系也可以采用查找表的形式进行记录,例如,环境光强和温度整体与补偿系数之间的对应关系可以如下查找表所示:The above-mentioned corresponding relationship about the compensation coefficient can also be recorded in the form of a lookup table. For example, the corresponding relationship between the overall ambient light intensity and temperature and the compensation coefficient can be shown in the following lookup table:

那么,如果处理器获取的目标显示状态信息为环境光强T2,温度为-39℃,那么根据上述查找表,处理器可以确定该目标显示状态信息对应的目标补偿系数为T2S2。Then, if the target display status information obtained by the processor is the ambient light intensity T2 and the temperature is -39°C, then according to the above lookup table, the processor can determine that the target compensation coefficient corresponding to the target display status information is T2S2.

确定了上述目标补偿系数后,处理器可以执行上述步骤S304,即根据该目标补偿系数、目标灰度阈值以及待显示图像的原始灰度值,确定目标灰度值,并按照目标灰度值对待显示图像进行灰度值调整。After determining the target compensation coefficient, the processor can execute the above step S304, that is, determine the target grayscale value based on the target compensation coefficient, the target grayscale threshold and the original grayscale value of the image to be displayed, and treat it according to the target grayscale value. Display image for grayscale adjustment.

作为一种实施方式,处理器可以根据目标灰度阈值确定待显示图像中哪些像素点的灰度值需要调整,哪些像素点的灰度值不需要调整,进而,可以根据目标补偿系数以及这些需要调整的像素点的原始灰度值,确定这些需要调整的像素点的目标灰度值。针对不需要调整的像素点,可以确定其目标灰度值为其原始灰度值。As an implementation manner, the processor can determine which pixels in the image to be displayed need to have their grayscale values adjusted and which pixels do not need to be adjusted based on the target grayscale threshold. Furthermore, the processor can determine based on the target compensation coefficient and these needs. The original gray value of the adjusted pixels determines the target gray value of the pixels that need to be adjusted. For pixels that do not need to be adjusted, the target gray value can be determined to be its original gray value.

确定了各个像素点对应的目标灰度值后,处理器可以将待显示图像中各个像素点的灰度值由原始灰度值调整为对应的目标灰度值,从而完成对待显示图像的处理。After determining the target grayscale value corresponding to each pixel point, the processor can adjust the grayscale value of each pixel point in the image to be displayed from the original grayscale value to the corresponding target grayscale value, thereby completing the processing of the image to be displayed.

作为另一种实施方式,处理器可以根据目标补偿系数以及待显示图像中各个像素点的原始灰度值,计算得到各个像素点的目标灰度值。根据目标灰度阈值确定待显示图像中各个像素点对应的灰度值调整方式。As another implementation manner, the processor may calculate the target grayscale value of each pixel point based on the target compensation coefficient and the original grayscale value of each pixel point in the image to be displayed. The grayscale value adjustment method corresponding to each pixel in the image to be displayed is determined according to the target grayscale threshold.

具体来说,对于原始灰度值大于目标灰度阈值的像素点,可以采用一种预设方式,根据其对应的目标灰度值调整其灰度值;对于原始灰度值不大于目标灰度阈值的像素点,可以采用另一种预设方式,根据其对应的目标灰度值调整其灰度值,从而完成对待显示图像的处理。具体预设方式可以根据灰度阈值以及补偿系数的确定方式设定,在此不做具体限定。Specifically, for pixels whose original grayscale value is greater than the target grayscale threshold, a preset method can be used to adjust the grayscale value according to its corresponding target grayscale value; for pixels whose original grayscale value is not greater than the target grayscale The threshold pixel can use another preset method to adjust its gray value according to its corresponding target gray value, thereby completing the processing of the image to be displayed. The specific preset method can be set according to the determination method of the grayscale threshold and compensation coefficient, and is not specifically limited here.

例如,假设处理器确定目标灰度阈值为35,那么针对原始灰度值大于35的像素点,可以根据目标补偿系数和原始灰度值计算得到目标灰度值,然后采用PWM(Pulse widthmodulation,脉冲宽度调制)占空比为100%的方式,调整这些像素点的灰度值为对应的目标灰度值。For example, assuming that the processor determines that the target grayscale threshold is 35, then for pixels with original grayscale values greater than 35, the target grayscale value can be calculated based on the target compensation coefficient and the original grayscale value, and then PWM (Pulse width modulation, pulse Width modulation) with a duty cycle of 100%, adjust the grayscale values of these pixels to the corresponding target grayscale values.

针对原始灰度值不大于35的像素点,可以根据目标补偿系数和原始灰度值计算得到目标灰度值,然后采用PWM占空比为50%的方式,调整这些像素点的灰度值,使得调整后的这些像素点的灰度值略高于目标灰度值。For pixels whose original gray value is not greater than 35, the target gray value can be calculated based on the target compensation coefficient and the original gray value, and then the gray value of these pixels can be adjusted using a PWM duty cycle of 50%. Make the adjusted gray value of these pixels slightly higher than the target gray value.

采用本发明实施例提供的方案,由于补偿系数可以标识各个灰度值在不同的显示状态信息下对应的所需补偿的灰度值,所以根据预先建立的显示状态信息与灰度阈值之间的对应关系确定的目标灰度阈值可以准确标识各个灰度值在目标显示状态信息下对应的所需补偿的灰度值,进而,电子设备根据该目标补偿系数确定目标灰度值,并按照目标灰度值对待显示图像进行灰度值调整,可以将待显示图像的灰度值调整至合适的值,减弱环境光强和/或显示屏的温度对显示屏的影响,从而改善显示屏的显示画面效果。Using the solution provided by the embodiment of the present invention, since the compensation coefficient can identify the gray value that needs compensation corresponding to each gray value under different display state information, according to the pre-established relationship between the display state information and the gray threshold The target grayscale threshold determined by the corresponding relationship can accurately identify the required compensated grayscale value corresponding to each grayscale value under the target display status information. Then, the electronic device determines the target grayscale value based on the target compensation coefficient, and determines the target grayscale value according to the target grayscale value. Adjusting the grayscale value of the image to be displayed can adjust the grayscale value of the image to be displayed to an appropriate value, weakening the impact of ambient light intensity and/or the temperature of the display screen on the display screen, thereby improving the display screen. Effect.

另外,对于需要高亮显示待显示图像的情况,可以通过调整待显示图像的灰度值的方式提高显示画面的亮度,从而降低高度显示所需的显示屏的驱动能耗。In addition, when the image to be displayed needs to be highlighted, the brightness of the display screen can be increased by adjusting the grayscale value of the image to be displayed, thereby reducing the driving energy consumption of the display screen required for high-definition display.

作为本发明实施例的一种实施方式,上述获取待显示图像以及用于显示所述待显示图像的显示屏的目标显示状态信息的步骤,可以包括:As an implementation method of the embodiment of the present invention, the above-mentioned step of obtaining the image to be displayed and the target display status information of the display screen used to display the image to be displayed may include:

获取显示屏分区对应的目标显示状态信息以及待显示图像。Obtain the target display status information corresponding to the display partition and the image to be displayed.

由于显示屏的各个部分所处的环境光强可能不同,显示屏的各个部分的温度也可能出现不均匀的现象,所以为了更加准确地对待显示图像进行灰度值的调整,可以预先对用于显示待显示图像的显示屏进行划分得到的显示屏分区。例如,可以预先将显示屏进行划分得到4个、6个、8个或9个等显示屏分区。其中,各个显示屏分区的大小可以相同,也可以不同。Since the ambient light intensity of each part of the display screen may be different, the temperature of each part of the display screen may also be uneven. Therefore, in order to adjust the grayscale value of the image to be displayed more accurately, you can pre-register the gray value of the image to be displayed. Display screen partitions obtained by dividing the display screen that displays the image to be displayed. For example, the display screen can be divided into 4, 6, 8 or 9 display screen partitions in advance. Among them, the size of each display screen partition can be the same or different.

在这种情况下,处理器可以各个显示屏分区对应的目标显示状态信息,也就是可以获取各个显示屏分区所处环境的环境光强和/或温度。例如,处理器预先将显示屏进行划分得到6个显示屏分区,那么处理器在获取目标显示状态信息时,便可以分别获取该6个显示屏分区的对应的目标显示状态信息。In this case, the processor can display status information corresponding to the target of each display screen partition, that is, it can obtain the ambient light intensity and/or temperature of the environment in which each display screen partition is located. For example, if the processor divides the display screen into six display screen partitions in advance, then when the processor obtains the target display status information, it can obtain the corresponding target display status information of the six display screen partitions respectively.

处理器获取待显示图像后,可以将待显示图像按照显示屏分区的划分方式进行分区存储,以便于后续处理过程的进行。After the processor obtains the image to be displayed, the image to be displayed can be partitioned and stored according to the partitioning method of the display screen to facilitate subsequent processing.

相应的,上述按照所述目标灰度值对所述待显示图像进行灰度值调整的步骤,可以包括:Correspondingly, the above step of adjusting the grayscale value of the image to be displayed according to the target grayscale value may include:

将所述各个显示屏分区对应的目标灰度值,按照所述各个显示屏分区的位置关系整合为所述待显示图像对应的灰度数据;按照所述灰度数据对所述待显示图像进行灰度值调整。The target grayscale values corresponding to each display screen partition are integrated into grayscale data corresponding to the image to be displayed according to the positional relationship of each display screen partition; and the image to be displayed is processed according to the grayscale data. Grayscale value adjustment.

由于在这种情况下目标显示状态信息为针对不同显示分区的多组数据,那么计算得到的目标灰度值也是针对不同显示分区的多组数据,所以处理器可以将各个显示分区对应的目标灰度值,按照各个显示屏分区的位置关系整合为一帧图像对应的灰度数据,也就是待显示图像对应的灰度数据。Since the target display status information in this case is multiple sets of data for different display partitions, the calculated target grayscale values are also multiple sets of data for different display partitions, so the processor can convert the target grayscale values corresponding to each display partition. The degree value is integrated into the grayscale data corresponding to a frame of image according to the positional relationship of each display screen partition, that is, the grayscale data corresponding to the image to be displayed.

进而,处理器便可以按照整合得到的灰度数据对待显示图像进行灰度值调整,由于整合得到的灰度数据为一帧与对待显示图像中各个像素点一一对应的灰度数据,所以处理器可以准确快速地按照该灰度数据对待显示图像进行灰度值调整。Furthermore, the processor can adjust the grayscale value of the image to be displayed according to the integrated grayscale data. Since the integrated grayscale data is a frame of grayscale data corresponding to each pixel point in the image to be displayed, the processing The processor can accurately and quickly adjust the gray value of the image to be displayed according to the gray data.

可见,在本实施例中,可以预先对用于显示待显示图像的显示屏进行划分得到的多个显示区域,这样,处理器可以获取各个显示屏分区对应的目标显示状态信息,进而,将各个显示屏分区对应的目标灰度值,按照各个显示屏分区的位置关系整合为待显示图像对应的灰度数据,按照灰度数据对待显示图像进行灰度值调整。在各个显示分区对应的环境光强和/或温度不同时,处理器可以根据各个显示分区对应的目标显示状态信息,确定更加合适的目标灰度值,从而进一步改善显示屏的画面显示效果。It can be seen that in this embodiment, the display screen used to display the image to be displayed can be divided into multiple display areas in advance. In this way, the processor can obtain the target display status information corresponding to each display screen partition, and then, each The target grayscale values corresponding to the display screen partitions are integrated into grayscale data corresponding to the image to be displayed according to the positional relationship of each display screen partition, and the grayscale value of the image to be displayed is adjusted according to the grayscale data. When the ambient light intensity and/or temperature corresponding to each display partition is different, the processor can determine a more appropriate target grayscale value based on the target display status information corresponding to each display partition, thereby further improving the display effect of the display screen.

作为本发明实施例的一种实施方式,上述获取显示屏分区对应的目标显示状态信息的步骤,可以包括:As an implementation method of the embodiment of the present invention, the above-mentioned step of obtaining the target display status information corresponding to the display screen partition may include:

获取显示屏分区所包括的目标分区对应的目标显示状态信息。Obtain the target display status information corresponding to the target partition included in the display screen partition.

作为一种实施方式,上述显示屏分区可以包括目标分区和过渡分区,处理器在获取目标显示状态信息时,可以仅获取目标分区对应的目标显示状态信息,而不获取过渡分区对应的目标显示状态信息。As an implementation manner, the above-mentioned display screen partition may include a target partition and a transition partition. When obtaining the target display status information, the processor may only obtain the target display status information corresponding to the target partition, but not the target display status corresponding to the transition partition. information.

例如,如图4所示,可以预先将显示屏400划分为9个区域,其中,显示屏分区401、显示屏分区403、显示屏分区407以及显示屏分区409为目标分区,其他显示屏分区为过渡分区。那么处理器便可以仅获取显示屏分区401、显示屏分区403、显示屏分区407以及显示屏分区409分别对应的目标显示状态信息。For example, as shown in Figure 4, the display screen 400 can be divided into nine areas in advance, among which the display screen partition 401, the display screen partition 403, the display screen partition 407 and the display screen partition 409 are target partitions, and the other display screen partitions are Transition partition. Then the processor can only obtain the target display status information corresponding to the display screen partition 401, the display screen partition 403, the display screen partition 407 and the display screen partition 409 respectively.

相应的,上述根据所述目标补偿系数、所述目标灰度阈值以及所述待显示图像的原始灰度值,确定目标灰度值的步骤,可以包括:Correspondingly, the above step of determining the target grayscale value based on the target compensation coefficient, the target grayscale threshold and the original grayscale value of the image to be displayed may include:

针对每个所述目标分区,根据该目标分区对应的目标补偿系数、目标灰度阈值以及所述待显示图像中的原始灰度值,确定该目标分区对应的目标灰度值;针对每个所述过渡分区,根据与该过渡分区相邻的目标分区对应的目标灰度值,计算得到该过渡分区对应的目标灰度值。For each target partition, determine the target gray value corresponding to the target partition according to the target compensation coefficient, the target grayscale threshold and the original grayscale value in the image to be displayed; for each target partition For the transition partition, the target gray value corresponding to the transition partition is calculated based on the target gray value corresponding to the target partition adjacent to the transition partition.

针对每个目标分区,处理器可以根据该目标分区对应的目标补偿系数、目标灰度阈值以及该目标分区对应的待显示图像中的原始灰度值,确定该目标分区对应的目标灰度值。具体确定方式已经在上述实施例中进行了介绍,在此不再赘述。For each target partition, the processor can determine the target gray value corresponding to the target partition based on the target compensation coefficient corresponding to the target partition, the target gray threshold, and the original gray value in the image to be displayed corresponding to the target partition. The specific determination method has been introduced in the above embodiment and will not be described again here.

针对每个过渡分区,处理器可以根据与该过渡分区相邻的目标分区对应的目标灰度值,计算得到该过渡分区对应的目标灰度值。在一种实施方式中,处理器可以计算与该过渡分区相邻的目标分区对应的目标灰度值的平均值,将该平均值作为该过渡分区对应的目标灰度值。For each transition partition, the processor can calculate the target gray value corresponding to the transition partition based on the target gray value corresponding to the target partition adjacent to the transition partition. In one implementation, the processor may calculate an average value of target grayscale values corresponding to the target partition adjacent to the transition partition, and use the average value as the target grayscale value corresponding to the transition partition.

在另一种实施方式中,处理器可以为与该过渡分区相邻的目标分区分配不同的权重,进而将与该过渡分区相邻的目标分区对应的目标灰度值的加权平均值作为该过渡分区对应的目标灰度值。In another implementation, the processor may assign different weights to the target partitions adjacent to the transition partition, and then use the weighted average of the target grayscale values corresponding to the target partitions adjacent to the transition partition as the transition The target grayscale value corresponding to the partition.

在另一种实施方式中,针对相邻的区域既包括目标分区又包括其他过渡分区的过渡分区来说,其对应的目标灰度值还可以根据相邻的目标分区和其他过渡分区的目标灰度值计算得到,这都是合理的。In another embodiment, for a transition partition whose adjacent area includes both the target partition and other transition partitions, the corresponding target gray value can also be based on the target gray value of the adjacent target partition and other transition partitions. The degree values are calculated, which are reasonable.

例如,如图4所示,过渡分区402的目标灰度值可以根据目标分区401和目标分区403对应的目标灰度值计算得到。过渡分区405的目标灰度值可以根据目标分区401、目标分区403、目标分区407以及目标分区409对应的目标灰度值计算得到。还可以在计算得到过渡分区402、过渡分区404、过渡分区406以及过渡分区408的目标灰度值之后,根据目标分区401、目标分区403、目标分区407、目标分区409、过渡分区402、过渡分区404、过渡分区406以及过渡分区408的目标灰度值共同计算得到,这都是合理的。For example, as shown in FIG. 4 , the target grayscale value of the transition partition 402 can be calculated based on the target grayscale values corresponding to the target partition 401 and the target partition 403 . The target grayscale value of the transition partition 405 can be calculated based on the target grayscale values corresponding to the target partition 401, the target partition 403, the target partition 407, and the target partition 409. After calculating the target grayscale values of the transition partition 402, the transition partition 404, the transition partition 406 and the transition partition 408, the target grayscale value of the transition partition 401, the target partition 403, the target partition 407, the target partition 409, the transition partition 402 and the transition partition can be calculated. The target grayscale values of 404, transition partition 406 and transition partition 408 are calculated together, which is reasonable.

可见,在本实施例中,处理器可以获取显示屏分区所包括的目标分区对应的目标显示状态信息,进而,针对每个过渡分区,根据与该过渡分区相邻的目标分区对应的目标灰度值,计算得到该过渡分区对应的目标灰度值。这样一方面可以减少图像处理过程的运算量,另一方面可以使得画面灰度过渡自然均匀,进一步提升画面显示效果。It can be seen that in this embodiment, the processor can obtain the target display status information corresponding to the target partition included in the display screen partition, and then, for each transition partition, according to the target grayscale corresponding to the target partition adjacent to the transition partition value, and calculate the target gray value corresponding to the transition partition. On the one hand, this can reduce the computational load of the image processing process, and on the other hand, it can make the grayscale transition of the picture natural and even, further improving the picture display effect.

作为本发明实施例的一种实施方式,上述目标显示状态信息包括显示屏所处环境的环境光强和显示屏的温度。在这种情况下,上述基于所述目标显示状态信息以及预先建立的显示状态信息与灰度阈值之间的对应关系,确定所述目标显示状态信息对应的目标灰度阈值的步骤,可以包括:As an implementation manner of the embodiment of the present invention, the above-mentioned target display status information includes the ambient light intensity of the environment where the display screen is located and the temperature of the display screen. In this case, the step of determining the target grayscale threshold corresponding to the target display status information based on the target display status information and the pre-established correspondence relationship between the display status information and the grayscale threshold may include:

基于所述环境光强以及预先建立的光强与灰度阈值之间的对应关系,确定第一的目标灰度阈值;基于所述温度以及预先建立的温度与灰度阈值之间的对应关系,确定第二的目标灰度阈值。Based on the ambient light intensity and the pre-established correspondence between the light intensity and the gray threshold, the first target gray threshold is determined; based on the temperature and the pre-established correspondence between the temperature and the gray threshold, Determine the second target grayscale threshold.

可以预先建立光强与灰度阈值之间的对应关系以及温度与灰度阈值之间的对应关系,例如,环境光强-阈值查找表和温度-阈值查找表。这样,处理器便可以基于获取的环境光强以及预先建立的光强与灰度阈值之间的对应关系,确定第一目标灰度阈值,并基于温度以及预先建立的温度与灰度阈值之间的对应关系,确定第二目标灰度阈值。此时便可以得到两个目标灰度阈值。The correspondence between light intensity and grayscale threshold and the correspondence between temperature and grayscale threshold can be established in advance, for example, an ambient light intensity-threshold lookup table and a temperature-threshold lookup table. In this way, the processor can determine the first target gray threshold based on the obtained ambient light intensity and the pre-established correspondence between the light intensity and the gray threshold, and determine the first target gray threshold based on the temperature and the pre-established relationship between the temperature and the gray threshold. corresponding relationship to determine the second target grayscale threshold. At this time, two target grayscale thresholds can be obtained.

上述基于所述目标显示状态信息以及预先建立的显示状态信息与补偿系数之间的对应关系,确定所述目标显示状态信息对应的目标补偿系数的步骤,可以包括:The above step of determining the target compensation coefficient corresponding to the target display status information based on the target display status information and the pre-established correspondence relationship between the display status information and the compensation coefficient may include:

基于所述环境光强以及预先建立的光强与补偿系数之间的对应关系,确定第一目标补偿系数;基于所述温度以及预先建立的温度与补偿系数之间的对应关系,确定第二目标补偿系数。Based on the ambient light intensity and the pre-established correspondence between the light intensity and the compensation coefficient, the first target compensation coefficient is determined; based on the temperature and the pre-established correspondence between the temperature and the compensation coefficient, the second target is determined Compensation coefficient.

同理的,可以预先建立光强与补偿系数之间的对应关系以及温度与补偿系数之间的对应关系,例如,环境光强-系数查找表和温度-系数查找表。这样,处理器便可以基于获取的环境光强以及预先建立的光强与补偿系数之间的对应关系,确定第一目标补偿系数,并基于温度以及预先建立的温度与补偿系数之间的对应关系,确定第二目标补偿系数。此时便可以得到两个目标补偿系数。Similarly, the corresponding relationship between light intensity and compensation coefficient and the corresponding relationship between temperature and compensation coefficient can be established in advance, for example, ambient light intensity-coefficient lookup table and temperature-coefficient lookup table. In this way, the processor can determine the first target compensation coefficient based on the obtained ambient light intensity and the pre-established correspondence between the light intensity and the compensation coefficient, and based on the temperature and the pre-established correspondence between the temperature and the compensation coefficient , determine the second target compensation coefficient. At this point, two target compensation coefficients can be obtained.

进而,处理器便可以根据该第一目标补偿系数、第一目标灰度阈值、第二目标补偿系数、第二的目标灰度阈值以及待显示图像的原始灰度值,确定待显示图像的目标灰度值。Furthermore, the processor can determine the target of the image to be displayed based on the first target compensation coefficient, the first target grayscale threshold, the second target compensation coefficient, the second target grayscale threshold and the original grayscale value of the image to be displayed. grayscale value.

可见,在本实施例中,针对目标显示状态信息即包括显示屏所处环境的环境光强又包括显示屏的温度的情况,可以预先建立两个关于灰度阈值的对应关系以及两个关于补偿系数的对应关系,这样,处理器可以分别针对环境光强和显示屏的温度进行灰度阈值和补偿系数的确定,使得后续计算得到的目标灰度值更加适合当前的环境光强和温度,显示画面的效果更佳。It can be seen that in this embodiment, for the situation where the target display status information includes the ambient light intensity of the environment where the display screen is located and the temperature of the display screen, two corresponding relationships about the grayscale threshold and two about the compensation can be established in advance. The corresponding relationship between the coefficients, in this way, the processor can determine the grayscale threshold and compensation coefficient respectively according to the ambient light intensity and the temperature of the display screen, so that the target grayscale value calculated subsequently is more suitable for the current ambient light intensity and temperature, and the display The effect of the picture is better.

作为本发明实施例的一种实施方式,如图5所示,上述根据所述第一目标补偿系数、所述第一目标灰度阈值、所述第二目标补偿系数、所述第二的目标灰度阈值以及所述待显示图像的原始灰度值,确定所述待显示图像的目标灰度值的步骤,可以包括:As an implementation of the embodiment of the present invention, as shown in Figure 5, the above-mentioned method is based on the first target compensation coefficient, the first target grayscale threshold, the second target compensation coefficient, the second target The grayscale threshold and the original grayscale value of the image to be displayed, and the step of determining the target grayscale value of the image to be displayed may include:

S501,根据所述第一目标补偿系数、所述第一目标灰度阈值以及所述待显示图像的原始灰度值,确定第一目标灰度值;S501. Determine a first target grayscale value according to the first target compensation coefficient, the first target grayscale threshold and the original grayscale value of the image to be displayed;

处理器可以根据第一目标补偿系数、第一目标灰度阈值以及待显示图像的原始灰度值,确定待显示图像中像素点的第一目标灰度值,其中,具体计算方式不做具体限定,例如,针对原始灰度值大于第一目标灰度阈值的像素点,处理器可以确定其第一目标灰度值为其原始灰度值;针对原始灰度值不大于第一目标灰度阈值的像素点,处理器可以根据其原始灰度值和第一目标补偿系数计算的新的灰度值,作为其第一目标灰度值。The processor may determine the first target gray value of the pixel in the image to be displayed based on the first target compensation coefficient, the first target gray threshold and the original gray value of the image to be displayed, where the specific calculation method is not specifically limited. , for example, for a pixel whose original grayscale value is greater than the first target grayscale threshold, the processor can determine its first target grayscale value as its original grayscale value; for a pixel whose original grayscale value is not greater than the first target grayscale threshold For a pixel, the processor can calculate a new gray value based on its original gray value and the first target compensation coefficient as its first target gray value.

又例如,针对原始灰度值大于第一目标灰度阈值的像素点,处理器可以第一预设方式,根据其原始灰度值和第一目标补偿系数计算的新的灰度值,作为其第一目标灰度值;针对原始灰度值不大于第一目标灰度阈值的像素点,处理器可以第二预设方式,根据其原始灰度值和第一目标补偿系数计算的新的灰度值,作为其第一目标灰度值。For another example, for a pixel whose original grayscale value is greater than the first target grayscale threshold, the processor can calculate a new grayscale value based on its original grayscale value and the first target compensation coefficient in a first preset manner as its new grayscale value. The first target gray value; for pixels whose original gray value is not greater than the first target gray threshold, the processor can calculate a new gray value based on the original gray value and the first target compensation coefficient in a second preset manner. gray value as its first target gray value.

S502,根据所述第二目标补偿系数、所述第二目标灰度阈值以及所述待显示图像的原始灰度值,确定第二目标灰度值;S502: Determine a second target grayscale value according to the second target compensation coefficient, the second target grayscale threshold and the original grayscale value of the image to be displayed;

处理器还可以根据第二目标补偿系数、第二目标灰度阈值以及待显示图像的原始灰度值,确定待显示图像中像素点的第二目标灰度值,具体计算方式不再赘述。这样,针对待显示图像中的每个像素点便可以得到两个新的灰度值,即第一目标灰度值和第二目标灰度值。The processor may also determine the second target grayscale value of the pixel in the image to be displayed based on the second target compensation coefficient, the second target grayscale threshold, and the original grayscale value of the image to be displayed. The specific calculation method will not be described again. In this way, two new grayscale values can be obtained for each pixel in the image to be displayed, namely the first target grayscale value and the second target grayscale value.

S503,基于所述第一目标灰度值及所述第二目标灰度值,按照预设计算方式确定所述待显示图像中像素点的目标灰度值。S503. Based on the first target gray value and the second target gray value, determine the target gray value of the pixel in the image to be displayed according to a preset calculation method.

接下来,处理器便可以基于上述第一目标灰度值及上述第二目标灰度值,按照预设计算方式确定待显示图像中像素点的目标灰度值。作为一种实施方式,处理器可以计算每个像素点对应的第一目标灰度值和第二目标灰度值的平均值,作为该像素点对应的目标灰度值。Next, the processor can determine the target gray value of the pixel in the image to be displayed based on the first target gray value and the second target gray value according to a preset calculation method. As an implementation manner, the processor may calculate an average of the first target gray value and the second target gray value corresponding to each pixel point as the target gray value corresponding to the pixel point.

例如,像素点1对应的第一目标灰度值和第二目标灰度值分别为210和220,那么处理器可以将(210+220)/2=215确定为像素点1对应的目标灰度值。For example, if the first target gray value and the second target gray value corresponding to pixel 1 are 210 and 220 respectively, then the processor can determine (210+220)/2=215 as the target gray value corresponding to pixel 1. value.

作为另一种实施方式,处理器还可以采用其他方式确定像素点对应的目标灰度值,例如,可以分别为第一目标灰度值和第二目标灰度值设置对应的权重,进而将第一目标灰度值和第二目标灰度值的加权平均值确定为该像素点对应的目标灰度值。又例如,处理器可以按照预先的公式,基于第一目标灰度值和第二目标灰度值来确定目标灰度值,这都是合理的,在此不做具体限定。As another implementation manner, the processor can also use other methods to determine the target grayscale value corresponding to the pixel point. For example, corresponding weights can be set for the first target grayscale value and the second target grayscale value respectively, and then the third target grayscale value can be determined. The weighted average of the first target gray value and the second target gray value is determined as the target gray value corresponding to the pixel point. For another example, the processor may determine the target grayscale value based on the first target grayscale value and the second target grayscale value according to a predetermined formula. This is reasonable and is not specifically limited here.

可见,在本实施例中,处理器可以分别计算各个像素点对应的第一目标灰度值和第二目标灰度值,进而根据该第一目标灰度值和第二目标灰度值,确定待显示图像中像素点的目标灰度值。可以准确确定各个像素点对应的目标灰度值,从而改善待显示图像在显示屏显示时的显示画面效果。It can be seen that in this embodiment, the processor can respectively calculate the first target gray value and the second target gray value corresponding to each pixel point, and then determine based on the first target gray value and the second target gray value. The target grayscale value of the pixel in the image to be displayed. The target gray value corresponding to each pixel can be accurately determined, thereby improving the display effect of the image to be displayed on the display screen.

作为本发明实施例的一种实施方式,如图6所示,上述根据所述第一目标补偿系数、所述第一目标灰度阈值、所述第二目标补偿系数、所述第二的目标灰度阈值以及所述待显示图像的原始灰度值,确定所述待显示图像的目标灰度值的步骤,可以包括:As an implementation method of the embodiment of the present invention, as shown in Figure 6, the above-mentioned method based on the first target compensation coefficient, the first target grayscale threshold, the second target compensation coefficient, the second target The grayscale threshold and the original grayscale value of the image to be displayed, and the step of determining the target grayscale value of the image to be displayed may include:

S601,根据所述待显示图像中像素点的原始灰度值与所述第一目标灰度阈值以及所述第二的目标灰度阈值之间的大小关系,确定第一类像素点、第二类像素点、第三类像素点以及第四类像素点;S601: Determine the first type of pixels and the second type of pixels based on the size relationship between the original gray value of the pixel in the image to be displayed and the first target gray threshold and the second target gray threshold. Class pixels, Class III pixels and Class IV pixels;

在确定了第一目标灰度阈值以及第二的目标灰度阈值后,处理器可以根据待显示图像中像素点的原始灰度值与该第一目标灰度阈值以及该第二的目标灰度阈值之间的大小关系,将待显示图像中像素点分为多种类别。可以包括第一类像素点、第二类像素点、第三类像素点以及第四类像素点。具体确定方式可以根据目标灰度阈值的实际设定方式决定,在此不做具体限定。After determining the first target grayscale threshold and the second target grayscale threshold, the processor can determine the original grayscale value of the pixel in the image to be displayed and the first target grayscale threshold and the second target grayscale. The size relationship between thresholds divides the pixels in the image to be displayed into multiple categories. It can include first type pixels, second type pixels, third type pixels and fourth type pixels. The specific determination method can be determined according to the actual setting method of the target grayscale threshold, and is not specifically limited here.

其中,第一类像素点为仅需进行环境光补偿的像素点,第二类像素点为仅需进行温度补偿的像素点,第三类像素点为即需进行环境光补偿又需要进行温度补偿的像素点,第四类像素点为无需补偿的像素点。Among them, the first type of pixels are pixels that only require ambient light compensation, the second type of pixels are pixels that only require temperature compensation, and the third type of pixels require both ambient light compensation and temperature compensation. pixels, the fourth type of pixels are pixels that do not require compensation.

例如,假设原始像素值大于第一目标灰度阈值表明其需要进行因环境光导致的灰度补偿,原始像素值小于第二目标灰度阈值表明其需要进行因温度导致的灰度补偿。那么如果第一目标灰度阈值为150,第二目标灰度阈值200,那么处理器可以确定原始像素值不小于200的像素点为第一类像素点,原始像素值不小于150且小于200的像素点为第二类像素点,原始像素值小于150的像素点为第三类像素点,无第四类像素点。For example, assuming that the original pixel value is greater than the first target grayscale threshold, it indicates that it needs to perform grayscale compensation due to ambient light, and that the original pixel value is smaller than the second target grayscale threshold, it indicates that it needs to perform grayscale compensation due to temperature. Then if the first target grayscale threshold is 150 and the second target grayscale threshold is 200, then the processor can determine that the pixels with the original pixel value not less than 200 are the first type of pixels, and the original pixel values are not less than 150 and less than 200. Pixels are of the second type, pixels with original pixel values less than 150 are of the third type, and there are no fourth type pixels.

又例如,假设原始像素值小于第一目标灰度阈值表明其需要进行因环境光导致的灰度补偿,原始像素值小于第二目标灰度阈值表明其需要进行因温度导致的灰度补偿。那么如果第一目标灰度阈值为150,第二目标灰度阈值200,那么处理器可以确定不存在第一类像素点,原始像素值小于150的像素点为第二类像素点,原始像素值不小于150且小于200的像素点为第三类像素点,原始像素值不小于200的像素点为第四类像素点。For another example, assuming that the original pixel value is less than the first target grayscale threshold indicates that it needs to perform grayscale compensation due to ambient light, and the original pixel value is less than the second target grayscale threshold indicates that it needs to perform grayscale compensation due to temperature. Then if the first target gray threshold is 150 and the second target gray threshold is 200, then the processor can determine that there is no first type of pixel, and the pixels with the original pixel value less than 150 are the second type pixels, and the original pixel value Pixels with an original pixel value of not less than 150 and less than 200 are of the third type, and pixels with an original pixel value of not less than 200 are of the fourth type.

S602,针对所述第一类像素点,基于所述第一类像素点的原始灰度值与其对应的第一目标补偿系数确定所述第一类像素点的目标灰度值;S602. For the first type of pixels, determine the target gray value of the first type of pixels based on the original gray value of the first type of pixels and its corresponding first target compensation coefficient;

对于第一类像素点来说,由于其为仅需进行环境光补偿的像素点,而第一目标补偿系数是用于标识像素点因环境光造成的所需补偿的灰度值,所以处理设备可以基于第一类像素点的原始灰度值与其对应的第一目标补偿系数确定第一类像素点的目标灰度值。例如,处理器可以将第一类像素点的原始灰度值与其对应的第一目标补偿系数的乘积,确定为第一类像素点的目标灰度值。For the first type of pixels, since they are pixels that only require ambient light compensation, and the first target compensation coefficient is used to identify the gray value of the pixel that requires compensation due to ambient light, the processing device The target grayscale value of the first type of pixel point may be determined based on the original grayscale value of the first type of pixel point and its corresponding first target compensation coefficient. For example, the processor may determine the product of the original grayscale value of the first type of pixel point and its corresponding first target compensation coefficient as the target grayscale value of the first type of pixel point.

S603,针对所述第二类像素点,基于所述第二类像素点的原始灰度值与其对应的第二目标补偿系数确定所述第二类像素点的目标灰度值;S603. For the second type of pixel point, determine the target grayscale value of the second type of pixel point based on the original grayscale value of the second type of pixel point and its corresponding second target compensation coefficient;

对于第二类像素点来说,由于其为仅需进行温度补偿的像素点,而第二目标补偿系数是用于标识像素点因温度造成的所需补偿的灰度值,所以处理设备可以基于第二类像素点的原始灰度值与其对应的第二目标补偿系数确定第一类像素点的目标灰度值。例如,处理器可以将第二类像素点的原始灰度值与其对应的第二目标补偿系数的乘积,确定为第二类像素点的目标灰度值。For the second type of pixels, since they are pixels that only require temperature compensation, and the second target compensation coefficient is the gray value used to identify the pixels that require compensation due to temperature, the processing device can be based on The original grayscale value of the second type of pixel point and its corresponding second target compensation coefficient determine the target grayscale value of the first type of pixel point. For example, the processor may determine the product of the original grayscale value of the second type of pixel point and its corresponding second target compensation coefficient as the target grayscale value of the second type of pixel point.

S604,针对所述第三类像素点,基于所述第三类像素点的原始灰度值与其对应的第一目标补偿系数以及第二目标补偿系数,确定所述第三类像素点的目标灰度值;S604: For the third type of pixel, determine the target gray value of the third type of pixel based on the original gray value of the third type of pixel and its corresponding first target compensation coefficient and second target compensation coefficient. degree value;

对于第三类像素点来说,由于其为即需进行环境光补偿又需要进行温度补偿的像素点,所以处理器可以根据第三类像素点的原始灰度值与其对应的第一目标补偿系数以及第二目标补偿系数,确定第三类像素点的目标灰度值。For the third type of pixels, since they require both ambient light compensation and temperature compensation, the processor can use the original gray value of the third type of pixels and its corresponding first target compensation coefficient and a second target compensation coefficient to determine the target gray value of the third type of pixel point.

例如,假设第三类像素点P1的原始灰度值为x,第三类像素点P1对应的第一目标补偿系数以及第二目标补偿系数分别为a和b,那么处理器可以确定第三类像素点P1的目标灰度值为ax+b。For example, assuming that the original gray value of the third category pixel P1 is x, and the first target compensation coefficient and the second target compensation coefficient corresponding to the third category pixel P1 are a and b respectively, then the processor can determine the third category The target gray value of pixel point P1 is ax+b.

当然,也可以采用其他算法确定第三类像素点的目标灰度值,例如,第三类像素点P2的原始灰度值为x2,第三类像素点P2对应的第一目标补偿系数以及第二目标补偿系数分别为a2和b2,那么处理器可以确定第三类像素点P2的目标灰度值为a2x2+b2x2等,在此不做具体限定。Of course, other algorithms can also be used to determine the target grayscale value of the third type pixel point. For example, the original grayscale value of the third type pixel point P2 is x2, the first target compensation coefficient corresponding to the third type pixel point P2 and the third type pixel point P2. The two target compensation coefficients are a2 and b2 respectively, then the processor can determine the target gray value of the third type pixel point P2 as a 2 x2 + b 2 x2, etc., which are not specifically limited here.

S605,针对所述第四类像素点,将所述第四类像素点的原始灰度值确定为其对应的目标灰度值。S605: For the fourth type of pixel point, determine the original grayscale value of the fourth type of pixel point as its corresponding target grayscale value.

对于第四类像素点来说,由于其不需要进行灰度值补偿,所以处理器可以将第四类像素点的原始灰度值确定为其对应的目标灰度值。For the fourth type of pixels, since they do not require gray value compensation, the processor can determine the original gray value of the fourth type pixel as its corresponding target gray value.

在上述任一实施例中,如果计算得到的灰度值大于最大灰度值,例如,8比特对应的最大灰度值为255,10比特对应的最大灰度值1024,在这种情况下,可以确定像素点的灰度值为最大灰度值。In any of the above embodiments, if the calculated gray value is greater than the maximum gray value, for example, the maximum gray value corresponding to 8 bits is 255, and the maximum gray value corresponding to 10 bits is 1024, in this case, The gray value of a pixel can be determined to be the maximum gray value.

可见,在本实施例中,处理器可以根据第一目标灰度阈值以及第二目标灰度阈值将待显示图像的像素点划分为不同的类别,进而采用不同的方式确定其对应的目标灰度值,从而更加准确地根据不同的光强和温度对待显示图像的像素点的灰度值进行调整,更加具有针对性,显示画面的效果更好。It can be seen that in this embodiment, the processor can divide the pixels of the image to be displayed into different categories according to the first target grayscale threshold and the second target grayscale threshold, and then use different methods to determine the corresponding target grayscales. value, thereby more accurately adjusting the grayscale value of the pixels of the image to be displayed according to different light intensities and temperatures, which is more targeted and the display effect is better.

作为本发明实施例的一种实施方式,上述显示屏可以设置有光学传感器和/或温度传感器。其中,光学传感器和/或温度传感器可以内置于显示屏,也可以外置,也就是设置于显示屏以外的结构上。可以设置一组光学传感器和/或温度传感器,也可以设置多组光学传感器和/或温度传感器,在此不做具体限定。As an implementation of the embodiment of the present invention, the above-mentioned display screen may be provided with an optical sensor and/or a temperature sensor. Among them, the optical sensor and/or the temperature sensor can be built into the display screen, or can be external, that is, placed on a structure other than the display screen. One set of optical sensors and/or temperature sensors can be provided, or multiple sets of optical sensors and/or temperature sensors can be provided, which are not specifically limited here.

例如,如图7(a)所示,光学传感器701和温度传感器702可以各外置一组;如图7(b)所示,光学传感器703和温度传感器704可以各外置多组,图7(b)中以3组为例;如图7(c)所示,光学传感器705和温度传感器706还可以各内置多组,图7(c)中以3组为例。For example, as shown in Figure 7 (a), the optical sensor 701 and the temperature sensor 702 can each be installed in one group; as shown in Figure 7 (b), the optical sensor 703 and the temperature sensor 704 can be installed in multiple groups each. Figure 7 In (b), 3 groups are taken as an example; as shown in Figure 7(c), the optical sensor 705 and the temperature sensor 706 can each have multiple built-in groups. In Figure 7(c), 3 groups are taken as an example.

针对这种情况,上述获取待显示图像以及用于显示所述待显示图像的显示屏的目标显示状态信息的步骤,可以包括:In response to this situation, the above-mentioned steps of obtaining the image to be displayed and the target display status information of the display screen used to display the image to be displayed may include:

获取待显示图像以及所述光学传感器采集的所述显示屏所处环境的环境光强和/或所述温度传感器采集的所述显示屏的温度。Obtain the image to be displayed and the ambient light intensity of the environment where the display screen is located collected by the optical sensor and/or the temperature of the display screen collected by the temperature sensor.

显示屏设置有光学传感器和/或温度传感器的情况下,光学传感器可以采用显示屏所处环境的环境光强,温度传感器可以采集显示屏的温度,所以处理器可以获取光学传感器采集的显示屏所处环境的环境光强和/或温度传感器采集的所述显示屏的温度,作为显示屏的目标显示状态信息。When the display screen is equipped with an optical sensor and/or a temperature sensor, the optical sensor can use the ambient light intensity of the environment where the display screen is located, and the temperature sensor can collect the temperature of the display screen, so the processor can obtain the temperature of the display screen collected by the optical sensor. The ambient light intensity of the environment and/or the temperature of the display screen collected by the temperature sensor is used as the target display status information of the display screen.

由于光学传感器采用的环境光强一般为光信号,为了方便进行后续处理过程,还可以通过光电转换模块将光信号转换为处理器可处理的电信号,作为环境光强。Since the ambient light intensity used by optical sensors is generally an optical signal, in order to facilitate subsequent processing, the optical signal can also be converted into an electrical signal that can be processed by the processor through a photoelectric conversion module as the ambient light intensity.

可见,在本实施例中,显示屏可以设置有光学传感器和/或温度传感器,这样,处理器便可以获取光学传感器采集的显示屏所处环境的环境光强和/或温度传感器采集的显示屏的温度,保证环境光强和/或温度准确,提高后续处理过程的准确度,保证显示屏的显示画面效果更佳。It can be seen that in this embodiment, the display screen can be provided with an optical sensor and/or a temperature sensor. In this way, the processor can obtain the ambient light intensity of the environment where the display screen is located collected by the optical sensor and/or the display screen collected by the temperature sensor. temperature to ensure accurate ambient light intensity and/or temperature, improve the accuracy of subsequent processing, and ensure better display effects on the display screen.

作为本发明实施例的一种实施方式,上述按照所述目标灰度值对所述待显示图像进行灰度值调整的步骤,可以包括:As an implementation method of the embodiment of the present invention, the above-mentioned step of adjusting the gray value of the image to be displayed according to the target gray value may include:

将待显示图像对应的目标灰度值按照内部数据处理数据格式,转换为输出所需格式,进而输出给数据输出模块,例如,将RGB格式的目标灰度值转换为SPI(SerialPeripheral Interface,外设串行接口)格式等。Timing控制模块可以产生系统电路所需的数据处理时序,输出显示所需时序,以及PWM补偿波形等,以控制数据输出模块的输出方式。Convert the target grayscale value corresponding to the image to be displayed into the required output format according to the internal data processing data format, and then output it to the data output module. For example, convert the target grayscale value in RGB format to SPI (SerialPeripheral Interface, peripheral Serial interface) format, etc. The timing control module can generate the data processing timing required by the system circuit, the timing required for output display, and PWM compensation waveform, etc., to control the output mode of the data output module.

数据输出模块对输入的灰度值还原成正常数据格式,然后按照显示屏的驱动要求进行数据输出至显示屏,以实现在显示屏中显示灰度补偿后的待显示图像的目的。The data output module restores the input grayscale value to the normal data format, and then outputs the data to the display screen according to the driving requirements of the display screen, so as to achieve the purpose of displaying the grayscale compensated image to be displayed on the display screen.

相应于上述图像处理方法,本发明实施例还提供了一种图像处理装置。下面对本发明实施例所提供的图像处理装置进行介绍。该图像处理装置可以应用于电子设备中用于控制显示屏的处理器、控制器、处理芯片等,在此不做具体限定,为了描述清楚,以下称为处理器。Corresponding to the above image processing method, embodiments of the present invention also provide an image processing device. The image processing device provided by the embodiment of the present invention is introduced below. The image processing device can be applied to processors, controllers, processing chips, etc. used to control the display screen in electronic equipment. There is no specific limitation here. For clarity of description, it will be referred to as the processor below.

如图8所示,一种图像处理装置,所述装置包括:As shown in Figure 8, an image processing device includes:

状态信息获取模块810,用于获取待显示图像以及用于显示所述待显示图像的显示屏的目标显示状态信息;The status information acquisition module 810 is used to obtain the image to be displayed and the target display status information of the display screen used to display the image to be displayed;

其中,所述目标显示状态信息包括所述显示屏所处环境的环境光强和/或所述显示屏的温度。Wherein, the target display status information includes the ambient light intensity of the environment where the display screen is located and/or the temperature of the display screen.

灰度阈值确定模块820,用于基于所述目标显示状态信息以及预先建立的显示状态信息与灰度阈值之间的对应关系,确定所述目标显示状态信息对应的目标灰度阈值;The grayscale threshold determination module 820 is configured to determine the target grayscale threshold corresponding to the target display status information based on the target display status information and the pre-established correspondence relationship between the display status information and the grayscale threshold;

补偿系数确定模块830,用于基于所述目标显示状态信息以及预先建立的显示状态信息与补偿系数之间的对应关系,确定所述目标显示状态信息对应的目标补偿系数;The compensation coefficient determination module 830 is configured to determine the target compensation coefficient corresponding to the target display status information based on the target display status information and the pre-established correspondence relationship between the display status information and the compensation coefficient;

其中,所述补偿系数用于标识各个灰度值在不同的显示状态信息下对应的所需补偿的灰度值。Wherein, the compensation coefficient is used to identify the required compensated gray value corresponding to each gray value under different display state information.

灰度调整模块840,用于根据所述目标补偿系数、所述目标灰度阈值以及所述待显示图像的原始灰度值,确定目标灰度值,并按照所述目标灰度值对所述待显示图像进行灰度值调整。The grayscale adjustment module 840 is configured to determine a target grayscale value according to the target compensation coefficient, the target grayscale threshold and the original grayscale value of the image to be displayed, and adjust the target grayscale value according to the target grayscale value. The gray value of the image to be displayed is adjusted.

可见,本发明实施例提供的方案中,由于补偿系数可以标识各个灰度值在不同的显示状态信息下对应的所需补偿的灰度值,所以根据预先建立的显示状态信息与灰度阈值之间的对应关系确定的目标灰度阈值可以准确标识各个灰度值在目标显示状态信息下对应的所需补偿的灰度值,进而,电子设备根据该目标补偿系数确定目标灰度值,并按照目标灰度值对待显示图像进行灰度值调整,可以将待显示图像的灰度值调整至合适的值,减弱环境光强和/或显示屏的温度对显示屏的影响,从而改善显示屏的显示画面效果。It can be seen that in the solution provided by the embodiment of the present invention, since the compensation coefficient can identify the gray value that needs to be compensated corresponding to each gray value under different display state information, according to the pre-established display state information and the gray threshold The target grayscale threshold determined by the corresponding relationship between can accurately identify the grayscale value that needs compensation corresponding to each grayscale value under the target display status information. Then, the electronic device determines the target grayscale value based on the target compensation coefficient, and according to The target gray value adjusts the gray value of the image to be displayed, which can adjust the gray value of the image to be displayed to an appropriate value, weaken the impact of ambient light intensity and/or the temperature of the display on the display, thereby improving the performance of the display. Display screen effect.

可选的,上述状态信息获取模块810可以包括:Optionally, the above status information acquisition module 810 may include:

分区信息获取单元,用于获取显示屏分区对应的目标显示状态信息以及待显示图像。A partition information acquisition unit is used to obtain the target display status information corresponding to the display screen partition and the image to be displayed.

其中,所述显示屏分区为预先对用于显示所述待显示图像的显示屏进行划分得到的区域。Wherein, the display screen partition is an area obtained by dividing the display screen for displaying the image to be displayed in advance.

上述灰度调整模块840可以包括:The above-mentioned grayscale adjustment module 840 may include:

整合单元,用于将所述各个显示屏分区对应的目标灰度值,按照所述各个显示屏分区的位置关系整合为所述待显示图像对应的灰度数据;An integration unit configured to integrate target grayscale values corresponding to each display screen partition into grayscale data corresponding to the image to be displayed according to the positional relationship of each display screen partition;

调整单元,用于按照所述灰度数据对所述待显示图像进行灰度值调整。An adjustment unit, configured to adjust the grayscale value of the image to be displayed according to the grayscale data.

可选的,上述分区信息获取单元可以包括:Optionally, the above partition information acquisition unit may include:

分区信息获取子单元,用于获取显示屏分区所包括的目标分区对应的目标显示状态信息。其中,所述显示屏分区还包括过渡分区。The partition information acquisition subunit is used to obtain the target display status information corresponding to the target partition included in the display screen partition. Wherein, the display screen partition also includes a transition partition.

上述灰度调整模块840可以包括:The above-mentioned grayscale adjustment module 840 may include:

第一灰度值确定单元,用于针对每个所述目标分区,根据该目标分区对应的目标补偿系数、目标灰度阈值以及该目标分区对应的所述待显示图像中的原始灰度值,确定该目标分区对应的目标灰度值;A first grayscale value determination unit configured to determine, for each target partition, the target compensation coefficient corresponding to the target partition, the target grayscale threshold, and the original grayscale value in the image to be displayed corresponding to the target partition, Determine the target gray value corresponding to the target partition;

第二灰度值确定单元,用于针对每个所述过渡分区,根据与该过渡分区相邻的目标分区对应的目标灰度值,计算得到该过渡分区对应的目标灰度值。The second gray value determination unit is configured to calculate, for each transition partition, the target gray value corresponding to the transition partition based on the target gray value corresponding to the target partition adjacent to the transition partition.

可选的,上述目标显示状态信息可以包括所述显示屏所处环境的环境光强和所述显示屏的温度;Optionally, the above target display status information may include the ambient light intensity of the environment in which the display screen is located and the temperature of the display screen;

上述灰度阈值确定模块820可以包括:The above-mentioned gray threshold determination module 820 may include:

阈值确定单元,用于基于所述环境光强以及预先建立的光强与灰度阈值之间的对应关系,确定第一目标灰度阈值;基于所述温度以及预先建立的温度与灰度阈值之间的对应关系,确定第二目标灰度阈值;A threshold determination unit configured to determine a first target gray threshold based on the ambient light intensity and a pre-established correspondence between the light intensity and the gray threshold; based on the temperature and the pre-established relationship between the temperature and the gray threshold. Correspondence between, determine the second target grayscale threshold;

上述补偿系数确定模块830可以包括:The above-mentioned compensation coefficient determination module 830 may include:

补偿系数确定单元,用于基于所述环境光强以及预先建立的光强与补偿系数之间的对应关系,确定第一目标补偿系数;基于所述温度以及预先建立的温度与补偿系数之间的对应关系,确定第二目标补偿系数;A compensation coefficient determination unit configured to determine the first target compensation coefficient based on the ambient light intensity and a pre-established correspondence between the light intensity and the compensation coefficient; based on the temperature and the pre-established relationship between the temperature and the compensation coefficient. Corresponding relationship, determine the second target compensation coefficient;

上述灰度调整模块840可以包括:The above-mentioned grayscale adjustment module 840 may include:

灰度值确定单元,用于根据所述第一目标补偿系数、所述第一目标灰度阈值、所述第二目标补偿系数、所述第二的目标灰度阈值以及所述待显示图像的原始灰度值,确定所述待显示图像的目标灰度值。A gray value determination unit configured to determine the first target compensation coefficient, the first target gray threshold, the second target compensation coefficient, the second target gray threshold and the image to be displayed. The original gray value determines the target gray value of the image to be displayed.

可选的,上述灰度值确定单元可以包括:Optionally, the above gray value determination unit may include:

第一灰度确定子单元,用于根据所述第一目标补偿系数、所述第一目标灰度阈值以及所述待显示图像的原始灰度值,确定第一目标灰度值;A first grayscale determination subunit configured to determine a first target grayscale value based on the first target compensation coefficient, the first target grayscale threshold, and the original grayscale value of the image to be displayed;

第二灰度确定子单元,用于根据所述第二目标补偿系数、所述第二目标灰度阈值以及所述待显示图像的原始灰度值,确定第二目标灰度值;A second grayscale determination subunit, configured to determine a second target grayscale value based on the second target compensation coefficient, the second target grayscale threshold, and the original grayscale value of the image to be displayed;

第三灰度确定子单元,用于基于所述第一目标灰度值及所述第二目标灰度值,按照预设计算方式确定所述待显示图像中像素点的目标灰度值。The third grayscale determination subunit is configured to determine the target grayscale value of the pixel in the image to be displayed based on the first target grayscale value and the second target grayscale value according to a preset calculation method.

可选的,上述灰度值确定单元可以包括:Optionally, the above gray value determination unit may include:

像素点分类子单元,用于根据所述待显示图像中像素点的原始灰度值与所述第一目标灰度阈值以及所述第二目标灰度阈值之间的大小关系,确定第一类像素点、第二类像素点、第三类像素点以及第四类像素点;Pixel classification subunit, used to determine the first category based on the size relationship between the original gray value of the pixel in the image to be displayed and the first target gray threshold and the second target gray threshold. Pixels, second type pixels, third type pixels and fourth type pixels;

其中,所述第一类像素点为仅需进行环境光补偿的像素点,所述第二类像素点为仅需进行温度补偿的像素点,所述第三类像素点为即需进行环境光补偿又需要进行温度补偿的像素点,所述第四类像素点为无需补偿的像素点。Among them, the first type of pixels are pixels that only need ambient light compensation, the second type of pixels are pixels that only need temperature compensation, and the third type of pixels are those that need ambient light compensation. Compensation requires pixels that require temperature compensation, and the fourth type of pixels are pixels that do not require compensation.

第一类灰度确定子单元,用于针对所述第一类像素点,基于所述第一类像素点的原始灰度值与其对应的第一目标补偿系数确定所述第一类像素点的目标灰度值;The first type of grayscale determination subunit is used for determining the first type of pixel point based on the original grayscale value of the first type of pixel point and its corresponding first target compensation coefficient. Target gray value;

第二类灰度确定子单元,用于针对所述第二类像素点,基于所述第二类像素点的原始灰度值与其对应的第二目标补偿系数确定所述第二类像素点的目标灰度值;The second type of grayscale determination subunit is used for determining the second type of pixels based on the original grayscale value of the second type of pixels and its corresponding second target compensation coefficient for the second type of pixels. Target gray value;

第三类灰度确定子单元,用于针对所述第三类像素点,基于所述第三类像素点的原始灰度值与其对应的第一目标补偿系数以及第二目标补偿系数,确定所述第三类像素点的目标灰度值;The third type of grayscale determination subunit is configured to determine, for the third type of pixel point, the original grayscale value of the third type of pixel point and its corresponding first target compensation coefficient and second target compensation coefficient. Describe the target grayscale value of the third type of pixel;

第四类灰度确定子单元,用于针对所述第四类像素点,将所述第四类像素点的原始灰度值确定为其对应的目标灰度值。The fourth type of grayscale determination subunit is used to determine the original grayscale value of the fourth type of pixel point as its corresponding target grayscale value for the fourth type of pixel point.

可选的,上述显示屏可以设置有光学传感器和/或温度传感器;Optionally, the above-mentioned display screen can be provided with an optical sensor and/or a temperature sensor;

上述状态信息获取模块810可以包括:The above-mentioned status information acquisition module 810 may include:

状态信息获取单元,用于获取待显示图像以及所述光学传感器采集的所述显示屏所处环境的环境光强和/或所述温度传感器采集的所述显示屏的温度。A status information acquisition unit is configured to acquire the image to be displayed and the ambient light intensity of the environment where the display screen is located collected by the optical sensor and/or the temperature of the display screen collected by the temperature sensor.

本发明实施例还提供了一种电子设备,如图9所示,包括处理器901、通信接口902、存储器903和通信总线904,其中,处理器901,通信接口902,存储器903通过通信总线904完成相互间的通信,An embodiment of the present invention also provides an electronic device, as shown in Figure 9, including a processor 901, a communication interface 902, a memory 903, and a communication bus 904. The processor 901, the communication interface 902, and the memory 903 communicate through the communication bus 904. complete mutual communication,

存储器903,用于存放计算机程序;Memory 903, used to store computer programs;

处理器901,用于执行存储器903上所存放的程序时,实现上述任一种实施例所述的图像处理方法步骤。The processor 901 is used to implement the steps of the image processing method described in any of the above embodiments when executing the program stored in the memory 903.

上述电子设备提到的通信总线可以是外设部件互连标准(Peripheral ComponentInterconnect,PCI)总线或扩展工业标准结构(Extended Industry StandardArchitecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The communication bus mentioned in the above-mentioned electronic equipment may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into address bus, data bus, control bus, etc. For ease of presentation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

通信接口用于上述电子设备与其他设备之间的通信。The communication interface is used for communication between the above-mentioned electronic devices and other devices.

存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far away from the aforementioned processor.

上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital SignalProcessor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (Network Processor, NP), etc.; it can also be a digital signal processor (Digital SignalProcessor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

在本发明提供的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述任一种实施例所述的图像处理方法步骤。In another embodiment of the present invention, a computer-readable storage medium is also provided. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, any of the above embodiments can be implemented. Described image processing method steps.

在本发明提供的又一实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述任一种实施例所述的图像处理方法步骤。In yet another embodiment of the present invention, a computer program product containing instructions is provided, which, when run on a computer, causes the computer to execute the steps of the image processing method described in any of the above embodiments.

在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in accordance with the embodiments of the present invention are generated in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, e.g., the computer instructions may be transferred from a website, computer, server, or data center Transmission to another website, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), etc.

需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations are mutually exclusive. any such actual relationship or sequence exists between them. Furthermore, the terms "comprises," "comprises," or any other variations thereof are intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also those not expressly listed other elements, or elements inherent to the process, method, article or equipment. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article, or apparatus that includes the stated element.

本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置、电子设备、计算机可读存储介质以及计算机程序产品实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a related manner. The same and similar parts between the various embodiments can be referred to each other. Each embodiment focuses on its differences from other embodiments. In particular, the device, electronic equipment, computer-readable storage medium, and computer program product embodiments are described simply because they are basically similar to the method embodiments. For relevant details, please refer to the partial description of the method embodiments.

以上所述仅为本发明的较佳实施例,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本发明的保护范围内。The above descriptions are only preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are included in the protection scope of the present invention.

Claims (14)

1. An image processing method, the method comprising:
acquiring an image to be displayed and target display state information of a display screen for displaying the image to be displayed, wherein the target display state information comprises the environment light intensity of the environment where the display screen is positioned and/or the temperature of the display screen;
determining a target gray level threshold corresponding to the target display state information based on the target display state information and a pre-established corresponding relation between the display state information and the gray level threshold;
determining a target compensation coefficient corresponding to the target display state information based on the target display state information and a corresponding relation between the display state information and the compensation coefficient, wherein the compensation coefficient is used for identifying gray values which are corresponding to different gray values and need compensation under different display state information;
determining a target gray level value according to the target compensation coefficient, the target gray level threshold value and the original gray level value of the image to be displayed, and adjusting the gray level value of the image to be displayed according to the target gray level value;
The step of obtaining the image to be displayed and the target display state information of the display screen for displaying the image to be displayed comprises the following steps:
acquiring target display state information corresponding to a target partition included in a display screen partition, wherein the display screen partition is a region obtained by dividing a display screen for displaying the image to be displayed in advance, and the display screen partition further comprises a transition partition;
the step of determining the target gray value according to the target compensation coefficient, the target gray threshold value and the original gray value of the image to be displayed includes:
for each target partition, determining a target gray value corresponding to the target partition according to a target compensation coefficient, a target gray threshold and an original gray value in the image to be displayed, which correspond to the target partition; and calculating the target gray value corresponding to the transition partition according to the target gray value corresponding to the target partition adjacent to the transition partition for each transition partition.
2. The method according to claim 1, wherein the step of performing gray value adjustment on the image to be displayed according to the target gray value comprises:
Integrating target gray values corresponding to each display screen partition into gray data corresponding to the image to be displayed according to the position relation of each display screen partition;
and adjusting the gray value of the image to be displayed according to the gray data.
3. The method of claim 1, wherein the target display status information includes an ambient light intensity of an environment in which the display screen is located and a temperature of the display screen;
the step of determining the target gray level threshold corresponding to the target display state information based on the target display state information and the pre-established correspondence between the display state information and the gray level threshold comprises the following steps:
determining a first target gray threshold based on the environment light intensity and a pre-established correspondence between the light intensity and the gray threshold; determining a second target gray threshold based on the temperature and a pre-established correspondence between the temperature and the gray threshold;
the step of determining the target compensation coefficient corresponding to the target display state information based on the target display state information and the pre-established correspondence between the display state information and the compensation coefficient includes:
Determining a first target compensation coefficient based on the environment light intensity and a pre-established corresponding relation between the light intensity and the compensation coefficient; determining a second target compensation coefficient based on the temperature and a pre-established correspondence between the temperature and the compensation coefficient;
the step of determining the target gray value according to the target compensation coefficient, the target gray threshold value and the original gray value of the image to be displayed includes:
and determining the target gray level value of the image to be displayed according to the first target compensation coefficient, the first target gray level threshold, the second target compensation coefficient, the second target gray level threshold and the original gray level value of the image to be displayed.
4. A method according to claim 3, wherein the step of determining the target gray value of the image to be displayed based on the first target compensation coefficient, the first target gray threshold, the second target compensation coefficient, the second target gray threshold, and the original gray value of the image to be displayed comprises:
determining a first target gray value according to the first target compensation coefficient, the first target gray threshold value and the original gray value of the image to be displayed;
Determining a second target gray value according to the second target compensation coefficient, the second target gray threshold value and the original gray value of the image to be displayed;
and determining the target gray value of the pixel point in the image to be displayed according to a preset calculation mode based on the first target gray value and the second target gray value.
5. A method according to claim 3, wherein the step of determining the target gray value of the image to be displayed based on the first target compensation coefficient, the first target gray threshold, the second target compensation coefficient, the second target gray threshold, and the original gray value of the image to be displayed comprises:
determining a first type of pixel point, a second type of pixel point, a third type of pixel point and a fourth type of pixel point according to the magnitude relation between the original gray value of the pixel point in the image to be displayed and the first target gray threshold and the second target gray threshold, wherein the first type of pixel point is a pixel point which only needs to be compensated for ambient light, the second type of pixel point is a pixel point which only needs to be compensated for temperature, the third type of pixel point is a pixel point which needs to be compensated for ambient light and also needs to be compensated for temperature, and the fourth type of pixel point is a pixel point which does not need to be compensated for ambient light;
For the first type pixel points, determining target gray values of the first type pixel points based on the original gray values of the first type pixel points and the corresponding first target compensation coefficients;
for the second class of pixel points, determining target gray values of the second class of pixel points based on the original gray values of the second class of pixel points and the corresponding second target compensation coefficients;
determining a target gray value of the third class pixel point based on the original gray value of the third class pixel point, the corresponding first target compensation coefficient and the second target compensation coefficient;
and determining the original gray value of the fourth class pixel point as the corresponding target gray value of the fourth class pixel point.
6. Method according to any of claims 1-5, characterized in that the display screen is provided with an optical sensor and/or a temperature sensor;
the step of obtaining the image to be displayed and the target display state information of the display screen for displaying the image to be displayed comprises the following steps:
and acquiring an image to be displayed and the environmental light intensity of the environment where the display screen is located, which is acquired by the optical sensor, and/or the temperature of the display screen, which is acquired by the temperature sensor.
7. An image processing apparatus, characterized in that the apparatus comprises:
the system comprises a state information acquisition module, a display screen display module and a display screen display module, wherein the state information acquisition module is used for acquiring an image to be displayed and target display state information of the display screen for displaying the image to be displayed, and the target display state information comprises the environment light intensity of the environment where the display screen is positioned and/or the temperature of the display screen;
the gray threshold determining module is used for determining a target gray threshold corresponding to the target display state information based on the target display state information and a corresponding relation between the display state information and the gray threshold, which is established in advance;
the compensation coefficient determining module is used for determining a target compensation coefficient corresponding to the target display state information based on the target display state information and a corresponding relation between the display state information and the compensation coefficient, wherein the compensation coefficient is used for identifying gray values which are corresponding to each gray value and need compensation under different display state information;
the gray level adjustment module is used for determining a target gray level value according to the target compensation coefficient, the target gray level threshold value and the original gray level value of the image to be displayed, and adjusting the gray level value of the image to be displayed according to the target gray level value;
Wherein, the status information acquisition module includes:
the partition information acquisition unit is used for acquiring target display state information corresponding to a target partition included in a display screen partition, wherein the display screen partition is an area obtained by dividing a display screen for displaying the image to be displayed in advance, and the display screen partition further comprises a transition partition;
the gray scale adjustment module includes:
the first gray value determining unit is used for determining a target gray value corresponding to each target partition according to a target compensation coefficient corresponding to the target partition, a target gray threshold value and an original gray value in the image to be displayed corresponding to the target partition;
and the second gray value determining unit is used for calculating the target gray value corresponding to the transition partition according to the target gray value corresponding to the target partition adjacent to the transition partition for each transition partition.
8. The apparatus of claim 7, wherein the gray scale adjustment module comprises:
the integrating unit is used for integrating the target gray values corresponding to the display screen partitions into gray data corresponding to the image to be displayed according to the position relation of the display screen partitions;
And the adjusting unit is used for adjusting the gray value of the image to be displayed according to the gray data.
9. The apparatus of claim 7, wherein the target display status information includes an ambient light intensity of an environment in which the display screen is located and a temperature of the display screen;
the gray threshold determining module includes:
a threshold determining unit, configured to determine a first target gray threshold based on the environmental light intensity and a correspondence between a light intensity and a gray threshold established in advance; determining a second target gray threshold based on the temperature and a pre-established correspondence between the temperature and the gray threshold;
the compensation coefficient determination module includes:
a compensation coefficient determining unit, configured to determine a first target compensation coefficient based on the environmental light intensity and a correspondence between the light intensity and the compensation coefficient, which is established in advance; determining a second target compensation coefficient based on the temperature and a pre-established correspondence between the temperature and the compensation coefficient;
the gray scale adjustment module includes:
and the gray value determining unit is used for determining the target gray value of the image to be displayed according to the first target compensation coefficient, the first target gray threshold value, the second target compensation coefficient, the second target gray threshold value and the original gray value of the image to be displayed.
10. The apparatus according to claim 9, wherein the gradation value determination unit comprises:
a first gray level determining subunit, configured to determine a first target gray level value according to the first target compensation coefficient, the first target gray level threshold, and an original gray level value of the image to be displayed;
a second gray level determining subunit, configured to determine a second target gray level value according to the second target compensation coefficient, the second target gray level threshold, and the original gray level value of the image to be displayed;
and the third gray level determining subunit is used for determining the target gray level value of the pixel point in the image to be displayed according to a preset calculation mode based on the first target gray level value and the second target gray level value.
11. The apparatus according to claim 9, wherein the gradation value determination unit comprises:
the pixel point classification subunit is configured to determine a first type of pixel point, a second type of pixel point, a third type of pixel point and a fourth type of pixel point according to a magnitude relation between an original gray value of a pixel point in the image to be displayed and the first target gray threshold and the second target gray threshold, wherein the first type of pixel point is a pixel point needing only ambient light compensation, the second type of pixel point is a pixel point needing only temperature compensation, the third type of pixel point is a pixel point needing both ambient light compensation and temperature compensation, and the fourth type of pixel point is a pixel point needing no compensation;
A first class gray level determining subunit, configured to determine, for the first class pixel point, a target gray level value of the first class pixel point based on an original gray level value of the first class pixel point and a first target compensation coefficient corresponding to the original gray level value;
a second class gray level determining subunit, configured to determine, for the second class pixel point, a target gray level value of the second class pixel point based on an original gray level value of the second class pixel point and a second target compensation coefficient corresponding to the original gray level value;
a third class gray level determining subunit, configured to determine, for the third class pixel point, a target gray level value of the third class pixel point based on the original gray level value of the third class pixel point, and a first target compensation coefficient and a second target compensation coefficient corresponding to the original gray level value of the third class pixel point;
and the fourth-class gray level determining subunit is used for determining the original gray level value of the fourth-class pixel point as the corresponding target gray level value of the fourth-class pixel point.
12. Device according to any of claims 7-11, characterized in that the display screen is provided with an optical sensor and/or a temperature sensor;
the status information acquisition module includes:
the state information acquisition unit is used for acquiring an image to be displayed and the environment light intensity of the environment where the display screen is located and acquired by the optical sensor and/or the temperature of the display screen acquired by the temperature sensor.
13. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method of any of claims 1-6 when executing a program stored on a memory.
14. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the method of any of claims 1-6.
CN202110757813.5A 2021-07-05 2021-07-05 An image processing method, device, electronic equipment and storage medium Active CN113467739B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110757813.5A CN113467739B (en) 2021-07-05 2021-07-05 An image processing method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110757813.5A CN113467739B (en) 2021-07-05 2021-07-05 An image processing method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113467739A CN113467739A (en) 2021-10-01
CN113467739B true CN113467739B (en) 2024-02-13

Family

ID=77878152

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110757813.5A Active CN113467739B (en) 2021-07-05 2021-07-05 An image processing method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113467739B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114167889B (en) * 2021-11-29 2023-03-07 内蒙古易飞航空科技有限公司 Intelligent inspection flight platform based on image AI and big data application
CN114185507B (en) * 2021-12-10 2024-07-12 西安诺瓦星云科技股份有限公司 Display screen configuration method, device, storage medium and processor
CN116453459A (en) * 2022-01-07 2023-07-18 北京小米移动软件有限公司 Screen display method and device, readable storage medium and electronic equipment
CN117373356A (en) * 2022-06-30 2024-01-09 京东方科技集团股份有限公司 Display method and device of spliced display screen, computer equipment and storage medium
CN115348463A (en) * 2022-07-11 2022-11-15 西安诺瓦星云科技股份有限公司 Display monitoring method, system, device, electronic equipment and storage medium
CN115222624A (en) * 2022-07-14 2022-10-21 京东方科技集团股份有限公司 Pixel compensation method, device, electronic equipment and computer readable storage medium
CN117437877B (en) * 2023-11-14 2025-02-14 西安诺瓦星云科技股份有限公司 Display screen information processing method, system and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006184305A (en) * 2004-12-24 2006-07-13 Nanao Corp Display method and display device
JP2021051128A (en) * 2019-09-24 2021-04-01 セイコーエプソン株式会社 Method for driving electro-optical device, electro-optical device, and electronic apparatus
CN113066419A (en) * 2021-03-29 2021-07-02 联想(北京)有限公司 Pixel compensation implementation method and related equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5076572B2 (en) * 2006-04-03 2012-11-21 セイコーエプソン株式会社 Image display device and image display method
BR112012000105A2 (en) * 2009-07-03 2019-09-24 Sharp Kk Liquid crystal display device and light source control method.
CN107452345B (en) * 2017-09-29 2020-01-10 京东方科技集团股份有限公司 Display device brightness compensation method and device and display device
US10971079B2 (en) * 2019-08-20 2021-04-06 Apple Inc. Multi-frame-history pixel drive compensation
CN112992056A (en) * 2019-12-16 2021-06-18 北京小米移动软件有限公司 Ambient light detection method and apparatus, electronic device, and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006184305A (en) * 2004-12-24 2006-07-13 Nanao Corp Display method and display device
JP2021051128A (en) * 2019-09-24 2021-04-01 セイコーエプソン株式会社 Method for driving electro-optical device, electro-optical device, and electronic apparatus
CN113066419A (en) * 2021-03-29 2021-07-02 联想(北京)有限公司 Pixel compensation implementation method and related equipment

Also Published As

Publication number Publication date
CN113467739A (en) 2021-10-01

Similar Documents

Publication Publication Date Title
CN113467739B (en) An image processing method, device, electronic equipment and storage medium
US10885856B2 (en) Voltage drop compensation method and device thereof, display device
US11568804B2 (en) Driving circuit, display device, and driving method thereof
CN105913787B (en) The detection method and display module and electronic equipment of substandard state
CN109036277B (en) Compensation method and compensation device, display device, display method and storage medium
US11348507B2 (en) Method and apparatus for identifying current
CN110969175B (en) Wafer processing method and device, storage medium and electronic equipment
CN107957294A (en) Ambient light intensity detection method and device, storage medium and electronic equipment
CN110599961A (en) Gray scale compensation method, device and system of display panel
US10529053B2 (en) Adaptive pixel uniformity compensation for display panels
US10043428B2 (en) Evaluation of a display temperature
KR101983526B1 (en) System and method for external pixel compensation
US20210335183A1 (en) Display control method and device for n-primary-color display panel, and display device
CN110706637A (en) Display panel brightness compensation method, compensation device and display device
KR20230099610A (en) Method, apparatus and electronic device for estimating screen light leakage amount
WO2023164978A1 (en) Brightness adjusting method and apparatus for display panel
CN110021271A (en) Optical compensation method, optical compensating system, display methods and display device
US10636365B2 (en) Device and method for image correction
CN105407339B (en) Image processing apparatus, image processing system, and program
CN114582281B (en) Method and apparatus for panel display gamma correction
TWI573052B (en) Can react to the CPU command of the touch display driver circuit
US20240046874A1 (en) Compensating for Voltage Losses in OLED Displays
CN117746819A (en) Screen brightness adjustment methods, devices and equipment
CN115831036B (en) Display control method and device, display device, electronic device and storage medium
CN115985901A (en) Light-emitting substrate, optical compensation method thereof and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant