CN114675922A - Display data processing method and device, storage medium and electronic equipment - Google Patents

Display data processing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114675922A
CN114675922A CN202210356533.8A CN202210356533A CN114675922A CN 114675922 A CN114675922 A CN 114675922A CN 202210356533 A CN202210356533 A CN 202210356533A CN 114675922 A CN114675922 A CN 114675922A
Authority
CN
China
Prior art keywords
data
display data
display
processor
statistical
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.)
Pending
Application number
CN202210356533.8A
Other languages
Chinese (zh)
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202210356533.8A priority Critical patent/CN114675922A/en
Publication of CN114675922A publication Critical patent/CN114675922A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials

Abstract

The disclosure provides a display data processing method and device, a computer readable storage medium and electronic equipment, and relates to the technical field of computers. The method is applied to a first processor and comprises the following steps: acquiring first statistical data of display data; the display data is used for displaying on a display screen, and the first statistical data is obtained by carrying out color distribution statistics on the display data by a second processor; and calculating the color mean value according to the first statistical data to obtain second statistical data of the display data. The method and the device have the advantages that the calculated amount of the display data is reduced aiming at the condition of overlarge power consumption during display data processing, so that the power consumption caused by carrying and calculating a large amount of memory is saved, and the occupation of bus bandwidth is reduced.

Description

