CN110139088A - Color temperature compensating method, electronic equipment and computer readable storage medium - Google Patents

Color temperature compensating method, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN110139088A
CN110139088A CN201910451847.4A CN201910451847A CN110139088A CN 110139088 A CN110139088 A CN 110139088A CN 201910451847 A CN201910451847 A CN 201910451847A CN 110139088 A CN110139088 A CN 110139088A
Authority
CN
China
Prior art keywords
color temperature
screen
value
photodiode
ambient light
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.)
Granted
Application number
CN201910451847.4A
Other languages
Chinese (zh)
Other versions
CN110139088B (en
Inventor
贾玉虎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201910451847.4A priority Critical patent/CN110139088B/en
Publication of CN110139088A publication Critical patent/CN110139088A/en
Application granted granted Critical
Publication of CN110139088B publication Critical patent/CN110139088B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/73Colour balance circuits, e.g. white balance circuits or colour temperature control

Abstract

The application is suitable for electronic technology field, provides a kind of color temperature compensating method, electronic equipment and computer readable storage medium.The embodiment of the present application is by being arranged color temperature sensor in the electronic equipment for including screen and camera, and obtain the rgb value of color temperature sensor, the rgb value of screen and the brightness degree of screen, according to the rgb value of color temperature sensor, the rgb value of screen and the brightness degree of screen, determine the related colour temperature value of ambient light, then the color temperature value of camera is compensated according to the related colour temperature value of ambient light, the deviation between the color temperature value of camera and the related colour temperature value of ambient light is set to be less than preset color temperature threshold value, camera can be made to keep color balance, effectively improve the shooting effect of electronic equipment.

Description

Color temperature compensating method, electronic equipment and computer readable storage medium
Technical field
The application belongs to electronic technology field more particularly to a kind of color temperature compensating method, electronic equipment and computer-readable Storage medium.
Background technique
With the continuous development of electronic technology, smart phone, tablet computer, laptop etc. have display and camera shooting function The electronic equipment of energy emerges one after another, and brings great convenience for the daily production and life of people.It is clapped using electronic equipment When taking the photograph, ambient light can affect to the shooting effect of electronic equipment, and it is insufficient colour cast, satiety or saturation degree occur Situation.
Summary of the invention
In view of this, the embodiment of the present application provides a kind of color temperature compensating method, electronic equipment and computer-readable storage Medium, to solve the problems, such as that ambient light colour cast, satiety caused by the shooting effect of electronic equipment or saturation degree are insufficient.
The first aspect of the embodiment of the present application provides a kind of color temperature compensating method, is applied to electronic equipment, the electronics Equipment includes color temperature sensor, screen and camera, and the color temperature compensating method includes:
Obtain the rgb value of the color temperature sensor;
Obtain the rgb value of the screen and the brightness degree of the screen;
According to the brightness degree of the rgb value of the color temperature sensor, the rgb value of the screen and the screen, ring is determined The related colour temperature value of border light;
The color temperature value that the camera is compensated according to the related colour temperature value of the ambient light, make the color temperature value of the camera with Deviation between the related colour temperature value of the ambient light is less than preset color temperature threshold value.
The second aspect of the embodiment of the present application provides a kind of electronic equipment, including memory, processor and is stored in institute The computer program that can be run in memory and on the processor is stated, further includes that the colour temperature being electrically connected with the processor passes The step of sensor, screen and camera, the processor realizes above-mentioned color temperature compensating method when executing the computer program.
The third aspect of the embodiment of the present application provides a kind of computer readable storage medium, the computer-readable storage Media storage has the step of computer program, the computer program realizes above-mentioned color temperature compensating method when being executed by processor.
The embodiment of the present application obtains colour temperature by the way that color temperature sensor is arranged in the electronic equipment for including screen and camera The brightness degree of the rgb value of sensor, the rgb value of screen and screen, according to the rgb value of color temperature sensor, screen rgb value and The brightness degree of screen determines the related colour temperature value of ambient light, then compensates camera according to the related colour temperature value of ambient light Color temperature value, so that deviation between the color temperature value of camera and the related colour temperature value of ambient light is less than preset color temperature threshold value, can be with So that camera is kept color balance, effectively improves the shooting effect of electronic equipment.
Detailed description of the invention
It in order to more clearly explain the technical solutions in the embodiments of the present application, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only some of the application Embodiment for those of ordinary skill in the art without creative efforts, can also be attached according to these Figure obtains other attached drawings.
Fig. 1 is the flow diagram for the color temperature compensating method that the embodiment of the present application one provides;
Fig. 2 is the flow diagram for the color temperature compensating method that the embodiment of the present application two provides;
Fig. 3 is the schematic diagram of the brightness for the screen that the embodiment of the present application two provides and the relation curve of interference value;
Fig. 4 is that the color depth for the screen that the embodiment of the present application two provides and the gamma2.2 relation curve of interference value show It is intended to;
Fig. 5 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present application three provides;
Fig. 6 is the structural schematic diagram for another electronic equipment that the embodiment of the present application three provides;
Fig. 7 is a kind of structural schematic diagram for light sensor that the embodiment of the present application three provides;
Fig. 8 is the structural schematic diagram for another light sensor that the embodiment of the present application three provides.
Specific embodiment
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application Attached drawing, technical solutions in the embodiments of the present application are explicitly described, it is clear that described embodiment is the application one The embodiment divided, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing Every other embodiment obtained under the premise of creative work out, shall fall within the protection scope of the present application.
The description and claims of this application and term " includes " and their any deformations in above-mentioned attached drawing, meaning Figure, which is to cover, non-exclusive includes.Such as process, method or system comprising a series of steps or units, product or equipment do not have It is defined in listed step or unit, but optionally further comprising the step of not listing or unit, or optionally also wrap Include the other step or units intrinsic for these process, methods, product or equipment.In addition, term " first ", " second " and " third " etc. is for distinguishing different objects, not for description particular order.
Embodiment one
The present embodiment provides a kind of color temperature compensating methods, are applied to electronic equipment, and electronic equipment includes color temperature sensor, screen Curtain and camera.
In the application, electronic equipment can be smart phone, tablet computer, the notebook electricity for having display and camera function Brain, personal digital assistant, Self-help camera, digital camera etc..Color temperature compensating method specifically can be by the processor of electronic equipment To execute.
As shown in Figure 1, color temperature compensating method provided in this embodiment includes:
Step S101, the rgb value of the color temperature sensor is obtained.
In the application, color temperature sensor is set to the front of electronic equipment, i.e., is set to the screen of electronic equipment same Face;When the screen of electronic equipment is OLED (Organic Light-Emitting Diode, Organic Electricity laser display) screen, Color temperature sensor can be set below screen, specifically can be set under the screen of OLED screen curtain below foam, color temperature sensor Foam region between OLED screen curtain offers through-hole, so that unobstructed between OLED screen curtain and color temperature sensor, environment light Line can be incident to color temperature sensor through OLED screen curtain, across through-hole.
In the application, rgb value refers to and R (Red, red) G (Green, green) B (Blue, blue) the corresponding R component of three primary colours, G Component and B component.
Step S102, the rgb value of the screen and the brightness degree of the screen are obtained.
In the application, the rgb value of screen and the brightness degree of screen refer to rgb value and brightness of the picture that screen is shown etc. Grade, specifically can by obtained for driving digital RGB data and the driving current of on-screen displays screen rgb value and Brightness degree.When blank screen, the rgb value and brightness degree of screen are 0.
Step S103, according to the rgb value of the color temperature sensor, the rgb value of the screen and brightness of the screen etc. Grade, determines the related colour temperature value of ambient light.
In the application, not only influenced by ambient light by the rgb value of color temperature sensor, also by on-screen displays when The influence of the light of sending, therefore, directly according to the rgb value of colour temperature calculation formula and color temperature sensor, calculated environment light The related colour temperature value of line is inaccurate, and needs to solve the light issued when on-screen displays to the rgb value of color temperature sensor The problem of interference.Therefore, it in the related colour temperature value for determining ambient light, needs the rgb value of color temperature sensor, screen simultaneously Rgb value and the brightness degree of screen take into account, to improve the accuracy of the related colour temperature value of calculated ambient light, from And improve the accuracy compensated to the color temperature value of camera.
Step S104, the color temperature value that the camera is compensated according to the related colour temperature value of the ambient light makes the camera Color temperature value and the ambient light related colour temperature value between deviation be less than preset color temperature threshold value.
In the application, preset color temperature threshold value can be configured according to actual needs, as long as allowing to carry out color temperature value supplement The color temperature value of camera later levels off to the related colour temperature value of ambient light, the tone and ambient light of the image for shooting camera Tone it is identical, i.e., camera shooting the tone of image and the tone of ambient light be cool tone or be warm tones.
In one embodiment, preset color temperature threshold value is 0.
The present embodiment obtains colour temperature sensing by the way that color temperature sensor is arranged in the electronic equipment for including screen and camera The brightness degree of the rgb value of device, the rgb value of screen and screen, according to the rgb value of color temperature sensor, the rgb value and screen of screen Brightness degree, determine the related colour temperature value of ambient light, then according to the related colour temperature value of ambient light compensate camera color Temperature value makes the deviation between the color temperature value of camera and the related colour temperature value of ambient light be less than preset color temperature threshold value, can make phase Machine keeps color balance, effectively improves the shooting effect of electronic equipment.
Embodiment two
As shown in Fig. 2, in the present embodiment, the step S103 in embodiment one includes:
Step S201, according to the rgb value of the screen, the brightness degree of the screen and default interference value calculation formula, Determine the screen to the interference value of the rgb value of the color temperature sensor.
In the application, the different rgb values and brightness degree when different pictures can be shown previously according to screen, obtain screen The interference value calculation formula of interference caused by rgb value to color temperature sensor, and save as default interference value calculation formula.No It interferes and is different caused by rgb value of the screen of same electronic equipment to its color temperature sensor, therefore, for every kind of electricity Before the color temperature value of the camera of sub- equipment compensates, the screen of every kind of electronic equipment should be individually determined to its color temperature sensor Rgb value caused by interfere interference value calculation formula.
In one embodiment, include: before step S201
Obtain at least n brightness degrees of the different rgb value and the screen of at least n group of the screen;Wherein, institute Every group of rgb value for stating screen corresponds to a brightness degree of the screen;
It is a to the screen at least different rgb value of n group, at least n of the screen according to polynomial of degree n fitting algorithm Brightness degree and preset reference brightness degree carry out polynomial of degree n the Fitting Calculation, obtain default interference value calculation formula;Its In, n >=1 and n are integer.
In the application, the numerical values recited of n can be configured according to actual needs, and the numerical value of n is bigger, preset interference value meter The item number for calculating formula is more, and the rgb value for the ambient light being calculated is more accurate.For example, as n=3, it can be according to 3 times Polynomial fitting shows 3 groups of rgb values, corresponding 3 brightness degrees and the preset reference brightness when different pictures to screen Grade carries out 3 order polynomial the Fitting Calculations, to obtain default interference value calculation formula.Preset reference brightness can be according to practical need It is configured, different size can be set by preset reference brightness for not quantic fitting algorithm, can also be directed to A corresponding preset reference brightness is arranged in each brightness degree.
In one embodiment, the rgb value includes R component corresponding with RGB three primary colours, G component and B component, described Interference value includes R component interference value, G component interference value and B component interference value;
The expression formula of the default interference value calculation formula is as follows:
Wherein, Δ R expression R component interference value, Δ G expression G component interference value, Δ B expression B component interference value, a0, a1, A2 ..., an be constant, b0, b1, b2 ..., bn be constant, c0, c1, c2 ..., cn be constant, r indicates the screen R component, g indicates that the G component of the screen, b indicate that the B component of the screen, level indicate the brightness etc. of the screen Grade, level_ref indicate that preset reference brightness degree, n >=1 and n are integer.
In the application, constant a0, a1, a2 ..., an, b0, b1, b2 ..., bn and c0, c1, c2 ..., cn, be according to n Order polynomial fitting algorithm, it is bright to the screen at least different rgb value of n group, at least n brightness degrees of screen and preset reference Degree grade carries out what polynomial of degree n the Fitting Calculation obtained;
When the n=1, the expression formula of the default interference value calculation formula is as follows:
When the n=2, the expression formula of the default interference value calculation formula is as follows:
When the n=3, the expression formula of the default interference value calculation formula is as follows:
When the n=4, the expression formula of the default interference value calculation formula is as follows:
The rest may be inferred, it is seen that the size of n is directly proportional to the item number of default interference value calculation formula.
In one embodiment, the n=3.
As shown in figure 3, illustratively showing the brightness of screen and the relation curve of interference value.
As shown in figure 4, illustratively showing the color depth of screen and the gamma2.2 relation curve of interference value.
Step S202, according to the rgb value of the color temperature sensor and the interference value, the rgb value of ambient light is determined.
In the application, it is determined that after screen is to the interference value of the rgb value of the color temperature sensor, can be passed according to colour temperature The rgb value of sensor and the difference of interference value, determine the rgb value of ambient light.
In one embodiment, the calculation formula of step S202 is as follows:
Wherein, R indicates the R component of the ambient light, and G indicates that the G component of the ambient light, B indicate the environment The B component of light, R1 indicate the R component of the color temperature sensor, and G1 indicates that the G component of the color temperature sensor, B1 indicate institute State the B component of color temperature sensor.
Step S203, according to the rgb value of the ambient light and colour temperature calculation formula, the colour temperature of the ambient light is determined Value.
In the application, it is calculated by rgb value of the colour temperature calculation formula to ambient light, can be obtained and eliminate screen The color temperature value of ambient light after the interference of the picture of display.
In one embodiment, step S203 includes:
According to the rgb value of the ambient light, the tristimulus values of the ambient light is determined;
According to the tristimulus values of the ambient light, the chromaticity coordinates of the ambient light is determined;
According to the chromaticity coordinates of the ambient light and colour temperature calculation formula, the color temperature value of the ambient light is determined.
It in the application, can be according to based on CIE (Commission Internationale de L'Eclairage, state Border illuminate the committee) 1931 standards CIE colorimetric functions calculation formula, the rgb value of ambient light is converted into tristimulus Value, and then chromaticity coordinates is calculated.
In one embodiment, according to the rgb value of the ambient light, the meter of the tristimulus values of the ambient light is determined It is as follows to calculate formula:
Wherein, X, Y, Z indicate the tristimulus values of the ambient light, and R indicates the R component of the ambient light, and G indicates institute The G component of ambient light is stated, B indicates the B component of the ambient light.
In one embodiment, according to the tristimulus values of the ambient light, the chromaticity coordinates of the ambient light is determined Calculation formula is as follows:
Wherein, x, y, z indicates the chromaticity coordinates of the ambient light.
In one embodiment, according to the chromaticity coordinates of the ambient light and colour temperature calculation formula, the environment light is determined The calculation formula of the color temperature value of line is as follows:
T=(x-0.3320)/(0.1858-y);
Wherein, T indicates the color temperature value of the ambient light.
Step S204, according to the color temperature value of the ambient light, the related colour temperature value of the ambient light is determined.
In the application, by the photochromic temperature with black matrix (such as platinum) radiation at the consistent a certain temperature of the form and aspect of ambient light Degree is expressed as the colour temperature of ambient light, i.e. correlated colour temperature (Correlated Color Temperature, CCT).
In one embodiment, according to the color temperature value of the ambient light, the related colour temperature value of the ambient light is determined Calculation formula it is as follows:
CCT=437 × T3+3601×T2+6831×T+5517;
Wherein, CCT indicates the related colour temperature value of the ambient light.
The present embodiment is by determining screen according to the rgb value of screen, the brightness degree of screen and default interference value calculation formula Interference value of the curtain to the rgb value of color temperature sensor;According to the rgb value and interference value of color temperature sensor, the RGB of ambient light is determined Value;According to the rgb value of ambient light and colour temperature calculation formula, the color temperature value of ambient light is determined;According to the colour temperature of ambient light Value, determines the related colour temperature value of ambient light, can eliminate screen exit rays to interference caused by color temperature sensor, to obtain The related colour temperature value of accurate ambient light.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present application constitutes any limit It is fixed.
Embodiment three
As shown in figure 5, the present embodiment provides a kind of electronic equipment 100, including memory 10, processor 20 and it is stored in It further include the color temperature sensor being connect with processor electricity 20 in reservoir 10 and the computer program 11 that can run on processor 20 30, screen 40 and camera 50, processor 20 realize that the colour temperature in embodiment one or embodiment two is mended when executing computer program 11 The step of compensation method.
In the application, electronic equipment can be smart phone, tablet computer, the notebook electricity for having display and camera function Brain, personal digital assistant, Self-help camera, digital camera etc..Electronic equipment may include, but be not limited only to, memory, processing Device, color temperature sensor, screen and camera.It will be understood by those skilled in the art that Fig. 5 is only the example of electronic equipment 100, and The restriction to electronic equipment 100 is not constituted, may include components more more or fewer than diagram, or combine certain components, or The different component of person, such as electronic equipment can also include input-output equipment, network access equipment, bus etc..
In the application, memory can be the internal storage unit of electronic equipment, such as the hard disk or memory of electronic equipment. Memory can also be with the External memory equipment of electronic equipment, for example, the plug-in type hard disk being equipped on electronic equipment, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Into One step, memory can also both internal storage units including electronic equipment or including External memory equipment.Memory is used for Other programs and data needed for storing computer program and electronic equipment.Memory can be also used for temporarily storing Output or the data that will be exported.
In the application, computer program can be divided into one or more module/units, and one or more module/ Unit is stored in memory, and is executed by processor, to realize color temperature compensating method.One or more module/units can To be the series of computation machine program instruction section that can complete specific function, the instruction segment is for describing computer program in electronics Implementation procedure in equipment.For example, computer program can be divided into the first acquisition module, the second acquisition module, determine mould Block and compensating module, each module concrete function are as follows:
First obtains module, for obtaining the rgb value of the color temperature sensor;
Second obtains module, for obtaining the rgb value of the screen and the brightness degree of the screen;
Determining module, for according to the bright of the rgb value of the color temperature sensor, the rgb value of the screen and the screen Grade is spent, determines the related colour temperature value of ambient light;
Compensating module makes described for compensating the color temperature value of the camera according to the related colour temperature value of the ambient light Deviation between the color temperature value of camera and the related colour temperature value of the ambient light is less than preset color temperature threshold value.
In one embodiment, the computer program can also be divided into third acquisition module and computing module, respectively Module concrete function is as follows:
Third obtains module, and at least n of at least n group for obtaining the screen different rgb value and the screen Brightness degree;Wherein, every group of rgb value of the screen corresponds to a brightness degree of the screen;
Computing module, for according to polynomial of degree n fitting algorithm, to the screen at least different rgb value of n group, described At least n brightness degrees and preset reference brightness degree of screen carry out polynomial of degree n the Fitting Calculation, obtain default interference value Calculation formula;Wherein, n >=1 and n are integer.
In one embodiment, the computer program can also be divided into the first determination unit, the second determination unit, Third determination unit and the 4th determination unit, the concrete function of each unit are as follows:
First determination unit, based on according to the rgb value of the screen, the brightness degree of the screen and default interference value Formula is calculated, determines the screen to the interference value of the rgb value of the color temperature sensor;
Second determination unit determines ambient light for the rgb value and the interference value according to the color temperature sensor Rgb value;
Third determination unit determines the environment light for the rgb value and colour temperature calculation formula according to the ambient light The color temperature value of line;
4th determination unit determines the correlated colour temperature of the ambient light for the color temperature value according to the ambient light Value.
In the application, processor can be central processing unit (Central Processing Unit, CPU), can be with It is other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
In the application, screen can be set according to actual needs as based on LCD (Liquid Crystal Display, liquid Crystal device) liquid crystal display of technology, the Organic Electricity laser display screen based on OLED technology, it is based on QLED (Quantum Dot Light Emitting Diodes, light emitting diode with quantum dots) technology light emitting diode with quantum dots display screen or curved surface Display screen etc..
In one embodiment, the screen is OLED screen curtain, and the color temperature sensor is set to the OLED screen curtain Lower section;
Ambient light is incident to the color temperature sensor through the OLED screen curtain.
In the application, color temperature sensor is set to the front of electronic equipment, i.e., is set to the screen of electronic equipment same Face;When the screen of electronic equipment is OLED (Organic Light-Emitting Diode, Organic Electricity laser display) screen, Color temperature sensor can be set below screen, and the lower section of the foam under the screen of OLED screen curtain, colour temperature sensing specifically can be set Foam region between device and OLED screen curtain offers through-hole, so that unobstructed between OLED screen curtain and color temperature sensor, environment Light can be incident to color temperature sensor through OLED screen curtain, across through-hole.
As shown in fig. 6, illustratively show screen 40 be OLED screen curtain when, electronic equipment 100 further includes shielding lower foam 60, the foam region between color temperature sensor 30 and screen 40 offers through-hole 61.
As shown in Fig. 7 or Fig. 8, in one embodiment, color temperature sensor 30 is the light sensor of electronic equipment 100, I.e. the color temperature sensor of electronic equipment 100 and light sensor are shared, and without additional setting color temperature sensor, light is passed Sensor is used as color temperature sensor, and light sensor has light level and colour temperature sensing function.By the way that light is passed Sensor is used as color temperature sensor, can effectively be saved cost and the space of electronic equipment, be accomplished electronic equipment more Add lightening.
As shown in fig. 7, light sensor 30 includes the first analog-digital converter 31, the second analog-digital converter 32, third modulus Converter 33, the 4th analog-digital converter 34, infrared channel photodiode D1 and the channel R corresponding with RGB three primary colours photoelectricity The channel diode D2, G photodiode D3 and channel B photodiode D4;
First analog-digital converter 31 is electrically connected with infrared channel photodiode D1 and processor 20;
Second analog-digital converter 32 is electrically connected with the channel R photodiode D2 and processor 20;
Third analog-digital converter 33 is electrically connected with the channel G photodiode D3 and processor 20;
4th analog-digital converter 34 is electrically connected with channel B photodiode D4 and processor 20.
In the application, the first~the 4th analog-digital converter can select the modulus of suitable sampling precision to turn according to actual needs Parallel operation, infrared channel photodiode, the channel R photodiode, the channel G photodiode D3 and channel B photodiode can To select the photodiode with corresponding light filtering function according to actual needs, the quantity of every kind of photodiode can not Only one, and all photodiodes can be regularly arranged into array format.The light in general photodiode can be passed through The optical filter or plating setting tool of plane of incidence setting corresponding types have the film of corresponding filtering functions to obtain with light filtering function Photodiode.For example, respectively in infrared channel photodiode, the channel R photodiode, the channel G photodiode D3 And the plane of light incidence plating of channel B photodiode sets infrared light filter coating, feux rouges filter coating, green light filter coating and blue light and filters Film, it should be understood that infrared light filter coating refers to the filter coating that can be penetrated infrared light, filter out other light, feux rouges filter coating Refer to the filter coating that can be penetrated feux rouges, filter out other light, green light filter coating, which refers to, can penetrate green light, filter out other light Filter coating, blue light filter coating refer to can through blue light, filter out the filter coatings of other light.
As shown in figure 8, light sensor 30 includes the first analog-digital converter 31, the second analog-digital converter 32, third modulus Converter 33, infrared channel photodiode D1, switching switch 35, the first photodiode D2, the second photodiode D3 and Third photodiode D4;
Second analog-digital converter 32 is electrically connected with the second photodiode D3 and processor 20;
Third analog-digital converter 33 is electrically connected with third photodiode D4 and processor 20;
Switch switch 35 and processor 20, third analog-digital converter 33, infrared channel photodiode D1 and the first photoelectricity Diode D2 electrical connection, the first analog-digital converter 31 are also electrically connected with processor 20;
Processor 20 is used for when receiving color temperature compensating instruction, and control switching switch 35 connects third analog-digital converter 33 And the first electrical connection between photodiode D2;
Wherein, the first photodiode D2, the second photodiode D3 and third photodiode D4 it is different and point Not Wei in the channel R corresponding with RGB three primary colours photodiode, the channel G photodiode and channel B photodiode one It is a.
In the application, switching switch can be set according to actual needs as analog switch chip or circuit, for example, hilted broadsword is double Throw analog switch or transistor (for example, triode or field-effect tube).
Switching switch 35 is illustratively shown for single pole double throw analog switch in Fig. 8.
In the application, color temperature compensating instruction can be automatically transmitted to switch when camera starts camera function by processor Switch, can also be after camera starts camera function, and user passes through any feasible man-machine interaction mode, triggers electronic equipment When color temperature compensating function, then switching is sent to by processor and is switched.
As shown in Figure 7 and Figure 8, light sensor 30 further includes interface circuit 36, and interface circuit 36 is for being connected electrically in place It manages between device 20 and the first analog-digital converter 31, the second analog-digital converter 32 and third analog-digital converter 33, it is corresponding to provide Interface is realized between processor 20 and the first analog-digital converter 31, the second analog-digital converter 32 and third analog-digital converter 33 Communication.Interface circuit can provide I2C interface, terminal interface, numerical data input/output interface etc..
As shown in Figure 7 and Figure 8, illustratively show light sensor 30 include power pins VCC, grounding pin GND, Data pin SDA, clock pins SCL, interrupt pin INT, address pin ADDR and test pin TEST.
The present embodiment is by providing a kind of electronic equipment including screen, camera and color temperature sensor, by obtaining colour temperature The brightness degree of the rgb value of sensor, the rgb value of screen and screen, according to the rgb value of color temperature sensor, screen rgb value and The brightness degree of screen determines the related colour temperature value of ambient light, then compensates camera according to the related colour temperature value of ambient light Color temperature value, so that deviation between the color temperature value of camera and the related colour temperature value of ambient light is less than preset color temperature threshold value, can be with So that camera is kept color balance, effectively improves shooting effect.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed Scope of the present application.
In embodiment provided herein, it should be understood that disclosed device/terminal device and method, it can be with It realizes by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute The division of module or unit is stated, only a kind of logical function partition, there may be another division manner in actual implementation, such as Multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed.Separately A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, device Or the INDIRECT COUPLING or communication connection of unit, it can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or In use, can store in a computer readable storage medium.Based on this understanding, the application realizes above-mentioned implementation All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program generation Code can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium It may include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic that can carry the computer program code Dish, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that described The content that computer-readable medium includes can carry out increasing appropriate according to the requirement made laws in jurisdiction with patent practice Subtract, such as does not include electric carrier signal and electricity according to legislation and patent practice, computer-readable medium in certain jurisdictions Believe signal.
Embodiment described above is only to illustrate the technical solution of the application, rather than its limitations;Although referring to aforementioned reality Example is applied the application is described in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope of each embodiment technical solution of the application that it does not separate the essence of the corresponding technical solution should all Comprising within the scope of protection of this application.

Claims (10)

1. a kind of color temperature compensating method, which is characterized in that be applied to electronic equipment, the electronic equipment include color temperature sensor, Screen and camera, the color temperature compensating method include:
Obtain the rgb value of the color temperature sensor;
Obtain the rgb value of the screen and the brightness degree of the screen;
According to the brightness degree of the rgb value of the color temperature sensor, the rgb value of the screen and the screen, environment light is determined The related colour temperature value of line;
The color temperature value that the camera is compensated according to the related colour temperature value of the ambient light, make the color temperature value of the camera with it is described Deviation between the related colour temperature value of ambient light is less than preset color temperature threshold value.
2. color temperature compensating method as described in claim 1, which is characterized in that according to the rgb value of the color temperature sensor, described The brightness degree of the rgb value of screen and the screen determines the related colour temperature value of ambient light, comprising:
According to the rgb value of the screen, the brightness degree of the screen and default interference value calculation formula, the screen pair is determined The interference value of the rgb value of the color temperature sensor;
According to the rgb value of the color temperature sensor and the interference value, the rgb value of ambient light is determined;
According to the rgb value of the ambient light and colour temperature calculation formula, the color temperature value of the ambient light is determined;
According to the color temperature value of the ambient light, the related colour temperature value of the ambient light is determined.
3. color temperature compensating method as claimed in claim 2, which is characterized in that according to the rgb value of the color temperature sensor, described The brightness degree of the rgb value of screen and the screen, before the related colour temperature value for determining ambient light, comprising:
Obtain at least n brightness degrees of the different rgb value and the screen of at least n group of the screen;Wherein, the screen Every group of rgb value of curtain corresponds to a brightness degree of the screen;
According to polynomial of degree n fitting algorithm, to the screen at least different rgb value of n group, at least n of the screen bright It spends grade and preset reference brightness degree carries out polynomial of degree n the Fitting Calculation, obtain default interference value calculation formula;Wherein, n >= 1 and n is integer.
4. color temperature compensating method as claimed in claim 2 or claim 3, which is characterized in that the rgb value includes and RGB three primary colours pair R component, G component and the B component answered, the interference value include R component interference value, G component interference value and B component interference value;
The expression formula of the default interference value calculation formula is as follows:
Wherein, Δ R expression R component interference value, Δ G expression G component interference value, Δ B expression B component interference value, a0, a1, A2 ..., an be constant, b0, b1, b2 ..., bn be constant, c0, c1, c2 ..., cn be constant, r indicates the screen R component, g indicates that the G component of the screen, b indicate that the B component of the screen, level indicate the brightness etc. of the screen Grade, level_ref indicate that preset reference brightness degree, n >=1 and n are integer.
5. color temperature compensating method as claimed in claim 4, which is characterized in that according to the rgb value of the color temperature sensor and institute Interference value is stated, determines that the calculation formula of the rgb value of ambient light is as follows:
Wherein, R indicates the R component of the ambient light, and G indicates that the G component of the ambient light, B indicate the ambient light B component, R1 indicates the R component of the color temperature sensor, and G1 indicates that the G component of the color temperature sensor, B1 indicate the color The B component of temperature sensor.
6. color temperature compensating method as claimed in claim 4, which is characterized in that the n=3;
The expression formula of the default interference value calculation formula is as follows:
7. a kind of electronic equipment, including memory, processor and storage can transport in the memory and on the processor Capable computer program, which is characterized in that further include the color temperature sensor being electrically connected with the processor, screen and camera, institute It states when processor executes the computer program and realizes as described in any one of claim 1 to 6 the step of color temperature compensating method.
8. electronic equipment as claimed in claim 7, which is characterized in that the screen is OLED screen curtain, the color temperature sensor It is set to the lower section of the OLED screen curtain;
Ambient light is incident to the color temperature sensor through the OLED screen curtain.
9. electronic equipment as claimed in claim 7 or 8, which is characterized in that the color temperature sensor is the electronic equipment Light sensor;
The light sensor includes the first analog-digital converter, the second analog-digital converter, third analog-digital converter, the 4th modulus turn Parallel operation, infrared channel photodiode and the channel R corresponding with RGB three primary colours photodiode, the channel G photodiode and Channel B photodiode;
First analog-digital converter is electrically connected with the infrared channel photodiode and the processor;
Second analog-digital converter is electrically connected with the channel R photodiode and the processor;
The third analog-digital converter is electrically connected with the channel G photodiode and the processor;
4th analog-digital converter is electrically connected with the channel B photodiode and the processor;
Alternatively, the light sensor include the first analog-digital converter, it is the second analog-digital converter, third analog-digital converter, infrared Channel photodiode, switching switch, the first photodiode, the second photodiode and third photodiode;
Second analog-digital converter is electrically connected with second photodiode and the processor;
The third analog-digital converter is electrically connected with the third photodiode and the processor;
Switching switch and the processor, the third analog-digital converter, the infrared channel photodiode and described The electrical connection of first photodiode, first analog-digital converter are also electrically connected with the processor;
The processor is used to control third analog-to-digital conversion described in the switching switch connection when receiving color temperature compensating instruction Electrical connection between device and first photodiode;
Wherein, first photodiode, the second photodiode and third photodiode it is different and be respectively with One in the corresponding channel the R photodiode of RGB three primary colours, the channel G photodiode and channel B photodiode.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In the step of realization color temperature compensating method as described in any one of claim 1 to 6 when the computer program is executed by processor Suddenly.
CN201910451847.4A 2019-05-28 2019-05-28 Color temperature compensation method, electronic device, and computer-readable storage medium Active CN110139088B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910451847.4A CN110139088B (en) 2019-05-28 2019-05-28 Color temperature compensation method, electronic device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910451847.4A CN110139088B (en) 2019-05-28 2019-05-28 Color temperature compensation method, electronic device, and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN110139088A true CN110139088A (en) 2019-08-16
CN110139088B CN110139088B (en) 2021-03-02

Family

ID=67582318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910451847.4A Active CN110139088B (en) 2019-05-28 2019-05-28 Color temperature compensation method, electronic device, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN110139088B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110730262A (en) * 2019-10-30 2020-01-24 北京字节跳动网络技术有限公司 Environment brightness value detection method and device and electronic equipment
CN111918047A (en) * 2020-07-27 2020-11-10 Oppo广东移动通信有限公司 Photographing control method and device, storage medium and electronic equipment
CN111964778A (en) * 2020-08-21 2020-11-20 深圳市汇顶科技股份有限公司 Under-screen environment optical sensor and terminal equipment
CN112082644A (en) * 2020-09-14 2020-12-15 深圳市汇顶科技股份有限公司 Under-screen environment optical sensor and terminal equipment
CN112735352A (en) * 2020-12-31 2021-04-30 Oppo广东移动通信有限公司 Color temperature self-adaptive adjusting method, device, equipment and medium for display equipment
CN113194303A (en) * 2021-06-29 2021-07-30 深圳小米通讯技术有限公司 Image white balance method, device, electronic equipment and computer readable storage medium
CN114205569A (en) * 2021-12-10 2022-03-18 峰米(北京)科技有限公司 Color temperature compensation method and device for projection equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103338383A (en) * 2013-06-25 2013-10-02 深圳市中兴移动通信有限公司 White balance calibrating method and device
TW201432646A (en) * 2013-02-08 2014-08-16 Hung-Ta Liu Display apparatus and method of adjusting color temperature thereof
CN105208364A (en) * 2014-06-27 2015-12-30 联想(北京)有限公司 Image white balance control method, device and electronic apparatus
CN105208360A (en) * 2015-09-23 2015-12-30 青岛海信移动通信技术股份有限公司 Image preview method and device of intelligent terminal and terminal
CN106097953A (en) * 2016-06-29 2016-11-09 广东欧珀移动通信有限公司 Control method and control device
CN107221305A (en) * 2017-06-19 2017-09-29 广东欧珀移动通信有限公司 Color temperature adjusting method, device and its equipment based on screen intensity

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201432646A (en) * 2013-02-08 2014-08-16 Hung-Ta Liu Display apparatus and method of adjusting color temperature thereof
CN103338383A (en) * 2013-06-25 2013-10-02 深圳市中兴移动通信有限公司 White balance calibrating method and device
CN105208364A (en) * 2014-06-27 2015-12-30 联想(北京)有限公司 Image white balance control method, device and electronic apparatus
CN105208360A (en) * 2015-09-23 2015-12-30 青岛海信移动通信技术股份有限公司 Image preview method and device of intelligent terminal and terminal
CN106097953A (en) * 2016-06-29 2016-11-09 广东欧珀移动通信有限公司 Control method and control device
CN107221305A (en) * 2017-06-19 2017-09-29 广东欧珀移动通信有限公司 Color temperature adjusting method, device and its equipment based on screen intensity

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110730262A (en) * 2019-10-30 2020-01-24 北京字节跳动网络技术有限公司 Environment brightness value detection method and device and electronic equipment
CN111918047A (en) * 2020-07-27 2020-11-10 Oppo广东移动通信有限公司 Photographing control method and device, storage medium and electronic equipment
CN111964778A (en) * 2020-08-21 2020-11-20 深圳市汇顶科技股份有限公司 Under-screen environment optical sensor and terminal equipment
CN112082644A (en) * 2020-09-14 2020-12-15 深圳市汇顶科技股份有限公司 Under-screen environment optical sensor and terminal equipment
CN112735352A (en) * 2020-12-31 2021-04-30 Oppo广东移动通信有限公司 Color temperature self-adaptive adjusting method, device, equipment and medium for display equipment
CN113194303A (en) * 2021-06-29 2021-07-30 深圳小米通讯技术有限公司 Image white balance method, device, electronic equipment and computer readable storage medium
CN114205569A (en) * 2021-12-10 2022-03-18 峰米(北京)科技有限公司 Color temperature compensation method and device for projection equipment
CN114205569B (en) * 2021-12-10 2023-07-07 峰米(北京)科技有限公司 Color temperature compensation method and device for projection equipment

Also Published As

Publication number Publication date
CN110139088B (en) 2021-03-02

Similar Documents

Publication Publication Date Title
CN110139088A (en) Color temperature compensating method, electronic equipment and computer readable storage medium
CN103080999B (en) For having the self-adaptation color correction of the indicating meter of backlight modulation
WO2019013527A1 (en) Image sensor including light-shielding member for blocking interference between plurality of light-receiving sensors and electronic device including the same
CN107346653B (en) GAMMA curve adjusting method and device based on deep learning
US20120092541A1 (en) Method and apparatus for ambient light measurement system
CN107079083A (en) A kind of photographic method, camera arrangement and terminal
US10497297B2 (en) Electronic device with ambient-adaptive display
CN103765503A (en) Fast calibration of displays using spectral-based colorimetrically calibrated multicolor camera
CN107945770A (en) Ambient light intensity detection method, device, storage medium and electronic equipment
CN103869973A (en) Sensing device and sensing method
EP3121806A1 (en) Electronic device
TW200833128A (en) Method for performing chromatic adaptation while displaying image, and corresponding display circuit and device
US11448554B2 (en) Method and device for estimating ambient light
CN102025901A (en) Camera module and detection method thereof
CN107941330A (en) Ambient light intensity detection method, device, storage medium and electronic equipment
CN107945754A (en) Adjusting method, electronic equipment and the computer-readable recording medium of screen intensity
CN112073703A (en) Method and device for adjusting color correction matrix, terminal equipment and medium
CN108196719A (en) A kind of display screen component, display screen frame color control method and mobile terminal
CN113223466B (en) Display screen brightness correction method and device and electronic equipment
CN108230407A (en) A kind for the treatment of method and apparatus of image
CN112017577B (en) Screen display calibration method and device
CN103512655A (en) Information processing apparatus and method, and photoelectric conversion apparatus
JP2009053064A (en) Color meter
CN111083256A (en) Display screen assembly and electronic device
US10649713B1 (en) Calibrating multiple displays of a computing device to have a similar perceived appearance

Legal Events

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