Display screen control method, device, equipment and storage medium
By performing grayscale processing and regional clustering analysis on the display image, combining environmental brightness and image area light and dark series encoding, using backlight brightness fitting network and neighborhood gradient optimization algorithm, the display backlight adjustment in the prior art is solved The lack of balance has achieved comprehensive adjustment of ambient light and image requirements and improved visual comfort.
Patent Information
- Application Number
- CN202411363696.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-28
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-09-28
AI Technical Summary
The dynamic adjustment of backlight of the display screen in the prior art lacks a comprehensive balance of ambient light brightness and image demand brightness, resulting in inconsistent display effects under different lighting conditions.
By receiving the displayed image for grayscale processing, regional clustering analysis is performed, combined with the built-in light sensor on the display screen to collect environmental brightness, use the backlight brightness fitting network and neighborhood gradient optimization algorithm to achieve the goal of each display image area Backlight brightness adjustment ensures balance between ambient light and image requirements.
It achieves accurate balance adjustment of ambient light brightness and image demand brightness, improving user visual comfort.
Smart Images

Figure CN118887926B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of display screen control technology, and in particular to a display screen control method, device, equipment and storage medium. Background Art
[0002] Dynamic backlight adjustment of the display helps save energy and improve display comfort. Currently, there are two main ways to dynamically adjust the backlight of the display. The first is to obtain the average brightness of the image by using the maximum value method and the average value method of the statistical image, and then adjust the backlight brightness; the second is to monitor the ambient light brightness in real time, and then adjust the backlight brightness of the display to adapt to the ambient light brightness according to the set interval.
[0003] Methods based on image brightness statistics (such as the maximum value method and the average value method) usually ignore the influence of ambient light, which may lead to inconsistent display effects under different lighting conditions. Although methods based on ambient light monitoring take external lighting conditions into account, they often cannot accurately match the brightness requirements of the image content, which may cause the image to be too bright or too dark.
[0004] In summary, the dynamic backlight adjustment of display screens in the prior art lacks a comprehensive balance between the ambient light brightness and the image required brightness. Summary of the invention
[0005] The present invention aims to solve the technical problem that the dynamic backlight adjustment of a display screen in the prior art lacks a comprehensive balance between the ambient light brightness and the image required brightness, and provides a control method, device, equipment and storage medium for the display screen to solve the problem.
[0006] The technical solution of the present invention to solve the above technical problems is as follows:
[0007] In a first aspect, the present invention provides a method for controlling a display screen, comprising:
[0008] Receive and display the image for grayscale processing to obtain pixel grayscale value distribution information;
[0009] Performing regional clustering analysis on the display image according to the pixel gray value distribution information to obtain a display image region division result;
[0010] Traversing the display image area division result, processing it through a first multi-valued function, and obtaining a brightness level code of the display image area;
[0011] The ambient brightness is collected through the light sensor built into the display screen, and processed through the second multi-value function to obtain the ambient brightness level code;
[0012] Through a backlight brightness fitting network, based on the ambient brightness brightness level code, the brightness level code of the display image area is traversed for processing to obtain a target backlight brightness range of the display image area;
[0013] Performing neighborhood gradient optimization according to the target backlight brightness interval of the display image area to obtain the target backlight brightness of the display image area, wherein the display image area and the display screen area have a one-to-one mapping relationship;
[0014] According to the mapping relationship between the display image area and the display screen area, the display screen control of the display image is performed according to the target backlight brightness of the display image area.
[0015] In a second aspect, the present invention provides a control device for a display screen, comprising:
[0016] A grayscale processing module is used to receive a display image for grayscale processing to obtain pixel grayscale value distribution information;
[0017] A regional clustering analysis module, used for performing regional clustering analysis on the display image according to the gray value distribution information of the pixel points to obtain a display image region division result;
[0018] A first multi-value module, used for traversing the display image area division result, processing it through a first multi-value function, and obtaining a brightness level code of the display image area;
[0019] The second multi-value module is used to collect the ambient brightness through the light sensor built into the display screen, and process it through the second multi-value function to obtain the brightness level code of the ambient brightness;
[0020] A backlight brightness fitting module is used to traverse the brightness level codes of the display image area for processing based on the brightness level codes of the ambient brightness through a backlight brightness fitting network to obtain a target backlight brightness interval of the display image area;
[0021] A neighborhood gradient optimization module, used for performing neighborhood gradient optimization according to the target backlight brightness interval of the display image area to obtain the target backlight brightness of the display image area, wherein the display image area has a one-to-one mapping relationship with the display screen area;
[0022] The display screen control module is used to control the display screen of the display image according to the mapping relationship between the display image area and the display screen area and the target backlight brightness of the display image area.
[0023] In a third aspect, the present application provides an electronic device, including:
[0024] Memory for storing computer software programs;
[0025] The processor is used to read and execute the computer software program, thereby implementing the display screen control method described in any one of the first aspects.
[0026] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium, wherein the storage medium stores a computer software program, and when the computer software program is executed by a processor, the method for controlling a display screen described in any one of the first aspects is implemented.
[0027] The beneficial effects of the present invention are as follows: by gray-scaling the displayed image, the gray-scale value distribution information of the pixel is obtained; according to the gray-scale value distribution information of the pixel, the regional clustering analysis of the displayed image is performed to obtain the display image region division result; for each display image region division result, the first multi-valued function is used to process it to obtain the display image region light and dark level code; by using the built-in light sensor of the display screen, the ambient brightness is collected, and the second multi-valued function is used to process it to obtain the ambient brightness light and dark level code; by using the backlight brightness fitting network, based on the ambient brightness light and dark level code, the display image region light and dark level code is traversed for processing to obtain the display image region target backlight brightness interval of each region; according to the display image region target backlight brightness interval, the neighborhood gradient optimization is performed to obtain the display image region target backlight brightness interval Brightness, wherein the display image area and the display screen area have a one-to-one mapping relationship; according to the mapping relationship between the display image area and the display screen area, a technical solution for controlling the display screen of the display image is performed according to the target backlight brightness of the display image area. Through grayscale processing and regional clustering analysis, the regional brightness distribution of the display image is accurately obtained, which helps to understand the brightness requirements of the image content in more detail. Further, combined with the ambient brightness brightness level coding and the display image area brightness level coding, a backlight brightness fitting network is used for comprehensive processing to achieve a balanced adjustment of the ambient light brightness and the image requirement brightness. Furthermore, through a neighborhood gradient optimization algorithm, the target backlight brightness of the display image area is optimized, achieving the technical purpose of balancing the ambient light and image requirements, thereby improving the technical effect of user visual comfort. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A schematic flow chart of a method for controlling a display screen provided by the present invention;
[0029] Figure 2 A schematic diagram of the structure of a control device for a display screen provided by the present invention;
[0030] Figure 3 A schematic diagram of the structure of an electronic device provided by the present invention;
[0031] Figure 4 A schematic diagram of the structure of a computer-readable storage medium provided by the present invention.
[0032] In the accompanying drawings, the components represented by the reference numerals are listed as follows:
[0033] Electronic device 500 , memory 510 , processor 520 , computer program 511 , computer readable storage medium 600 , computer program 611 . DETAILED DESCRIPTION
[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0035] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0036] In the description of the present invention, the term "for example" is used to mean "used as an example, illustration or explanation". Any embodiment described as "for example" in the present invention is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any technician in the field to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present invention.
[0037] Embodiment 1:
[0038] like Figure 1 As shown, an embodiment of the present invention provides a method for controlling a display screen, comprising the steps of:
[0039] S10: receiving a display image and performing grayscale processing to obtain pixel grayscale value distribution information;
[0040] Specifically, grayscale processing is an image preprocessing technology that converts a color image into a grayscale image so that each pixel only contains brightness information and ignores color information; a display image refers to any image to be displayed on the screen, and preferably, the resolution of the display image is adapted to the display screen; pixel grayscale value distribution information refers to the parameters that characterize the grayscale value information of the pixel at each position after the display image is grayscaled.
[0041] In detail, the received display image is first converted into a grayscale image. This conversion is usually achieved through a certain algorithm, such as applying a weighted summation formula to each pixel in the RGB color space to convert the RGB value into a single grayscale value. The conversion formula is generally: Grayscale value = 0.299×R+0.587×G+0.114×B, where R, G, and B represent the values of the red, green, and blue channels, respectively. In this way, each pixel is assigned a new grayscale value, which constitutes the grayscale value distribution information of the image. As the first step, grayscale processing provides basic data for subsequent image analysis and backlight adjustment.
[0042] By acquiring the grayscale value, the brightness distribution of the image can be analyzed more accurately, thereby realizing regional clustering analysis of the displayed image and dynamic adjustment of the backlight brightness.
[0043] S20: performing a regional clustering analysis on the display image according to the pixel gray value distribution information to obtain a display image region division result;
[0044] Specifically, regional cluster analysis is an image processing technology that divides an image into multiple regions based on the grayscale value distribution information of the pixels in the image, so that the grayscale values of the pixels in the same region are similar, and the grayscale values of the pixels in different regions are greatly different. The display image region division result refers to the region information of the display image divided after the regional cluster analysis is performed on the display image based on the grayscale value distribution information of the pixels, and each region includes coordinate information and grayscale value information.
[0045] Through precise area division, the backlight brightness of different areas can be adjusted more effectively. Compared with the entire screen backlight adjustment used in most applications of traditional technologies, this is more practical and helps improve user visual comfort.
[0046] S30: traversing the display image area division result, processing it through a first multi-valued function, and obtaining a brightness level code of the display image area;
[0047] Further, the display image area division result is traversed, and processed by a first multi-valued function to obtain the brightness and darkness level code of the display image area. Step S30 includes the following steps:
[0048] S31: Obtaining a brightness level code of a displayed image, wherein the brightness level code of the displayed image includes 1, 2, 3 to N, where N is a positive integer, and 1, 2, 3 to N and a gray value interval have a one-to-one unique correspondence;
[0049] S32: constructing the first multi-valued function according to the brightness level coding of the displayed image;
[0050] S33: According to the first multi-valued function, the grayscale feature value labels of the display image area division result are traversed for processing to obtain the light and dark level coding of the display image area.
[0051] Specifically, the first multi-valued function is an image processing technology customized by the present application, which is used to map the grayscale value of the image to a smaller set of grayscale levels, thereby simplifying the data representation of the image and realizing the dimensionality reduction representation of the grayscale value, that is, the grayscale value distributed in a certain interval is expressed using a unique corresponding coding expression, which is convenient for simplifying the subsequent calculation processing and improving the operation efficiency to meet the timeliness requirements of display control. The grayscale feature value label refers to the grayscale feature value of each image partition.
[0052] Suppose there is a display image. After grayscale processing, each pixel has a grayscale value. These grayscale values may vary from 0 to 255 (0 represents black and 255 represents white). Now, we hope to map these grayscale values to fewer levels through a multi-valued function. For example, when N=5, there are 5 levels, represented by 1 (darkest), 2, 3, 4, and 5 (brightest).
[0053] First, determine the grayscale range: First, you need to define the grayscale value range corresponding to each light and dark level. For example, 0-51 can be mapped to 1, 52-102 can be mapped to 2, and so on, until 255 is mapped to 5.
[0054] Secondly, construct a multi-valued function: Next, construct a function, set as the first multi-valued function, which receives a gray value as input and outputs the corresponding light and dark level. Preferably, this function can be a lookup table (LUT), in which each possible gray value is mapped to a light and dark level.
[0055] Finally, apply the multi-value function: for each pixel in the image, apply this function to convert its gray value to the corresponding light and dark level. In this way, each pixel now has a light and dark level label instead of a continuous gray value.
[0056] For example, there is a small area with grayscale values as follows: [45, 60, 70, 80, 90]. According to the defined multi-value function, these grayscale values will be converted to the following light and dark levels: [1, 2, 2, 3, 3]. It can be seen that the original continuous grayscale values are simplified to fewer levels, which helps us process this data more easily in subsequent steps.
[0057] S40: collecting the ambient brightness through the light sensor built into the display screen, and processing it through the second multi-value function to obtain the ambient brightness level code;
[0058] Specifically, preferably, a light sensor is installed at the edge of the display screen to sense the brightness of the ambient light in real time. The second multi-valued function is a feature processing technology customized by the present application, which is used to map the brightness of the environment to a smaller series set, thereby simplifying the data representation of the brightness of the environment and realizing the dimensionality reduction representation of the brightness of the environment, that is, the brightness of the environment distributed in a certain interval is expressed using a unique corresponding code, which is convenient for simplifying the subsequent calculation processing and improving the calculation efficiency to meet the timeliness requirements of display control.
[0059] For example, assume that the brightness value detected by the ambient light sensor ranges from 0 to 1000 lux. We can map the values in this range to 5 brightness levels through the second multi-valued function, for example: 0-200 lux is level 1, 201-400 lux is level 2, and so on. In this way, no matter how the ambient brightness changes, we can use a limited number of levels to represent it, which simplifies the subsequent brightness adjustment process. The specific process is the same as the first multi-valued function processing flow, and will not be elaborated here.
[0060] S50: using a backlight brightness fitting network, based on the ambient brightness brightness level code, traversing the display image area brightness level code for processing, and obtaining a target backlight brightness range of the display image area;
[0061] Specifically, the backlight brightness fitting network refers to a machine learning model used to predict the ideal backlight brightness range of the display image area. By analyzing the ambient brightness and the regional brightness level coding of the display image, the backlight brightness of each display image area is predicted to achieve the best display effect and energy efficiency ratio. The target backlight brightness range of the display image area refers to the recommended backlight brightness distribution range under the constraints of the ambient brightness level coding and the display image area brightness level coding.
[0062] There are two ways to implement the backlight brightness fitting network:
[0063] Implementation method 1: Through a single neural network architecture, as follows:
[0064] Further, through the backlight brightness fitting network, based on the ambient brightness brightness level code, the display image area brightness level code is traversed for processing to obtain the display image area target backlight brightness range, step S50 includes the steps of:
[0065] S51: Obtaining a preset display model;
[0066] S52: performing positive sampling with the preset display model as a constraint to obtain an image display sample data set, wherein the image display sample data set includes an environment brightness record data set, a display image grayscale record data set, and a backlight brightness interval true value record data set;
[0067] S53: According to the first multi-valued function, traverse the display image grayscale record data set for processing to obtain a display image brightness level coding set;
[0068] S54: According to the second multi-valued function, traverse the environmental brightness record data set for processing to obtain an environmental brightness level code set;
[0069] S55: Using the display image brightness level coding set and the ambient brightness brightness level coding set as inputs and the backlight brightness interval true value record data set as supervision, the backlight brightness fitting network is configured.
[0070] Specifically, the preset display model is the model parameter of the display screen, and positive sampling is performed with the preset display model as a constraint, that is, sample data of historical healthy display is collected and stored as an image display sample data set. Any image display sample data includes environmental brightness record data, display image grayscale record data and backlight brightness interval true value record data, and the image display sample data set includes a one-to-one corresponding environmental brightness record data set, display image grayscale record data set and backlight brightness interval true value record data set. Through the first multi-valued function, the display image grayscale record data set is traversed for processing to obtain a display image brightness level coding set, and through the second multi-valued function, the environmental brightness record data set is traversed for processing to obtain an environmental brightness brightness level coding set.
[0071] Furthermore, the neural network architecture is preferably a BP neural network architecture capable of performing regression operations, using the display image brightness level encoding set and the ambient brightness brightness level encoding set completed by historical identification as input data of the BP neural network architecture, and the backlight brightness interval true value record data set as supervision data.
[0072] The ratio of the non-intersection length of the backlight brightness distribution interval and the interval union length of the backlight brightness distribution interval identification data output each time is set as the single loss value, and the mean of the square of the loss value of the first preset number of times is counted as the training mean square loss. When the training mean square loss is less than or equal to the training mean square loss threshold for the second consecutive preset number of times, it is considered that the BP neural network architecture has converged and the backlight brightness fitting network is generated. The first preset number and the second preset number are parameters customized by the model builder.
[0073] Implementation method 2: Through the integrated neural network architecture, as follows:
[0074] Further, the display image brightness level coding set and the ambient brightness brightness level coding set are used as inputs, and the backlight brightness interval true value record data set is used as supervision to configure the backlight brightness fitting network. Step S55 includes the following steps:
[0075] S551: Configure a first network architecture, a second network architecture, a third network architecture, and a fourth network architecture, wherein the first network architecture and the fourth network architecture are BP neural network topologies, the second network architecture is a support vector machine network topology, and the third network architecture is a decision tree network topology;
[0076] S552: constructing a mean square error loss function based on a preset number of error statistics;
[0077] S553: According to the mean square error loss function, taking the display image brightness level coding set and the ambient brightness brightness level coding set as input, taking the backlight brightness interval true value record data set as supervision, training the first network architecture, the second network architecture and the third network architecture to obtain a first backlight brightness fitting channel, a second backlight brightness fitting channel and a third backlight brightness fitting channel;
[0078] S554: According to the mean square error loss function, the outputs of the first backlight brightness fitting channel, the second backlight brightness fitting channel and the third backlight brightness fitting channel are used as inputs of the fourth network architecture, and the backlight brightness interval true value record data set is used as supervision to train the fourth network architecture to obtain a fourth backlight brightness fitting channel;
[0079] S555: Merge the input layers of the first backlight brightness fitting channel, the second backlight brightness fitting channel and the third backlight brightness fitting channel, and fully connect the output layers of the first backlight brightness fitting channel, the second backlight brightness fitting channel and the third backlight brightness fitting channel with the input layer of the fourth backlight brightness fitting channel to generate the backlight brightness fitting network.
[0080] Specifically, the integrated model is processed by fusing multiple models to avoid the problem of insufficient processing accuracy of a single model. Preferably, the integrated model of the embodiment of the present application includes three pre-models, namely, a first network architecture, a second network architecture, and a third network architecture. The first network architecture is a BP neural network topology, the second network architecture is a support vector machine network topology, and the third network architecture is a decision tree network topology. Using the training method of the above-mentioned single model, the first network architecture, the second network architecture, and the third network architecture are trained to obtain the first backlight brightness fitting channel, the second backlight brightness fitting channel, and the third backlight brightness fitting channel. The mean square error loss function here is the above-mentioned "the ratio of the interval non-intersection length of the backlight brightness distribution interval output each time and the backlight brightness distribution interval identification data to the interval union length is set as a single loss value, and the mean of the square of the loss value of the first preset number of times is counted, and set as the training mean square loss". The first preset number of times is the preset error statistical number of times.
[0081] Furthermore, the integrated model of the embodiment of the present application includes a post-model, namely, a fourth network architecture, which is a BP neural network topology. The mean square error loss function continues to be used as the loss function, and the outputs of the first backlight brightness fitting channel, the second backlight brightness fitting channel and the third backlight brightness fitting channel are used as inputs of the fourth network architecture. The fourth network architecture is trained with the backlight brightness interval true value record data set as supervision, and when the convergence conditions are met, the fourth backlight brightness fitting channel is obtained.
[0082] As can be seen from the above, the input of the fourth network architecture is the output of the three front models, so the input layers of the first backlight brightness fitting channel, the second backlight brightness fitting channel and the third backlight brightness fitting channel are merged, and the output layers of the first backlight brightness fitting channel, the second backlight brightness fitting channel and the third backlight brightness fitting channel are fully connected with the input layer of the fourth backlight brightness fitting channel, thereby obtaining the backlight brightness fitting network. By integrating the model, the problem of insufficient processing accuracy of a single model and the existence of accidental errors can be compensated, and the stability of the output results can be improved.
[0083] S60: performing neighborhood gradient optimization according to the target backlight brightness interval of the display image area to obtain the target backlight brightness of the display image area, wherein the display image area and the display screen area have a one-to-one mapping relationship;
[0084] S70: According to the mapping relationship between the display image area and the display screen area, the display screen of the display image is controlled according to the target backlight brightness of the display image area.
[0085] Specifically, after the aforementioned processing, each image partition has a one-to-one corresponding target backlight brightness interval. If the gradient of the backlight brightness display of the adjacent partitions is large, it will damage the visual comfort of the user. Therefore, it is necessary to find a backlight brightness display scheme with a smaller gradient of the backlight brightness display of the globally adjacent partitions. Neighborhood gradient optimization is an optimization algorithm for finding a backlight brightness display scheme with a smaller gradient of the backlight brightness display of the globally adjacent partitions. The target backlight brightness of the display image area refers to the target backlight brightness of each area after optimization. The display image area has a one-to-one mapping relationship with the display screen area, that is, any display image area has a one-to-one corresponding position in the display screen area, and the display image and the display screen size are adapted, so when it is displayed, it has a one-to-one mapping relationship with the display screen area. According to the mapping relationship between the display image area and the display screen area, the backlight brightness of the display screen is controlled by the target backlight brightness of the display image area to realize the display of the display image.
[0086] Further, performing regional clustering analysis on the display image according to the pixel gray value distribution information to obtain a display image region division result, step S20 includes the steps of:
[0087] S21: uniformly distributing at least 5 starting pixel points in the pixel gray value distribution information to obtain the starting pixel gray value;
[0088] S22: Obtaining a first neighboring pixel grayscale value of a first starting pixel grayscale value of the starting pixel grayscale value, and calculating a grayscale value deviation between the first starting pixel grayscale value and the first neighboring pixel grayscale value;
[0089] S23: when the gray value deviation is less than or equal to the gray value deviation threshold, aggregating the first adjacent pixel point and the first starting pixel point into a similar region, and adding the first adjacent pixel point to the starting pixel point;
[0090] S24: when the gray value deviation is greater than the gray value deviation threshold, aggregating the first adjacent pixel point and the first starting pixel point into a heterogeneous region, and adding the first adjacent pixel point into the starting pixel point;
[0091] S25: Repeat the regional clustering analysis, and when the display image regional clustering result is no longer updated for a period of time that satisfies a preset interval, traverse the display image regional clustering result to perform grayscale concentration value statistics to obtain a grayscale feature value label;
[0092] S26: Labeling the display image region clustering result according to the grayscale feature value label to generate the display image region division result.
[0093] Specifically, in order to facilitate understanding of the embodiments of the present application, the detailed process of regional cluster analysis is described as follows:
[0094] Obtain the grayscale value deviation threshold value for dividing the same type and different type areas pre-set by the management personnel. Randomly select a starting pixel from the image and set it as the first starting pixel, and the first starting pixel has the first starting pixel grayscale value; further, randomly select any adjacent pixel of the first starting pixel from the image and set it as the first adjacent pixel, and the first adjacent pixel has the first adjacent pixel grayscale value. Further, calculate the grayscale value deviation between the grayscale value of the first starting pixel and the grayscale value of the first adjacent pixel.
[0095] When the gray value deviation is less than or equal to the gray value deviation threshold, the first adjacent pixel point and the first starting pixel point are aggregated into a homogeneous region. When the gray value deviation is greater than the gray value deviation threshold, the first adjacent pixel point and the first starting pixel point are aggregated into a heterogeneous region, and the first adjacent pixel point is added to the starting pixel point. At the same time, the first adjacent pixel point is added to the starting pixel point, and then the first adjacent pixel point and the first starting pixel point are simultaneously subjected to regional clustering analysis. When the adjacent pixel points of each pixel point are traversed, the analysis is stopped.
[0096] Repeat the regional clustering analysis. When the display image regional clustering result no longer updates for a period that meets the preset interval time set by the user, it means that the display image regional clustering result has stabilized. At this time, traverse the display image regional clustering result, perform grayscale concentration value statistics on the grayscale value set in each region, that is, mean or mode value processing, to obtain the grayscale feature value label.
[0097] Preferably, at least 5 starting pixels may be evenly distributed in the pixel gray value distribution information and set as the starting pixel gray values to improve the efficiency of regional clustering.
[0098] Through area division, the image backlight control can be finely adjusted to make the backlight control more adaptable to the image content, thereby improving the user's visual comfort.
[0099] Further, according to the target backlight brightness interval of the display image area, a neighborhood gradient optimization is performed to obtain the target backlight brightness of the display image area. Step S60 includes the following steps:
[0100] S61: performing a number of random assignments of backlight brightness of the display image area according to the target backlight brightness interval of the display image area to obtain a number of backlight brightness assignment results of the display image area;
[0101] S62: performing neighborhood gradient analysis on the backlight brightness assignment results of the plurality of display image areas to obtain a plurality of neighborhood gradient coefficients;
[0102] S63: performing minimum optimization on the backlight brightness assignment results of the plurality of display image areas according to the plurality of neighborhood gradient coefficients to obtain the target backlight brightness of the display image area.
[0103] Specifically, the target backlight brightness interval of each display image area is the backlight brightness assignment constraint interval of the corresponding area. Each target backlight brightness interval is randomly valued, and a value is taken for each interval to generate a display image area backlight brightness assignment result. This is executed several times to obtain several display image area backlight brightness assignment results.
[0104] Furthermore, a neighborhood gradient analysis is performed on the backlight brightness assignment results of the plurality of display image regions to obtain a plurality of neighborhood gradient coefficients, which are specifically as follows:
[0105] Obtaining a first display image area backlight brightness assignment result of the plurality of display image area backlight brightness assignment results;
[0106] The backlight brightness of the first display image area and the backlight brightness set of the adjacent area of the first display image are obtained as a result of assigning the backlight brightness of the first display image area;
[0107] Based on the backlight brightness of the first display image area, a gradient mean value calculation is performed on a backlight brightness set of adjacent areas of the first display image to obtain a first gradient factor;
[0108] Until the Qth gradient factor is obtained;
[0109] The first gradient factor is counted up to the average value of the Qth gradient factor to obtain a first neighborhood gradient coefficient, which is added to the plurality of neighborhood gradient coefficients.
[0110] Specifically, the backlight brightness set of the adjacent areas of the first display image refers to the backlight brightness set of the adjacent areas of the first display image area; based on the backlight brightness of the first display image area, the brightness deviation modulus is calculated respectively with the backlight brightness set of the adjacent areas of the first display image, and then the average of the brightness deviation modulus is calculated and set as the first gradient factor. In the same way, the gradient factors of all display image areas are calculated. Assuming that Q is the number of display image areas, the first gradient factor is statistically obtained until the Qth gradient factor. Further, the first gradient factor is calculated until the average of the Qth gradient factor to obtain the first neighborhood gradient coefficient, and added to the several neighborhood gradient coefficients. The neighborhood gradient coefficient can be used to characterize the deviation of the adjacent areas of the backlight. The larger the deviation, the worse the visual effect. Therefore, the minimum value of the backlight brightness assignment results of the several display image areas is optimized according to the several neighborhood gradient coefficients to obtain the target backlight brightness of the display image area.
[0111] The control method of a display screen provided by the embodiment of the present invention has at least the following technical effects:
[0112] Through grayscale processing and regional clustering analysis, the regional brightness distribution of the displayed image can be accurately obtained, which helps to understand the brightness requirements of the image content in more detail. Further combined with the ambient brightness brightness level coding and the display image regional brightness level coding, the backlight brightness fitting network is used for comprehensive processing to achieve a balanced adjustment of the ambient light brightness and the image required brightness. Furthermore, through the neighborhood gradient optimization algorithm, the target backlight brightness of the display image area is optimized, achieving the technical goal of balancing ambient light and image requirements, thereby improving the technical effect of user visual comfort.
[0113] Embodiment 2:
[0114] like Figure 2 As shown, based on the same inventive concept as the display screen control method provided in Embodiment 1, the embodiment of the present invention also provides a display screen control device, including:
[0115] A grayscale processing module is used to receive a display image for grayscale processing to obtain pixel grayscale value distribution information;
[0116] A regional clustering analysis module, used for performing regional clustering analysis on the display image according to the gray value distribution information of the pixel points to obtain a display image region division result;
[0117] A first multi-value module, used for traversing the display image area division result, processing it through a first multi-value function, and obtaining a brightness level code of the display image area;
[0118] The second multi-value module is used to collect the ambient brightness through the light sensor built into the display screen, and process it through the second multi-value function to obtain the brightness level code of the ambient brightness;
[0119] A backlight brightness fitting module is used to traverse the brightness level codes of the display image area for processing based on the brightness level codes of the ambient brightness through a backlight brightness fitting network to obtain a target backlight brightness interval of the display image area;
[0120] A neighborhood gradient optimization module, used for performing neighborhood gradient optimization according to the target backlight brightness interval of the display image area to obtain the target backlight brightness of the display image area, wherein the display image area has a one-to-one mapping relationship with the display screen area;
[0121] The display screen control module is used to control the display screen of the display image according to the mapping relationship between the display image area and the display screen area and the target backlight brightness of the display image area.
[0122] Furthermore, the regional cluster analysis module executes the steps including:
[0123] Evenly distributing at least 5 starting pixel points in the pixel gray value distribution information to obtain the starting pixel gray value;
[0124] Obtaining a first neighboring pixel grayscale value of a first starting pixel grayscale value of the starting pixel grayscale value, and calculating a grayscale value deviation between the first starting pixel grayscale value and the first neighboring pixel grayscale value;
[0125] When the gray value deviation is less than or equal to the gray value deviation threshold, the first adjacent pixel point and the first starting pixel point are aggregated into a similar region, and the first adjacent pixel point is added to the starting pixel point;
[0126] When the gray value deviation is greater than the gray value deviation threshold, aggregating the first adjacent pixel point and the first starting pixel point into a heterogeneous region, and adding the first adjacent pixel point into the starting pixel point;
[0127] Repeat the regional clustering analysis, and when the display image regional clustering result is no longer updated for a period of time that satisfies a preset interval, traverse the display image regional clustering result to perform grayscale concentration value statistics to obtain a grayscale feature value label;
[0128] The display image region clustering result is labeled according to the grayscale feature value label to generate the display image region division result.
[0129] Furthermore, the first multi-valued module executes the steps including:
[0130] Obtaining a brightness level code of a displayed image, wherein the brightness level code of the displayed image includes 1, 2, 3 to N, N is a positive integer, and 1, 2, 3 to N and a gray value interval have a one-to-one unique correspondence;
[0131] Constructing the first multi-valued function according to the brightness level coding of the displayed image;
[0132] According to the first multi-valued function, the grayscale feature value labels of the display image area division result are traversed and processed to obtain the light and dark level coding of the display image area.
[0133] Furthermore, the backlight brightness fitting module executes the steps including:
[0134] Get the monitor preset model;
[0135] Perform positive sampling with the preset display model as a constraint to obtain an image display sample data set, wherein the image display sample data set includes an environment brightness record data set, a display image grayscale record data set, and a backlight brightness interval true value record data set;
[0136] According to the first multi-valued function, the display image grayscale record data set is traversed for processing to obtain a display image brightness level coding set;
[0137] According to the second multi-valued function, the environment brightness record data set is traversed for processing to obtain an environment brightness level coding set;
[0138] The backlight brightness fitting network is configured with the display image brightness level coding set and the ambient brightness brightness level coding set as input and the backlight brightness interval true value record data set as supervision.
[0139] Furthermore, the backlight brightness fitting module executes the steps including:
[0140] Configure a first network architecture, a second network architecture, a third network architecture and a fourth network architecture, wherein the first network architecture and the fourth network architecture are BP neural network topologies, the second network architecture is a support vector machine network topology, and the third network architecture is a decision tree network topology;
[0141] Based on the preset error statistics, a mean square error loss function is constructed;
[0142] According to the mean square error loss function, taking the display image brightness level coding set and the ambient brightness brightness level coding set as input, and taking the backlight brightness interval true value record data set as supervision, the first network architecture, the second network architecture and the third network architecture are trained to obtain a first backlight brightness fitting channel, a second backlight brightness fitting channel and a third backlight brightness fitting channel;
[0143] According to the mean square error loss function, the outputs of the first backlight brightness fitting channel, the second backlight brightness fitting channel and the third backlight brightness fitting channel are used as inputs of the fourth network architecture, and the backlight brightness interval true value record data set is used as supervision to train the fourth network architecture to obtain a fourth backlight brightness fitting channel;
[0144] The input layers of the first backlight brightness fitting channel, the second backlight brightness fitting channel and the third backlight brightness fitting channel are merged, and the output layers of the first backlight brightness fitting channel, the second backlight brightness fitting channel and the third backlight brightness fitting channel are fully connected to the input layer of the fourth backlight brightness fitting channel to generate the backlight brightness fitting network.
[0145] Furthermore, the neighborhood gradient optimization module executes the steps including:
[0146] Performing a number of random assignments of backlight brightness of the display image area according to the target backlight brightness interval of the display image area to obtain a number of backlight brightness assignment results of the display image area;
[0147] Performing neighborhood gradient analysis on the backlight brightness assignment results of the plurality of display image areas to obtain a plurality of neighborhood gradient coefficients;
[0148] The minimum value of the backlight brightness assignment results of the plurality of display image areas is optimized according to the plurality of neighborhood gradient coefficients to obtain the target backlight brightness of the display image area.
[0149] Furthermore, the neighborhood gradient optimization module executes the steps including:
[0150] Obtaining a first display image area backlight brightness assignment result of the plurality of display image area backlight brightness assignment results;
[0151] The backlight brightness of the first display image area and the backlight brightness set of the adjacent area of the first display image are obtained as a result of assigning the backlight brightness of the first display image area;
[0152] Based on the backlight brightness of the first display image area, a gradient mean value calculation is performed on a backlight brightness set of adjacent areas of the first display image to obtain a first gradient factor;
[0153] Until the Qth gradient factor is obtained;
[0154] The first gradient factor is counted up to the average value of the Qth gradient factor to obtain a first neighborhood gradient coefficient, which is added to the plurality of neighborhood gradient coefficients.
[0155] Embodiment three:
[0156] See also Figure 3 , Figure 3 Schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 3 As shown, an embodiment of the present invention provides an electronic device 500, including a memory 510, a processor 520, and a computer program 511 stored in the memory 510 and executable on the processor 520. When the processor 520 executes the computer program 511, the following steps are implemented:
[0157] Receive and display the image for grayscale processing to obtain pixel grayscale value distribution information;
[0158] Performing regional clustering analysis on the display image according to the pixel gray value distribution information to obtain a display image region division result;
[0159] Traversing the display image area division result, processing it through a first multi-valued function, and obtaining a brightness level code of the display image area;
[0160] The ambient brightness is collected through the light sensor built into the display screen, and processed through the second multi-value function to obtain the ambient brightness level code;
[0161] Through a backlight brightness fitting network, based on the ambient brightness brightness level code, the brightness level code of the display image area is traversed for processing to obtain a target backlight brightness range of the display image area;
[0162] Performing neighborhood gradient optimization according to the target backlight brightness interval of the display image area to obtain the target backlight brightness of the display image area, wherein the display image area and the display screen area have a one-to-one mapping relationship;
[0163] According to the mapping relationship between the display image area and the display screen area, the display screen control of the display image is performed according to the target backlight brightness of the display image area.
[0164] Embodiment 4:
[0165] See also Figure 4 , Figure 4 A schematic diagram of an embodiment of a computer-readable storage medium provided in an embodiment of the present invention. Figure 4 As shown, this embodiment provides a computer-readable storage medium 600, on which a computer program 611 is stored. When the computer program 611 is executed by a processor, the following steps are implemented:
[0166] Receive and display the image for grayscale processing to obtain pixel grayscale value distribution information;
[0167] Performing regional clustering analysis on the display image according to the pixel gray value distribution information to obtain a display image region division result;
[0168] Traversing the display image area division result, processing it through a first multi-valued function, and obtaining a brightness level code of the display image area;
[0169] The ambient brightness is collected through the light sensor built into the display screen, and processed through the second multi-value function to obtain the ambient brightness level code;
[0170] Through a backlight brightness fitting network, based on the ambient brightness brightness level code, the brightness level code of the display image area is traversed for processing to obtain a target backlight brightness range of the display image area;
[0171] Performing neighborhood gradient optimization according to the target backlight brightness interval of the display image area to obtain the target backlight brightness of the display image area, wherein the display image area and the display screen area have a one-to-one mapping relationship;
[0172] According to the mapping relationship between the display image area and the display screen area, the display screen control of the display image is performed according to the target backlight brightness of the display image area.
[0173] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0174] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0175] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0176] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0177] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0178] Although preferred embodiments of the present invention have been described, additional changes and modifications may occur to these embodiments once those skilled in the art understand the basic inventive concepts.
[0179] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention belong to the scope of the present invention and its equivalent technologies, the present invention is also intended to include these changes and variations.
Claims
1. A method for controlling a display screen, characterized in that: include: Receive and display the image for grayscale processing to obtain pixel grayscale value distribution information; Performing regional clustering analysis on the display image according to the pixel gray value distribution information to obtain a display image region division result; Traversing the display image area division result, processing it through a first multi-valued function, and obtaining a brightness level code of the display image area; The ambient brightness is collected through the light sensor built into the display screen, and processed through the second multi-value function to obtain the ambient brightness level code; Through a backlight brightness fitting network, based on the ambient brightness brightness level code, the brightness level code of the display image area is traversed for processing to obtain a target backlight brightness range of the display image area; Performing neighborhood gradient optimization according to the target backlight brightness interval of the display image area to obtain the target backlight brightness of the display image area, wherein the display image area and the display screen area have a one-to-one mapping relationship; According to the mapping relationship between the display image area and the display screen area, the display screen control of the display image is performed according to the target backlight brightness of the display image area; Among them, the backlight brightness fitting network is used to traverse the brightness level code of the display image area for processing based on the ambient brightness level code to obtain the target backlight brightness range of the display image area, including: Get the monitor preset model; Perform positive sampling with the preset display model as a constraint to obtain an image display sample data set, wherein the image display sample data set includes an environment brightness record data set, a display image grayscale record data set, and a backlight brightness interval true value record data set; According to the first multi-valued function, the display image grayscale record data set is traversed for processing to obtain a display image brightness level coding set; According to the second multi-valued function, the environment brightness record data set is traversed for processing to obtain an environment brightness level coding set; The backlight brightness fitting network is configured by taking the display image brightness level coding set and the ambient brightness brightness level coding set as input and taking the backlight brightness interval true value record data set as supervision; The step of performing neighborhood gradient optimization according to the target backlight brightness interval of the display image area to obtain the target backlight brightness of the display image area includes: Performing a number of random assignments of backlight brightness of the display image area according to the target backlight brightness interval of the display image area to obtain a number of backlight brightness assignment results of the display image area; Performing neighborhood gradient analysis on the backlight brightness assignment results of the plurality of display image areas to obtain a plurality of neighborhood gradient coefficients; The minimum value of the backlight brightness assignment results of the plurality of display image areas is optimized according to the plurality of neighborhood gradient coefficients to obtain the target backlight brightness of the display image area.
2. The method according to claim 1, characterized in that Performing a regional clustering analysis on the display image according to the pixel gray value distribution information to obtain a display image region division result includes: Evenly distributing at least 5 starting pixel points in the pixel gray value distribution information to obtain the starting pixel gray value; Obtaining a first neighboring pixel grayscale value of a first starting pixel grayscale value of the starting pixel grayscale value, and calculating a grayscale value deviation between the first starting pixel grayscale value and the first neighboring pixel grayscale value; When the gray value deviation is less than or equal to the gray value deviation threshold, the first adjacent pixel point and the first starting pixel point are aggregated into a similar region, and the first adjacent pixel point is added to the starting pixel point; When the gray value deviation is greater than the gray value deviation threshold, aggregating the first adjacent pixel point and the first starting pixel point into a heterogeneous region, and adding the first adjacent pixel point into the starting pixel point; Repeat the regional clustering analysis, and when the display image regional clustering result is no longer updated for a period of time that satisfies a preset interval, traverse the display image regional clustering result to perform grayscale concentration value statistics to obtain a grayscale feature value label; The display image region clustering result is labeled according to the grayscale feature value label to generate the display image region division result.
3. The method according to claim 2, characterized in that Traversing the display image area division result, processing it through a first multi-valued function, and obtaining the brightness and darkness level code of the display image area, including: Obtaining a brightness level code of a displayed image, wherein the brightness level code of the displayed image includes 1, 2, 3 to N, N is a positive integer, and 1, 2, 3 to N and a gray value interval have a one-to-one unique correspondence; Constructing the first multi-valued function according to the brightness level coding of the displayed image; According to the first multi-valued function, the grayscale feature value labels of the display image area division result are traversed and processed to obtain the light and dark level coding of the display image area.
4. The method according to claim 1, characterized in that The backlight brightness fitting network is configured by taking the display image brightness level coding set and the ambient brightness brightness level coding set as input and taking the backlight brightness interval true value record data set as supervision, including: Configure a first network architecture, a second network architecture, a third network architecture and a fourth network architecture, wherein the first network architecture and the fourth network architecture are BP neural network topologies, the second network architecture is a support vector machine network topology, and the third network architecture is a decision tree network topology; Based on the preset error statistics, a mean square error loss function is constructed; According to the mean square error loss function, taking the display image brightness level coding set and the ambient brightness brightness level coding set as input, and taking the backlight brightness interval true value record data set as supervision, the first network architecture, the second network architecture and the third network architecture are trained to obtain a first backlight brightness fitting channel, a second backlight brightness fitting channel and a third backlight brightness fitting channel; According to the mean square error loss function, the outputs of the first backlight brightness fitting channel, the second backlight brightness fitting channel and the third backlight brightness fitting channel are used as inputs of the fourth network architecture, and the backlight brightness interval true value record data set is used as supervision to train the fourth network architecture to obtain a fourth backlight brightness fitting channel; The input layers of the first backlight brightness fitting channel, the second backlight brightness fitting channel and the third backlight brightness fitting channel are merged, and the output layers of the first backlight brightness fitting channel, the second backlight brightness fitting channel and the third backlight brightness fitting channel are fully connected to the input layer of the fourth backlight brightness fitting channel to generate the backlight brightness fitting network.
5. The method according to claim 1, characterized in that Performing neighborhood gradient analysis on the backlight brightness assignment results of the plurality of display image areas to obtain a plurality of neighborhood gradient coefficients, including: Obtaining a first display image area backlight brightness assignment result of the plurality of display image area backlight brightness assignment results; The backlight brightness of the first display image area and the backlight brightness set of the adjacent area of the first display image are obtained as a result of assigning the backlight brightness of the first display image area; Based on the backlight brightness of the first display image area, a gradient mean value calculation is performed on a backlight brightness set of adjacent areas of the first display image to obtain a first gradient factor; Until the Qth gradient factor is obtained; The first gradient factor is counted up to the average value of the Qth gradient factor to obtain a first neighborhood gradient coefficient, which is added to the plurality of neighborhood gradient coefficients.
6. A control device for a display screen, characterized in that: A control method for operating a display screen as claimed in any one of claims 1 to 5, comprising: A grayscale processing module is used to receive a display image for grayscale processing to obtain pixel grayscale value distribution information; A regional clustering analysis module, used for performing regional clustering analysis on the display image according to the gray value distribution information of the pixel points to obtain a display image region division result; A first multi-value module, used for traversing the display image area division result, processing it through a first multi-value function, and obtaining a brightness level code of the display image area; The second multi-value module is used to collect the ambient brightness through the light sensor built into the display screen, and process it through the second multi-value function to obtain the brightness level code of the ambient brightness; A backlight brightness fitting module is used to traverse the brightness level codes of the display image area for processing based on the brightness level codes of the ambient brightness through a backlight brightness fitting network to obtain a target backlight brightness interval of the display image area; A neighborhood gradient optimization module, used for performing neighborhood gradient optimization according to the target backlight brightness interval of the display image area to obtain the target backlight brightness of the display image area, wherein the display image area has a one-to-one mapping relationship with the display screen area; The display screen control module is used to control the display screen of the display image according to the mapping relationship between the display image area and the display screen area and the target backlight brightness of the display image area.
7. An electronic device, characterized in that: include: Memory for storing computer software programs; A processor is used to read and execute the computer software program, thereby implementing the control method of the display screen according to any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium, characterized in that: The storage medium stores a computer software program, and when the computer software program is executed by the processor, the control method of the display screen according to any one of claims 1 to 5 is implemented.