Display data processing method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a display data processing method and apparatus, a computer-readable storage medium, and an electronic device.
Background
In an electronic device having a display screen, it is often necessary to count or calculate display data on the display screen. For example, the influence of the display data of the display screen on the photosensitive sensor under the screen can be obtained by performing statistics or calculation according to the display data of the display screen above the photosensitive sensor under the screen; the brightness calculation is carried out based on the display data of the designated area of the display screen, and the color of the navigation bar can be controlled, so that the similarity between the color of the navigation bar and the color of the background is reduced, and the identification degree of the navigation bar is improved.
In the related art, the processing of the display data generally requires more resources such as memory space and bus bandwidth, and is prone to cause higher power consumption.
It should be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and therefore, may include information that does not constitute prior art that is already known to those skilled in the art.
Disclosure of Invention
The present disclosure provides a display data processing method, apparatus, computer-readable storage medium, and electronic device, thereby reducing resource occupation and power consumption when processing display data at least to a certain extent.
According to a first aspect of the present disclosure, there is provided a display data processing method applied to a first processor, the method comprising: acquiring first statistical data of display data; the display data are used for displaying on a display screen, and the first statistical data are obtained by carrying out color distribution statistics on the display data by a second processor; and calculating the color mean value according to the first statistical data to obtain second statistical data of the display data.
According to a second aspect of the present disclosure, there is provided a display data processing method applied to a second processor, the method comprising: acquiring display data; the display data is used for displaying on a display screen; carrying out color distribution statistics on the display data to obtain first statistical data of the display data; and outputting the first statistical data to enable a first processor to obtain the first statistical data and perform color mean calculation on the first statistical data to obtain second statistical data of the display data.
According to a third aspect of the present disclosure, there is provided a display data processing apparatus applied to a first processor, the apparatus comprising: the data acquisition module is configured to acquire first statistical data of the display data; the display data is used for displaying on a display screen, and the first statistical data is obtained by carrying out color distribution statistics on the display data by a second processor; and the data calculation module is configured to perform color mean calculation according to the first statistical data to obtain second statistical data of the display data.
According to a fourth aspect of the present disclosure, there is provided a display data processing apparatus applied to a second processor, the apparatus comprising: a data acquisition module configured to acquire display data; the display data is used for displaying on a display screen; the data calculation module is configured to perform color distribution statistics on the display data to obtain first statistical data of the display data; and the data output module is configured to output the first statistical data, so that the first processor obtains the first statistical data and performs color mean calculation on the first statistical data to obtain second statistical data of the display data.
According to a fifth aspect of the present disclosure, there is provided a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the data processing method of the electronic device of the first or second aspect described above and possible implementations thereof.
According to a sixth aspect of the present disclosure, there is provided an electronic device comprising: a first processor; a second processor; a display screen; and a memory for storing executable instructions; wherein the first processor is configured to implement the method of the first aspect and possible implementations thereof via execution of the executable instructions; or the second processor is configured to implement the method of the electronic device of the second aspect described above and possible implementations thereof via execution of the executable instructions.
The technical scheme of the disclosure has the following beneficial effects:
when the display data are processed, the first processor obtains first statistical data of the display data, and the first statistical data are obtained by carrying out color distribution statistics on the display data by the second processor. The first processor acquires first statistical data obtained after color distribution statistics is carried out on the display data, and the first statistical data is not original display data, so that the problem of carrying of a large amount of memory data is solved, and power consumption is saved; according to the scheme, the original display data is replaced by the first statistic data for color mean value calculation, so that power consumption caused by overlarge calculation amount is reduced, and the occupation of bus bandwidth is reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It should be apparent that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived by those of ordinary skill in the art without inventive effort.
Fig. 1 shows a schematic diagram of an electronic device in the present exemplary embodiment;
fig. 2 shows a schematic diagram of a mobile terminal in the present exemplary embodiment;
FIG. 3 illustrates a flowchart of a display data processing method applied to a first processor in the present exemplary embodiment;
FIG. 4 is a flowchart illustrating a color mean calculation method in the present exemplary embodiment;
fig. 5 illustrates a flowchart of a display data processing method applied to a second processor in the present exemplary embodiment;
FIG. 6 is a schematic diagram of a process applied to the second processor for acquiring display data according to the exemplary embodiment;
FIG. 7 is a block diagram of an architecture applied to a second processor in the exemplary embodiment;
FIG. 8 illustrates an interaction flow diagram of a display data processing method in the exemplary embodiment;
fig. 9 is a schematic configuration diagram showing a display data processing apparatus in the present exemplary embodiment;
fig. 10 shows a schematic configuration diagram of another display data processing apparatus in the present exemplary embodiment.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
In one scheme of the related art, the display content of the area above the photosensitive sensor is obtained by screenshot through a Graphics Processing Unit (GPU), and data redrawing is performed through the GPU to realize Processing of the display data.
In view of the above problems, exemplary embodiments of the present disclosure provide a display data processing method and an electronic device implementing the same. The electronic apparatus in the present exemplary embodiment is first explained below with reference to fig. 1.
Referring to fig. 1, the electronic device 100 may include a first processor 110, a second processor 120, a display 130, and a memory 140. The first processor 110 is used for executing main logic processing of the electronic device 100, such as an operating system and an application program of the electronic device 100. The second processor 120 is configured to perform display data processing of the electronic device 100, for example, to convert display content of the display screen 130 into display data capable of being processed by the first processor 110. The display screen 130 is used to display data. The memory 140 is used to store executable instructions that may be executed by the main processor 110 or the display processor 120 to implement corresponding functions. The first processor 110, the second processor 120, the display 130 and the memory 140 may be connected by a bus.
In one embodiment, the electronic device 100 may be a mobile terminal. As further described below in conjunction with mobile terminal 200 in fig. 2. It will be appreciated by those skilled in the art that the configuration of figure 2 can also be applied to fixed type devices, in addition to components specifically intended for mobile purposes.
As shown in fig. 2, the mobile terminal 200 may specifically include: the mobile terminal comprises a first processor 201, a second processor 202, a memory 203, a mobile communication module 205, a wireless communication module 206, a display screen 207, a camera module 208, an audio module 209, a power module 210 and a sensor module 211.
The first processor 201 and the second processor 202 may comprise one or more processing units, such as: the first Processor 201 may include a Central Processing Unit (CPU), an AP (Application Processor), a modem Processor; the second Processor may include a Display Processor (DPU), a GPU, an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband Processor, and/or an NPU (Neural-Network Processing Unit), etc. The display data processing method in the present exemplary embodiment may be performed by a CPU and a DPU.
The first processor 201 and the second processor 202 may be connected to a memory 203 or other components via a bus 204.
The memory 203 may be used to store computer executable program code, which includes instructions. The first processor 201 and the second processor 202 execute various functional applications of the mobile terminal 200 and data processing by executing instructions stored in the memory 203. The memory 203 may also store application data, such as files for storing images, videos, etc.
The communication function of the mobile terminal 200 may be implemented by the mobile communication module 205, the antenna 1, the wireless communication module 206, the antenna 2, a modem processor, a baseband processor, and the like. The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. The mobile communication module 205 may provide a mobile communication solution of 3G, 4G, 5G, etc. applied to the mobile terminal 200. The wireless communication module 206 may provide wireless communication solutions such as wireless local area network, bluetooth, near field communication, etc. applied to the mobile terminal 200.
The display screen 207 is used to implement display functions, such as displaying a user interface, images, videos, and the like. The camera module 208 is used for performing a photographing function, such as photographing an image, a video, and the like. The audio module 209 is used to implement audio functions, such as playing audio, collecting voice, and the like. The power module 210 is used to implement power management functions, such as charging a battery, powering a device, monitoring a battery status, and the like.
The sensor module 211 may include one or more sensors for obtaining status assessments of various aspects of the mobile terminal 200. For example, the content and the backlight value displayed on the display screen 207 above the photosensitive sensor in the sensor module may be acquired by the photosensitive sensor in the sensor module, and then the data acquired by the sensor is processed by the second processor 202, and then the data is calculated by the first processor 201, so as to obtain the influence of the content displayed on the display screen 207 on the photosensitive sensor.
The present embodiment describes the display data processing method in the exemplary embodiment from two aspects, namely, the first processor 110 and the second processor 120.
Fig. 3 shows an exemplary flow of a display data processing method applied to the first processor 110, which may include the following steps S310 to S320:
step S310, acquiring first statistical data of display data; the display data is used for displaying on a display screen, and the first statistical data is obtained by carrying out color distribution statistics on the display data by the second processor;
step S320, performing color mean calculation according to the first statistical data to obtain second statistical data of the display data.
Based on the method, when the display data is processed, the first processor obtains first statistical data of the display data, and the first statistical data is obtained by performing color distribution statistics on the display data by the second processor. The first processor acquires first statistical data obtained by performing color distribution statistics on the display data instead of original display data, so that the carrying of a large amount of memory data is improved, and the power consumption is saved; according to the scheme, the original display data is replaced by the first statistic data for color mean calculation, so that the power consumption caused by overlarge calculation amount is reduced, and the occupation of bus bandwidth is reduced.
Each step in fig. 3 is explained in detail below.
Referring to fig. 3, in step S310, first statistical data of display data is acquired; the display data is used for displaying on the display screen, and the first statistical data is obtained by performing color distribution statistics on the display data by the second processor.
The display data may be color data of each pixel point on the display screen, or color data of a pixel point in a certain region of interest of the display screen. The present disclosure does not limit the specific format of the display data, for example, the display data may be RGB data, or may also be YUV data.
After the second processor acquires the display data, the second processor can control the display screen to display corresponding content according to the display data, can also perform certain processing on the display data, and then controls the display screen to display corresponding content according to the processed data.
In this exemplary embodiment, the second processor may perform color distribution statistics on the display data to obtain first statistical data of the display data. The color distribution statistics may be statistics of color value distribution of the display data, for example, the number of pixels in each color value interval may be counted; statistics may also be made on color parameters of the display data, such as hue, saturation and brightness of the display data, to determine the classification and shade of the color. The first statistical data is a result of color distribution statistics, and may be pixel point statistical data of display data, or color parameter statistical data of the display data or other types of statistical data.
In an embodiment, the color distribution statistics may be color image histogram statistics, or grayscale image histogram statistics, for example, when performing grayscale image histogram data statistics, first, the number of intervals on a grayscale range of display data needs to be defined, where the grayscale range of the display data is usually 0 to 255, and the number of intervals is set to 16, the display data may be divided into 256/16 ═ 16 groups for statistics, which means that, starting from 0, data with a grayscale range of 16 are sequentially selected for pixel point statistics, for example, the grayscale range selected in the first group is [0, 15], the grayscale range selected in the second group is [16, 31], and so on, histogram statistics data with 16 bar graphs may be obtained; and (4) expressing the statistical result on the height of the bar graph in the histogram, wherein the distribution quantity of the pixel points of the display data in a certain gray scale range is positively correlated with the height of the bar graph. When color image histogram data statistics is performed, images of three color channels of R/G/B may be extracted based on display data, and then the grayscale image histogram statistical method is respectively applied to the images of the three channels to obtain a histogram of each channel image. The first statistical data may be histogram data of each color channel obtained based on the display data.
After the second processor determines the first statistical data, the first processor needs to obtain the first statistical data. The first processor may read the first statistical data of the display data from the register, initiate first communication, write a read command and a register address of the second processor into the second processor, respectively extract the received read command and the register address by the second processor, output the first statistical data to the cache according to the received register address after the read command is resolved, initiate communication again by the first processor, and read the first statistical data in the cache. In addition, the first statistical data may be acquired from a volatile Memory, for example, the first statistical data may be read from a Random Access Memory (RAM), the validity of an address code of an address unit storing the first statistical data may be first confirmed, the RAM storing the first statistical data may be selected as a working state, and finally, the first statistical data may be acquired after the first processor issues a read command to the RAM.
In an embodiment, the acquiring the first statistical data of the display data may include:
the first statistical data of the display data is read from the register of the second processor 120. The register has higher data read-write speed and transmission speed, so that the first processor reads the first statistic data from the register to improve the reading efficiency to a certain extent.
In one embodiment, the second processor 120 outputs the first statistical data to its internal register, and the first processor reads the first statistical data of the display data from the register of the second processor 120 to perform the color mean calculation.
With reference to fig. 3, in step S320, a color mean is calculated according to the first statistical data to obtain a second statistical data of the display data.
The color mean calculation may be a mean calculation of color values of the same color channel in the first statistical data. The second statistical data is a result of color mean calculation, and may be a result of mean calculation of R/G/B color channels, for example.
Correspondingly, the above-mentioned first processor performs color mean calculation according to the first statistical data to obtain the second statistical data of the display data, and may include the following steps:
and calculating the pixel mean value of each channel according to the histogram data of each channel and the number of pixels in the display data.
After the first statistical data of each channel is obtained, second statistical data may be obtained according to the following formulas (1) to (3), where the first statistical data may include histogram data of each channel in the display data, and the second statistical data may include a pixel mean value of each channel in the display data.
Figure BDA0003583226070000081
Figure BDA0003583226070000082
Figure BDA0003583226070000083
Wherein R isavg,Ravg,RavgMean of pixels, R-Hist, for three channels R/G/B, respectivelyj,G-Histj,B-HistjHistogram data respectively representing three channels of RGB, n representing the number of pixels in the display data; and the values of the three components of R/G/B can only take the values between 0 and 255, so that the distribution quantity of each component between 0 and 255 can be counted.
In one embodiment, as shown in fig. 4, the calculating the pixel mean value of each channel according to the histogram data of each channel and the number of pixels in the display data may include the following steps S410 to S430.
Step S410, converting the pixel value into a display quantization value by utilizing the gamma value of the display screen;
step S740, calculating a mean value of the display quantization values of each channel according to the histogram data of each channel and the number of pixels in the display data;
in step S430, the mean value of the display quantization values of each channel is converted into a pixel mean value of each channel using the gamma value.
In step S410, the pixel value may be converted into a display quantization value by using a gamma value of a display screen, wherein the gamma value of the display screen may be 2.2, and may be according to a formula
Figure BDA0003583226070000091
And converting the pixel values of the three channels of R/G/B into display quantization values. The pixel value is essentially a digital signal value corresponding to the electrical signal of the display screen, and the intensity of the electrical signal is not in a linear relationship with the intensity of the optical signal emitted by the display screen, so that the electrical signal (i.e., the pixel value) can be converted nonlinearly to obtain a display quantization value for representing the intensity of the optical signal. The non-linear conversion may be generally implemented using a relationship of a power function, and the gamma value may be an exponent in the power function. In one embodiment, the content displayed in the area above the photosensor may be read back by a display read-back module, for example, a synchronous Write-back (CWB) module of a high-pass platform and a Write Direct Memory Access (WDMA) module of a concurrent platform, and after the content displayed in the area above the photosensor is acquired, the color mean may be calculated by the following equations (4) to (6) directly based on the display data:
Figure BDA0003583226070000092
Figure BDA0003583226070000093
Figure BDA0003583226070000094
wherein n is the senseNumber of pixels, R, in the region above the photosensori,Gi,BiRespectively representing the component values of the three R/G/B channels.
In the above formula, the component values of R/G/B are first normalized and converted to linear space by Electro-Optical Transfer Function (EOFT); secondly, solving the average value of the three components of R/G/B in the linear space; finally, the R/G/B is converted from a linear space to a nonlinear space by an Opto-Electronic Transfer Function (OEFT), and then multiplied by 255. As the values of the three components of R/G/B can only take the values between 0 and 255, statistics can be firstly made on the distribution quantity of each component between 0 and 255, and then direct summation is carried out.
Since the calculation of the color mean value is directly performed based on the display data, the calculation amount is increased, and the memory transportation with large data volume is brought, the histogram statistical processing is performed on the display data.
In step 420, a formula may be formulated based on the histogram data and the number of pixels in the display data
Figure BDA0003583226070000101
Calculating a mean value of the display quantization values of each channel, wherein R-Histj,G-Histj,B-HistjHistogram data respectively representing three channels of RGB, and n represents the number of pixels in the display data.
Finally, in step S430, the mean value of the display quantization values of each channel may be converted into the pixel mean value of each channel using the gamma value according to the following equations (7) to (9):
Figure BDA0003583226070000102
Figure BDA0003583226070000103
Figure BDA0003583226070000104
based on the method, the histogram data is adopted to replace the original display data to calculate the color mean value, so that the data operation amount is reduced, and the power consumption caused by a large amount of memory transportation and calculation is reduced.
Taking ROI with a size of 50 × 50 pixels as an example, assuming that each Pixel is 24 Bits, the display content of the ROI has a Pixel bit number (Bits Per Pixel, BPP) of 50 × 50 · 24, and the original second processor is used to process the display data, and 3 × 50 — 7500 operations are required to obtain the calculation result of the color mean value; in the method, a histogram counting step is added in the second processor, color distribution statistics is performed on display data to obtain first statistic data, color mean value calculation is performed based on the first statistic data, and only 3 × 256-768 operations are required, so that the data operation amount is greatly reduced, and the purpose of saving power consumption is achieved.
Fig. 5 shows an exemplary flow of a display data processing method to which the second processor 120 is applied, and first statistical data may be obtained according to the following steps S510 to S530.
Step S510, display data is obtained; the display data is used for displaying on a display screen;
step S520, carrying out color distribution statistics on the display data to obtain first statistical data of the display data;
step S530, outputting the first statistical data, and enabling the first processor to obtain the first statistical data and perform color mean calculation on the first statistical data to obtain second statistical data of the display data.
When the display data are processed, the second processor performs color distribution statistics on the display data to obtain first statistical data of the display data. Therefore, the first processor acquires the first statistical data obtained by performing color distribution statistics on the display data instead of the original display data, so that the carrying of a large amount of memory data is improved, and the power consumption is saved; according to the scheme, the original display data is replaced by the first statistic data for color mean value calculation, so that not only is the power consumption caused by overlarge calculation amount reduced, but also the occupation of bus bandwidth is reduced.
The following describes steps S510 to S530 in fig. 5 in detail.
In step S510, display data is acquired.
The display data may be content displayed in a region of interest in a display screen. The Region of Interest (ROI) may be determined according to the position of the light sensor under the screen, and in an embodiment, the coordinates of the ROI may be obtained according to the position of the light sensor under the screen, and then the content in the current display screen is intercepted based on the coordinates of the ROI, so as to obtain the display content of the Region of Interest. In addition, the ROI may be determined by manually selecting a portion of the display content, or automatically acquired based on an attention mechanism, and the determination manner of the ROI is not particularly limited in the present disclosure.
The display data may be obtained according to the display content of the region of interest, and the display content of the region of interest is input into a plurality of applications, so as to obtain a plurality of image data, and therefore, the obtaining of the display data may include the following steps:
acquiring image data of a plurality of applications, superposing the image data of the plurality of applications to obtain the display data, and further carrying out color distribution statistics on the display data. In addition, as shown in fig. 6, the display data may also be obtained by performing post-processing on the superimposed image data, the post-processing may include other processing methods such as performing color conversion on the image, and the post-processing method is not particularly limited in the present disclosure.
The color distribution statistics may be statistics of the number of pixels of three R/G/B channels of the image data by using a histogram, and may also be statistics of color parameters of the image data, for example, statistics of hue, saturation and brightness of the image data may be performed to determine the category and the depth of the color, which is not particularly limited in this disclosure.
In step S520, color distribution statistics are performed on the display data to obtain first statistical data. In an embodiment, as shown in fig. 7, the second processor may include a Display Processor (DPU) of S730, a statistics module may be configured inside the Display processor in advance, and the statistics module may perform color distribution statistics on the Display data to obtain first statistical data of the Display data. In addition, the first statistical data may be obtained by performing histogram statistics on the color image of the display data, and may further include statistical features of color parameters, and other color features or fusion features such as color features of a block image based on a wavelet. As shown in fig. 7, the first statistic data may be exchanged and transmitted between the sensor service (SensorService) of S710, the hardware author (HWComposer) of S720, and the DPU.
In step S530, the first statistical data is output, so that the first processor obtains the first statistical data and performs color mean calculation on the first statistical data to obtain second statistical data of the display data. The first statistic data may be written into a register of the second processor 120 for the first processor 110 to read, and first, a register automatic access time period may be set, for example, if the automatic access time period is set to 1 second, it means that the register is automatically written into once per second; a transfer instruction may then be invoked to write the first statistic to the register.
In addition, the first statistical data may be output to the volatile memory, for example, the first statistical data may be written to the RAM, the validity of an address code of an address unit of the RAM in which the first statistical data is to be stored may be first confirmed, the RAM in which the first statistical data is stored may be selected as an operating state, and finally, the first statistical data may be written to the RAM after the second processor issues a write command to the RAM.
The register has higher data reading and writing speed and transmission speed, so that the first statistic data is written into the register, and the reading and writing efficiency can be improved to a certain extent; meanwhile, the first statistic data is stored in the register, the storage space of the RAM is not occupied, and the utilization rate of the RAM can be improved.
Based on the method, the first statistic data obtained by histogram statistics are used for replacing display data to calculate the color mean value, so that the data operation amount is reduced, and meanwhile, the power consumption caused by large-scale memory transportation and calculation is reduced.
FIG. 8 shows an exemplary interaction flow of a display data processing method, comprising:
step 801, determining the coordinates of an area of interest according to the position of a light sensor under a screen;
step 802, intercepting the content in the current display screen according to the coordinates of the region of interest to obtain the display content of the region of interest;
step 803, inputting the display content of the region of interest into a plurality of applications, so as to obtain a plurality of image data;
step 804, superposing the image data of the plurality of applications to obtain the display data;
step 805, performing color distribution statistics on display data to obtain histogram data of each channel of the display data;
step 806, outputting the histogram data of each channel of the display data to an internal register;
step 807, reading histogram data of each channel from a register of the second processor;
808, converting the pixel value of the display data into a display quantization value by using the gamma value of the display screen;
step 809, calculating the average value of the display quantization value of each channel according to the histogram data of each channel and the number of pixels in the display data;
step 810, converting the mean value of the display quantization value of each channel into the pixel mean value of each channel by using the gamma value.
Compared with the display data, the histogram data of each channel obtained according to the display data is reduced in the carrying amount of the memory data when the second processor reads the histogram data, and the calculation amount is reduced when the average value is calculated, so that the power consumption loss is saved.
The above describes how to obtain the first statistical data and how to obtain the second statistical data based on the first statistical data. Based on the first statistical data and the second statistical data, further processing may be performed to implement the associated function or control.
In one embodiment, the second statistical data and the noise generated by the screen to the light sensor under different gray scales and different brightness collected under the pure black environment can be combined to calculate the light leakage amount, and further the influence of the screen to the light sensor can be calculated to determine the light sensation compensation scheme of the light sensor under the screen.
In one embodiment, the brightness of the designated area may also be calculated from the first statistical data. First, the brightness of a single pixel can be calculated according to the following formula:
Luma=0.2126·R+0.7152·G+0.0722·B
where R, G, B represents the three color channel data for a single pixel.
Next, in conjunction with the above formula, the average luminance of the designated area can be calculated according to the following formula:
Figure BDA0003583226070000131
wherein n is the number of pixels in the designated area.
Finally, the histogram data can be used to simplify the above equation according to the following equation:
Figure BDA0003583226070000141
the brightness of the designated area is calculated according to the first statistical data, so that the power consumption for calculating the brightness of the area by using the original data can be reduced, and the calculation efficiency is improved. After the brightness of the designated area is determined, the interference of the background color of the display screen on the color of the navigation bar can be improved by adjusting the brightness of the designated area, so that the problem that the navigation bar is difficult to identify when the background color of the display screen is similar to the color of the navigation bar is solved to a certain extent.
The exemplary embodiment of the present disclosure also provides a display data processing apparatus, which is applied to the first processor 110 of the electronic device 100. Referring to fig. 9, the display data processing apparatus 900 may include:
a data acquisition module 910 configured to acquire first statistical data of the display data; the display data is used for displaying on the display screen, and the first statistical data is obtained by carrying out color distribution statistics on the display data by the second processor;
and a data calculating module 920 configured to perform color mean calculation according to the first statistical data to obtain second statistical data of the display data.
In one embodiment, the first statistical data includes histogram data for each channel in the display data; the second statistical data comprises a pixel mean of said each channel in the display data; the calculating the color mean value according to the first statistical data to obtain the second statistical data of the display data may include:
and calculating the pixel mean value of each channel according to the histogram data of each channel and the number of pixels in the display data.
In an embodiment, the calculating the pixel mean value of each channel according to the histogram data and the number of pixels in the display data of each channel may include:
converting the pixel value into a display quantization value by utilizing the gamma value of the display screen;
calculating the mean value of the display quantization value of each channel according to the histogram data of each channel and the number of pixels in the display data;
and converting the mean value of the display quantization value of each channel into the pixel mean value of each channel by utilizing the gamma value.
In an embodiment, the acquiring the first statistical data of the display data may include:
first statistical data of the display data is read from a register of the second processor.
The exemplary embodiment of the present disclosure also provides another display data processing apparatus applied to the second processor 120 of the electronic device 100. Referring to fig. 10, the data processing apparatus 1000 of the electronic device may include:
a data acquisition module 1010 configured to acquire display data; the display data is used for displaying on a display screen;
a data calculating module 1020 configured to perform color distribution statistics on the display data to obtain first statistical data of the display data;
the data output module 1030 is configured to output the first statistical data, so that the first processor obtains the first statistical data and performs color mean calculation on the first statistical data to obtain second statistical data of the display data.
In an embodiment, the acquiring display data may include:
and acquiring image data of a plurality of applications, and superposing the image data of the plurality of applications to obtain display data.
In addition, the specific details of each part in the above device have been described in detail in the method part embodiment, and the details that are not disclosed may refer to the method part embodiment, and thus are not described again.
Exemplary embodiments of the present disclosure also provide a computer-readable storage medium, which may be implemented in the form of a program product including program code for causing an electronic device to perform (more specifically, causing a processor of the electronic device to perform) the steps of various exemplary embodiments described in the above-mentioned "exemplary method" section of this specification, when the program product is run on the electronic device.
In one embodiment, the program product may be embodied as a portable compact disc read only memory (CD-ROM) and include program code, and may be run on an electronic device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium includes, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit, according to exemplary embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
As will be appreciated by one skilled in the art, aspects of the present disclosure may be embodied as a system, method or program product. Accordingly, various aspects of the present disclosure may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system. Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice in the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is to be limited only by the following claims.

Claims (10)

1. A method for processing display data, applied to a first processor, the method comprising:
acquiring first statistical data of display data; the display data is used for displaying on a display screen, and the first statistical data is obtained by carrying out color distribution statistics on the display data by a second processor;
and calculating the color mean value according to the first statistical data to obtain second statistical data of the display data.
2. The method of claim 1, wherein the first statistical data comprises histogram data for each channel in the display data; the second statistical data comprises a pixel mean of the each channel in the display data; the calculating the color mean value according to the first statistical data to obtain second statistical data of the display data includes:
and calculating the pixel mean value of each channel according to the histogram data of each channel and the number of pixels in the display data.
3. The method of claim 2, wherein calculating the pixel mean for each channel based on the histogram data for each channel and the number of pixels in the display data comprises:
converting the pixel value into a display quantization value by utilizing the gamma value of the display screen;
calculating the mean value of the display quantization value of each channel according to the histogram data of each channel and the number of pixels in the display data;
converting the mean of the display quantization values of each channel into a pixel mean of each channel using the gamma value.
4. The method of claim 1, wherein obtaining the first statistical data of the display data comprises:
reading first statistical data of the display data from a register of the second processor.
5. A method of processing display data, applied to a second processor, the method comprising:
acquiring display data; the display data is used for displaying on a display screen;
carrying out color distribution statistics on the display data to obtain first statistical data of the display data;
and outputting the first statistical data to enable a first processor to obtain the first statistical data and perform color mean calculation on the first statistical data to obtain second statistical data of the display data.
6. The method of claim 5, wherein the obtaining display data comprises:
acquiring image data of a plurality of applications, and superposing the image data of the plurality of applications to obtain the display data.
7. A display data processing apparatus, for application to a first processor, the apparatus comprising:
the data acquisition module is configured to acquire first statistical data of the display data; the display data is used for displaying on a display screen, and the first statistical data is obtained by carrying out color distribution statistics on the display data by a second processor;
and the data calculation module is configured to perform color mean calculation according to the first statistical data to obtain second statistical data of the display data.
8. A display data processing apparatus, applied to a second processor, the method comprising:
a data acquisition module configured to acquire display data; the display data is used for displaying on a display screen;
the data calculation module is configured to perform color distribution statistics on the display data to obtain first statistical data of the display data;
and the data output module is configured to output the first statistical data, so that the first processor obtains the first statistical data and performs color mean calculation on the first statistical data to obtain second statistical data of the display data.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 6.
10. An electronic device, comprising:
a first processor;
a second processor;
a display screen;
a memory for storing executable instructions;
wherein the first processor is configured to perform the method of any of claims 1 to 4 via execution of the executable instructions or the second processor is configured to perform the method of claim 5 or 6 via execution of the executable instructions.
CN202210356533.8A 2022-04-06 2022-04-06 Display data processing method and device, storage medium and electronic equipment Pending CN114675922A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210356533.8A CN114675922A (en) 2022-04-06 2022-04-06 Display data processing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210356533.8A CN114675922A (en) 2022-04-06 2022-04-06 Display data processing method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN114675922A true CN114675922A (en) 2022-06-28

Family

ID=82078540

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210356533.8A Pending CN114675922A (en) 2022-04-06 2022-04-06 Display data processing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114675922A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102129674A (en) * 2010-12-17 2011-07-20 北京优纳科技有限公司 Self-adaptation color balance correction method for color image
US20170060367A1 (en) * 2015-09-01 2017-03-02 International Business Machines Corporation Data visualizations selection

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102129674A (en) * 2010-12-17 2011-07-20 北京优纳科技有限公司 Self-adaptation color balance correction method for color image
US20170060367A1 (en) * 2015-09-01 2017-03-02 International Business Machines Corporation Data visualizations selection

Similar Documents

Publication Publication Date Title
US11765466B2 (en) Imaging control method and apparatus, electronic device, and computer readable storage medium
CN109783178B (en) Color adjusting method, device, equipment and medium for interface component
US9826149B2 (en) Machine learning of real-time image capture parameters
US10783837B2 (en) Driving method and driving device of display device, and related device
CN110222694B (en) Image processing method, image processing device, electronic equipment and computer readable medium
EP4053784A1 (en) Image processing method and apparatus, electronic device, and storage medium
WO2022087973A1 (en) Image processing method and apparatus, computer-readable medium, and electronic device
US20210398247A1 (en) Image processing apparatus, image processing method, and storage medium
US20140092116A1 (en) Wide dynamic range display
CN110958363B (en) Image processing method and device, computer readable medium and electronic device
CN113962859B (en) Panorama generation method, device, equipment and medium
CN111429371A (en) Image processing method and device and terminal equipment
CN112565603B (en) Image processing method and device and electronic equipment
CN112822413B (en) Shooting preview method, shooting preview device, terminal and computer readable storage medium
WO2021073316A1 (en) Image signal conversion method and apparatus, and terminal device
CN111447360A (en) Application program control method and device, storage medium and electronic equipment
CN114675922A (en) Display data processing method and device, storage medium and electronic equipment
CN110855957A (en) Image processing method and device, storage medium and electronic equipment
CN110555799A (en) Method and apparatus for processing video
CN115471435A (en) Image fusion method and device, computer readable medium and electronic equipment
CN111866476B (en) Image shooting method and device and electronic equipment
CN113409199A (en) Image processing method, image processing device, electronic equipment and computer readable medium
CN110310341B (en) Method, device, equipment and storage medium for generating default parameters in color algorithm
CN112215237A (en) Image processing method and device, electronic equipment and computer readable storage medium
CN111784607A (en) Image tone mapping method, device, terminal equipment and storage medium

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