CN107566695A - A kind of light compensation method and mobile terminal - Google Patents
A kind of light compensation method and mobile terminal Download PDFInfo
- Publication number
- CN107566695A CN107566695A CN201710693895.5A CN201710693895A CN107566695A CN 107566695 A CN107566695 A CN 107566695A CN 201710693895 A CN201710693895 A CN 201710693895A CN 107566695 A CN107566695 A CN 107566695A
- Authority
- CN
- China
- Prior art keywords
- light filling
- target area
- brightness
- intensity
- region
- 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
Links
Landscapes
- Studio Devices (AREA)
Abstract
The invention discloses a kind of light compensation method, perform in the terminal, including:Mobile terminal screen is divided into imaging region and light filling region, imaging region is located at the center of screen, and light filling region is located at the boundary of screen, and including at least two light filling units;Target area in recognition imaging region, target area are human face region or portrait area;Target area brightness and background area brightness are calculated, wherein, background area is the region in addition to target area in imaging region;When the difference of target area brightness and background area brightness is more than first threshold, the property value of each pixel is to realize light filling in adjustment light filling unit.The present invention discloses corresponding mobile terminal in the lump.Technique according to the invention scheme, it is possible to achieve balanced light filling, make it that the brightness of whole picture is more uniform while brightness of image is improved, improve image quality.
Description
Technical field
Taken pictures ancillary technique field, more particularly to a kind of light compensation method and mobile terminal the present invention relates to mobile terminal.
Background technology
In actual life, people carry out self-timer commonly using mobile terminal.The tone of photo caused by self-timer generally with
Ambient light when taking pictures is consistent, has a strong impact on self-timer effect sometimes.For example, in the situation of the insufficient light such as cloudy day or night
Under, the photo taken is often more gloomy, and image quality is relatively low.
Some light compensation methods in the prior art be present, such as open flash lamp, open light compensating lamp, by mobile terminal screen
Brightness is adjusted to highest, solid background, etc. is superimposed on screen.But flash lighting is only applicable to image after using
The situation that head is taken pictures, the situation of self-timer can not be applied to (self-timer uses front camera);Light compensating lamp, the side for heightening screen intensity
Case can produce strong light, cause human eye uncomfortable, and pupil shrinks rapidly, and eyes can be closed or frowned to conditioned reflex, and shoot what is come
Portrait is unnatural, slice Quality Down;And the scheme of solid background is superimposed, the light of screen centre position transmitting can be than screen side
Strong along the light of transmitting, so as to cause the light that shooting supplements uneven, image quality is bad.
The content of the invention
Therefore, the present invention provides a kind of light compensation method and mobile terminal, exist above to solve the problems, such as or at least alleviate.
According to an aspect of the present invention, there is provided a kind of light compensation method, perform in the terminal, including:Will be mobile whole
End screen is divided into imaging region and light filling region, and imaging region is located at the center of screen, and light filling region is located at the side of screen
At boundary, and including at least two light filling units;Target area in recognition imaging region, target area are human face region or portrait
Region;Target area brightness and background area brightness are calculated, target area brightness is the flat of the brightness of each pixel in target area
Average, background area brightness are the average value of the brightness of each pixel in background area, wherein, background area is to be removed in imaging region
Region outside target area;When the difference of target area brightness and background area brightness is more than first threshold, adjustment is mended
The property value of each pixel is to realize light filling in light unit.
Alternatively, in the light compensation method according to the present invention, above-mentioned at least two light filling unit is arranged to relative to shifting
The axis of dynamic terminal screen is symmetrical.
Alternatively, in the light compensation method according to the present invention, the brightness of above-mentioned pixel is to be calculated according to the rgb value of pixel
The gray value gone out.
Alternatively, in the light compensation method according to the present invention, the property value for adjusting each pixel in light filling unit is mended with realizing
The step of light includes:Determine that maximum light filling intensity and minimum light filling are strong according to the difference of target area brightness and background area brightness
Degree, wherein, each light filling intensity corresponds to one group of property value;Calculate respectively each light filling unit to target area away from
From;The property value of each pixel in farthest light filling unit is arranged to the property value corresponding to maximum light filling intensity, farthest light filling list
Member is the farthest light filling unit in distance objective region;It is strong that the property value of each pixel in nearest light filling unit is arranged to minimum light filling
The corresponding property value of degree, nearest light filling unit are the nearest light filling unit in distance objective region;Will be each in other light filling units
The property value of pixel is arranged between the property value corresponding to the property value corresponding to minimum light filling intensity to maximum light filling intensity
Numerical value, other light filling units are light filling unit in addition to farthest light filling unit and nearest light filling unit in light filling region.
Alternatively, in the light compensation method according to the present invention, maximum light filling intensity is 1, and minimum light filling intensity is according to formula
Min (max (0, (G1-G2)/M), 1) determines, wherein, G1 is target area brightness, and G2 is background area brightness, and M is target
Regional luminance and the maximum difference of background area brightness, max () expressions take maximum, and min () represents to take minimum value.
Alternatively, in the light compensation method according to the present invention, attribute includes transparency and rgb value;One light filling intensity institute
Corresponding one group of property value is:Transparency=light filling intensity * 100%;R values=R default value * light filling intensity;G values=G default values *
Light filling intensity;B values=B default value * light filling intensity;Wherein, R default values, G default values, B default values are default constant.
Alternatively, in the light compensation method according to the present invention, the distance of light filling unit to target area is light filling unit
Distance of the central point to the central point of target area.
Alternatively, in the light compensation method according to the present invention, the distance of light filling unit to target area is light filling unit
Minimum value of the central point to the distance at any point on target area boundaries.
Alternatively, in the light compensation method according to the present invention, the property value of each pixel in other light filling units is arranged to
The step of numerical value between the property value corresponding to property value to maximum light filling intensity corresponding to minimum light filling intensity, includes:It is right
In any one other light filling unit:According to other light filling units other light filling units are determined to the distance of target area
Light filling intensity;The property value of each pixel in other light filling units is arranged to the property value corresponding to above-mentioned light filling intensity.
Alternatively, in the light compensation method according to the present invention, the light filling intensity of other light filling units is true according to below equation
It is fixed:
Wherein, bg represents the light filling intensity of other light filling units, and bgmax is maximum light filling intensity, and bgmin is minimum light filling
Intensity, dmax are distance of the farthest light filling unit to target area, and dmin is nearest light filling unit to the distance of target area, d
For the distance of other light filling units to target area.
According to an aspect of the present invention, there is provided a kind of mobile terminal, including:At least one processor;Be stored with journey
The memory of sequence instruction, wherein, programmed instruction is configured as being suitable to be included by above-mentioned at least one computing device, programmed instruction
For performing the instruction of light compensation method as described above.
According to an aspect of the present invention, there is provided a kind of readable storage medium storing program for executing for the instruction that has program stored therein, when the program refers to
When order is read by the mobile terminal and performed so that the mobile terminal performs light compensation method as described above.
Technique according to the invention scheme, when user opens front camera, screen is divided into imaging region and benefit
Light region two parts.Imaging region is located at the center of screen, for live preview self-timer image;Light filling region is located at screen
Boundary, light filling region include at least two light filling units, for realizing light filling, increase brightness of image.In user's self-timer,
Face in automatic identification imaging region, by calculating simultaneously comparison object regional luminance and background area brightness, adjust light filling list
The property value of each pixel is to realize light filling in member.The present invention separates light filling region and imaging region, and light filling region is only arranged at
The boundary of screen, and light filling intensity adjusts in real time according to the imaging contexts of preview, can avoid causing not eyes of user
Brightness of image is improved on the premise of suitable, and the image of preview is consistent with finally shooting the image come in imaging region, finding is
Gained, so as to facilitate user to take satisfied photo.
Specifically, light filling unit of the invention is preferably set to symmetrical relative to the axis of mobile terminal screen,
For example, being symmetrically arranged a number of light filling unit at left and right sides of screen, or one is symmetrically arranged in the surrounding of screen
Light filling unit of fixed number amount, etc., so as to realize balanced light filling, avoid occurring after light filling image side is too bright, side too
Dark situation, improves image quality.
In addition, technical scheme is more than first threshold in the difference of target area brightness and background area brightness
When, light filling is carried out, difference is bigger, and light filling intensity is bigger.Meanwhile the light filling intensity of different light filling units is also not quite similar, away from
The light filling intensity of the light filling unit more remote from target area is bigger, and the light filling intensity of the nearer light filling unit in distance objective region is more
It is small.So, the light filling of varying strength can be adaptively carried out to target area and background area, is improving the same of brightness of image
When make it that the brightness of whole picture is more uniform, improve image quality.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention,
And can be practiced according to the content of specification, and in order to allow above and other objects of the present invention, feature and advantage can
Become apparent, below especially exemplified by the embodiment of the present invention.
Brief description of the drawings
In order to realize above-mentioned and related purpose, some illustrative sides are described herein in conjunction with following description and accompanying drawing
Face, these aspects indicate the various modes that can put into practice principles disclosed herein, and all aspects and its equivalent aspect
It is intended to fall under in the range of theme claimed.Read following detailed description in conjunction with the accompanying drawings, the disclosure it is above-mentioned
And other purposes, feature and advantage will be apparent.Throughout the disclosure, identical reference generally refers to identical
Part or element.
Fig. 1 shows the schematic diagram of mobile terminal 100 according to an embodiment of the invention;
Fig. 2 shows the flow chart of light compensation method 200 according to an embodiment of the invention;And
Fig. 3 shows the schematic diagram of the region division of mobile terminal screen 300 according to an embodiment of the invention.
Embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although the disclosure is shown in accompanying drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
Limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
Completely it is communicated to those skilled in the art.
Fig. 1 shows the structure chart of mobile terminal 100 according to an embodiment of the invention.Mobile terminal 100 can be
It is configured with mobile phone, tablet personal computer, notebook computer, multimedia player, the wearable device of front camera and display screen
Deng, but not limited to this.As shown in figure 1, mobile terminal 100 can include memory interface 102, polycaryon processor 104, and outside
Enclose interface 106.
Memory interface 102, polycaryon processor 104 and/or peripheral interface 106 both can be discrete components, can also collect
Into in one or more integrated circuits.In the mobile terminal 100, various elements can by one or more communication bus or
Signal wire couples.Sensor, equipment and subsystem may be coupled to peripheral interface 106, to help to realize multiple functions.
For example, acceleration transducer 110, magnetic field sensor 112 and gravity sensor 114 may be coupled to peripheral interface
106, acceleration transducer 110 can gather the acceleration information on three change in coordinate axis direction of fuselage coordinates system, and magnetic field passes
Sensor 112 can gather the magnetic field data (magnetic induction intensity) on three change in coordinate axis direction of fuselage coordinates system, gravity sensitive
Device 114 can gather the gravimetric data in three reference axis of fuselage coordinates system, above sensor can conveniently realize meter step,
The functions such as orientation, horizontal/vertical screen intelligence switching.Other sensors 116 can equally be connected with peripheral interface 106, such as alignment system
(such as GPS), temperature sensor, biometric sensor or other sensor devices, it is possible thereby to help to implement correlation
Function.
Camera sub-system 120 and optical sensor 122 can be used for the camera of convenient such as recording photograph and video clipping
The realization of function, wherein the camera sub-system and optical sensor for example can be charge coupling device (CCD) or complementary gold
Belong to oxide semiconductor (CMOS) optical sensor.It can help to realize by one or more radio communication subsystems 124
Communication function, wherein radio communication subsystem can include radio-frequency transmitter and emitter and/or light (such as infrared) receiver
And emitter.The particular design and embodiment of radio communication subsystem 124 can depend on mobile terminal 100 is supported one
Individual or multiple communication networks.For example, mobile terminal 100 can include be designed to support LTE, 3G, GSM network, GPRS network,
The communication subsystem 124 of EDGE network, Wi-Fi or WiMax network and BlueboothTM networks.
Audio subsystem 126 can be coupled with loudspeaker 128 and microphone 130, to help to implement to enable voice
Function, such as speech recognition, speech reproduction, digital record and telephony feature.I/O subsystems 140 can include touch-screen control
Device 142 processed and/or other one or more input controllers 144.Touch screen controller 142 may be coupled to touch-screen 146.Lift
For example, the touch-screen 146 and touch screen controller 142 can be detected using any one of a variety of touch-sensing technologies
The contact and movement or pause carried out therewith, wherein detection technology include but is not limited to capacitive character, resistive, infrared and table
Face technology of acoustic wave.Other one or more input controllers 144 may be coupled to other input/control devicess 148, such as one
Or the pointer device of multiple buttons, rocker switch, thumb wheel, infrared port, USB port, and/or instruction pen etc.It is described
One or more button (not shown)s can include the up/down for controlling loudspeaker 128 and/or the volume of microphone 130
Button.
Memory interface 102 can be coupled with memory 150.The memory 150 can include internal storage and outer
Portion's memory, internal storage for example can be static RAM (SRAM), nonvolatile memory (NVRAM)
Deng, but not limited to this;External memory storage is such as can be hard disk, mobile hard disk, USB flash disk, but not limited to this.Memory 150
It can be instructed with storage program, programmed instruction can for example include operating system 152 and using 154.Operating system 152 for example can be with
It is Android, iOS, Windows Phone etc., it includes being used to handle basic system services and performing dependent on hardware
The programmed instruction of task.Memory 150 can also be stored using 154, can include being used to realize that various users it is expected using 154
Function programmed instruction.It can be independently of using 154 operating system offer or that operating system carries.Separately
Outside, when being installed to using 154 in mobile terminal 100, drive module can also be added to operating system.Run in mobile device
When, operating system 152 can be loaded from memory 150, and performed by processor 104.Using 154 operationally, also can be from
Load in memory 150, and performed by processor 104.Operated in using 154 on operating system, using operating system and
The interface that bottom hardware provides realizes the desired function of various users, such as hardware management, instant messaging, web page browsing.
In above-mentioned various applications 154, a kind of application therein is according to the light compensating apparatus 160 of the present invention, and it can be
When user opens front camera, screen is divided into imaging region and light filling region two parts.Imaging region is located at screen
At center, for live preview self-timer image;Light filling region is located at the boundary of screen, and light filling region includes at least two benefits
Light unit, for realizing light filling, increase brightness of image.In user's self-timer, the face in automatic identification imaging region, pass through meter
Simultaneously comparison object regional luminance and background area brightness is calculated, adjusts the property value of each pixel in light filling unit to realize light filling, from
And improve image quality.
Fig. 2 shows the flow chart of light compensation method 200 according to an embodiment of the invention.Method 200 is suitable in movement
Performed in terminal (such as mobile terminal 100).As shown in Fig. 2 method 200 starts from step S210.
In step S210, mobile terminal screen is divided into imaging region and light filling region, imaging region is located at screen
Center at, light filling region is located at the boundary of screen, and including at least two light filling units.It is above-mentioned according to a kind of embodiment
At least two light filling units are arranged to symmetrical relative to the axis of mobile terminal screen, so as to realize balanced light filling,
There is the situation that image side is too bright, side is too dark after avoiding light filling, improve image quality.
For example, Fig. 3 shows the signal of the region division of mobile terminal screen 300 according to an embodiment of the invention
Figure.Screen 300 shown in Fig. 3 is divided into imaging region 320 and light filling region 340.Imaging region 320 is located at the center of screen
Position, for live preview self-timer image;Light filling region 340 is located at the left and right sides border of screen 300, is mended for realizing
Light, increase brightness of image.Light filling region 340 includes multiple light filling units 342, and this multiple light filling unit 342 is on screen
Axis 360 is symmetrical.
It should be pointed out that although the light filling unit 342 shown in Fig. 3 is circle, in other embodiments, light filling unit can
To be arranged to the arbitrary shape such as ellipse, rectangle, heart, star, the present invention is not limited to the shape of light filling unit.
Then, in step S220, the target area in recognition imaging region, target area is human face region or portrait area
Domain.It should be pointed out that human face region is the region where face in image, portrait area is the area where people's face and body in image
Domain.For example, as shown in figure 3, the human face region where rectangle frame 322 is target area.It should be pointed out that the present invention is to recognition of face
Or specific algorithm is not limited used by Identification of Images, those skilled in the art can select any people according to being actually needed
Face, human Facial Image Recognition Algorithm.
After target area is identified, imaging region can be divided into two parts:Target area and background area, the back of the body
Scene area is the region in addition to target area in imaging region.For example, as shown in figure 3, imaging region 320 further by
It is divided into target area 322 and background area 324.
Then, in step S230, it is target area to calculate target area brightness and background area brightness, target area brightness
The average value of the brightness of each pixel in domain, background area brightness are the average value of the brightness of each pixel in background area, wherein, the back of the body
Scene area is the region in addition to target area in imaging region.
According to a kind of embodiment, the brightness of pixel is the gray value being calculated according to the rgb value of pixel.According to a kind of real
Example is applied, the brightness of pixel can be the result of the rgb value weighted sum of pixel, for example, brightness=λ of pixel1* R values+λ2* G values+
λ3* B values, λ1、λ2、λ3The respectively gray processing weight of R values, G values, B values, λ1、λ2、λ3Such as can be separately arranged as 0.3,
0.59 and 0.11, certainly, λ1、λ2、λ3It may be also configured to other numerical value, the present invention is to the specific value of three and unrestricted
Limitation.Further, it is noted that using according to the gray value that the rgb value of pixel is calculated as the brightness of pixel be only the present invention
A kind of possible embodiment, in other examples, the brightness of pixel can also be V of the pixel in hsv color space
The value of passage, or the value of the L * channel in Lab color spaces, or value of Y passages of YUV color spaces, etc., this
The specific method for expressing of brightness of the invention to pixel is not limited.
Then, in step S240, when the difference of target area brightness and background area brightness is more than first threshold, adjust
The property value of each pixel in light unit is reorganized and brought up to full strength to realize light filling.The value of first threshold can voluntarily be set by those skilled in the art
Put, the present invention is without limitation, for example, first threshold can be arranged into 0.
According to a kind of embodiment, step S240 can be implemented further according to following steps S241~S245:
In step S241, maximum light filling intensity and most is determined according to the difference of target area brightness and background area brightness
Small light filling intensity, wherein, each light filling intensity corresponds to one group of property value.
According to a kind of embodiment, attribute includes transparency and rgb value, one group of property value corresponding to a light filling intensity
For:
Transparency=light filling intensity * 100% (1)
R values=R default value * light fillings intensity (2)
G values=G default value * light fillings intensity (3)
B values=B default value * light fillings intensity (4)
Wherein, R default values, G default values, B default values are default constant.It should be pointed out that the R in formula (2)~(4)
Value, G values, B values, R default values, G default values, B default values are the numerical value after normalization, i.e. and its span is [0,1], and
It is not [0,255].It should be pointed out that the specific value of R default values, G default values, B default values can be by those skilled in the art certainly
Row is set, and the present invention is not limited to the specific value of three.For example, three can be disposed as 1.0.In another example can be with
The value of adjustment three is allowed to be combined into bloom pink, so as to be best suitable for skin light filling.It should be pointed out that except transparency and
Outside rgb value, attribute can also include contrast, saturation degree etc., and correspondingly, light filling intensity also corresponds to contrast, saturation degree
Deng property value.The present invention does not do specific limit to the particular content included by attribute and the corresponding relation of light filling intensity and property value
System.
According to a kind of embodiment, maximum light filling intensity is arranged to 1, minimum light filling intensity determines according to below equation:
Minimum light filling intensity=min (max (0, (G1-G2)/M), 1) (5)
Wherein, G1 is target area brightness, and G2 is background area brightness, and M is target area brightness and background area brightness
Maximum difference, max () represents to take maximum, and min () represents to take minimum value.It should be pointed out that M is a default constant, its
Value can be set by those skilled in the art according to actual conditions and experience.It should be pointed out that above-mentioned maximum light filling intensity and
The method to set up of minimum light filling intensity is only an example, and those skilled in the art can designed, designed maximum light filling as needed
The computational methods of intensity and minimum light filling intensity, the present invention are not done to the determination method of maximum light filling intensity and minimum light filling intensity
Limitation.
Then, in step S242, each light filling unit is calculated respectively to the distance of target area.
Light filling unit has a variety of computational methods to the distance of target area.According to a kind of embodiment, light filling unit to target
The distance in region for light filling unit central point to the central point of target area distance.Under this calculation, in Fig. 3
In, apart from farthest light filling unit it is light filling unit 342_1 to target area, the light filling unit closest to target area is
Light filling unit 342_3.
According to another embodiment, the distance of light filling unit to target area for light filling unit central point to target area
The minimum value of the distance at any point on border.Under this calculation, in figure 3, to target area apart from farthest benefit
Light unit is light filling unit 342_1, the light filling unit closest to target area have it is multiple, including light filling unit 342_2,
342_3,342_4 etc..
Then, in step S243, the property value of each pixel in farthest light filling unit is arranged to maximum light filling intensity institute
Corresponding property value, farthest light filling unit are the farthest light filling unit in distance objective region.If for example, center by light filling unit
Point arrives distance of the distance of the central point of target area as light filling unit to target area, and maximum light filling intensity is 1, then step
S243 is arranged to 100% equivalent to by light filling unit 342_1 transparency, and rgb value is disposed as 255.
Then, in step S244, the property value of each pixel in nearest light filling unit is arranged to minimum light filling intensity institute
Corresponding property value, nearest light filling unit are the nearest light filling unit in distance objective region.If for example, center by light filling unit
Point arrives distance of the distance of the central point of target area as light filling unit to target area, and minimum light filling intensity is min (max
(0, (G1-G2)/M), 1), then step S244 is arranged to min (max (0, (G1- equivalent to by light filling unit 342_3 transparency
G2)/M), 1) * 100%, rgb value is disposed as min (max (0, (G1-G2)/M), 1) * 255.
Then, in step S245, the property value of each pixel in other light filling units is arranged to minimum light filling intensity institute
The numerical value between property value corresponding to corresponding property value to maximum light filling intensity, other light filling units are to be removed in light filling region
Light filling unit outside farthest light filling unit and nearest light filling unit.
According to a kind of embodiment, step S245 can be implemented further according to following methods:For any one, other are mended
Light unit:The light filling intensity of other light filling units is determined according to other light filling units to the distance of target area;By this its
The property value of each pixel is arranged to the property value corresponding to the light filling intensity in his light filling unit.According to a kind of embodiment, other
The light filling intensity of light filling unit can determine according to below equation:
Wherein, bg represents the light filling intensity of other light filling units, and bgmax is maximum light filling intensity, and bgmin is minimum light filling
Intensity, dmax are distance of the farthest light filling unit to target area, and dmin is nearest light filling unit to the distance of target area, d
For the distance of other light filling units to target area.It should be pointed out that above-mentioned formula (6) is only the light filling of other light filling units
A kind of calculation of intensity, it is strong that those skilled in the art can also calculate the light filling of other light filling units using other method
Degree, the present invention are not limited to the circular of the light filling intensity of other light filling units.
By step S240, the attribute of the pixel of each light filling unit is assigned, so as to which each light filling unit can be real
Now to the luminance compensation of image.Step S240 setting take into account carries out the actual conditions of self-timer in the region of dark.
In the region self-timer of dark, because face off screen curtain is closer, screen light can illuminate face and body;And at background
Apart from screen farther out, screen light can not illuminate background, so as to which background tends to appear as black in the picture.Therefore, background area
Domain needs the light filling compared with great dynamicses, and target area can carry out the light filling of low-force degree, in this embodiment it is not even necessary to light filling.Based on step
S240, technical scheme carry out light filling according to the difference of target area brightness and background area brightness, and difference is bigger, mends
Luminous intensity is bigger (to be arranged to maximum light filling intensity the implementation that 1, minimum light filling intensity is configured by formula (5) based on foregoing
Example, it is bigger that " light filling intensity is bigger " actually refers to minimum light filling intensity).Meanwhile the light filling intensity of different light filling units
Also it is not quite similar, the light filling intensity of the more remote light filling unit in distance objective region is bigger, the nearer light filling list in distance objective region
The light filling intensity of member is smaller.So, the light filling of varying strength can be adaptively carried out to target area and background area, is being carried
Cause that the brightness of whole picture is more uniform while hi-vision brightness, improve image quality.
A9:Method any one of A4-8, wherein, the property value of each pixel in other light filling units is arranged to most
The step of numerical value between the property value corresponding to property value to maximum light filling intensity corresponding to small light filling intensity, includes:
For any one other light filling unit:
The light filling intensity of other light filling units is determined according to other light filling units to the distance of target area;
The property value of each pixel in other light filling units is arranged to the property value corresponding to the light filling intensity.
A10:Method described in A9, wherein, the light filling intensity of other light filling units determines according to below equation:
Wherein, bg represents the light filling intensity of other light filling units, and bgmax is maximum light filling intensity, and bgmin is minimum light filling
Intensity, dmax are distance of the farthest light filling unit to target area, and dmin is nearest light filling unit to the distance of target area, d
For the distance of other light filling units to target area.
Various technologies described herein can combine hardware or software, or combinations thereof is realized together.So as to the present invention
Method and apparatus, or some aspects of the process and apparatus of the present invention or part can take embedded tangible media, such as can
Program code (instructing) in mobile hard disk, USB flash disk, floppy disk, CD-ROM or other any machine readable storage mediums
Form, wherein when program is loaded into the machine of such as computer etc, and is performed by the machine, the machine becomes to put into practice
The equipment of the present invention.
In the case where program code performs on programmable computers, mobile terminal generally comprises processor, processor
Readable storage medium (including volatibility and nonvolatile memory and/or memory element), at least one input unit, and extremely
A few output device.Wherein, memory is arranged to store program codes;Processor is arranged to according to the memory
Instruction in the described program code of middle storage, perform the light compensation method of the present invention.
By way of example and not limitation, computer-readable recording medium includes readable storage medium storing program for executing and communication media.Readable storage medium storing program for executing
Store the information such as computer-readable instruction, data structure, program module or other data.Communication media is typically such as to carry
The modulated message signal such as ripple or other transmission mechanisms embodies computer-readable instruction, data structure, program module or other
Data, and including any information transmitting medium.Any combination above is also included within the scope of computer-readable recording medium.
This place provide specification in, algorithm and show not with any certain computer, virtual system or other
Equipment is inherently related.Various general-purpose systems can also be used together with the example of the present invention.As described above, construct this kind of
Structure required by system is obvious.In addition, the present invention is not also directed to any certain programmed language.It should be understood that can
To realize the content of invention described herein using various programming languages, and the description done above to language-specific be for
Disclose the preferred forms of the present invention.
In the specification that this place provides, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention
Example can be put into practice in the case of these no details.In some instances, known method, knot is not been shown in detail
Structure and technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help to understand one or more of each inventive aspect,
Above in the description to the exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes
In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:I.e. required guarantor
The application claims of shield are than the feature more features that is expressly recited in each claim.More precisely, as following
As claims reflect, inventive aspect is all features less than single embodiment disclosed above.Therefore, abide by
Thus the claims for following embodiment are expressly incorporated in the embodiment, wherein each claim is in itself
Separate embodiments as the present invention.
Those skilled in the art should be understood the module or unit or group of the equipment in example disclosed herein
Part can be arranged in equipment as depicted in this embodiment, or alternatively can be positioned at and the equipment in the example
In different one or more equipment.Module in aforementioned exemplary can be combined as a module or be segmented into addition multiple
Submodule.
Those skilled in the art, which are appreciated that, to be carried out adaptively to the module in the equipment in embodiment
Change and they are arranged in one or more equipment different from the embodiment.Can be the module or list in embodiment
Member or component be combined into a module or unit or component, and can be divided into addition multiple submodule or subelement or
Sub-component.In addition at least some in such feature and/or process or unit exclude each other, it can use any
Combination is disclosed to all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so to appoint
Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (including adjoint power
Profit requires, summary and accompanying drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation
Replace.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included some features rather than further feature, but the combination of the feature of different embodiments means in of the invention
Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed
One of meaning mode can use in any combination.
In addition, be described as herein can be by the processor of computer system or by performing for some in the embodiment
The method or the combination of method element that other devices of the function are implemented.Therefore, have and be used to implement methods described or method
The processor of the necessary instruction of element forms the device for implementing this method or method element.In addition, device embodiment
Element described in this is the example of following device:The device is used to implement as in order to performed by implementing the element of the purpose of the invention
Function.
As used in this, unless specifically stated so, come using ordinal number " first ", " second ", " the 3rd " etc.
Description plain objects are merely representative of the different instances for being related to similar object, and are not intended to imply that the object being so described must
Must have the time it is upper, spatially, in terms of sequence or given order in any other manner.
Although describing the present invention according to the embodiment of limited quantity, above description, the art are benefited from
It is interior it is clear for the skilled person that in the scope of the present invention thus described, it can be envisaged that other embodiments.Additionally, it should be noted that
The language that is used in this specification primarily to readable and teaching purpose and select, rather than in order to explain or limit
Determine subject of the present invention and select.Therefore, in the case of without departing from the scope and spirit of the appended claims, for this
Many modifications and changes will be apparent from for the those of ordinary skill of technical field.For the scope of the present invention, to this
The done disclosure of invention is illustrative and be not restrictive, and it is intended that the scope of the present invention be defined by the claims appended hereto.
Claims (10)
1. a kind of light compensation method, is performed in the terminal, including:
Mobile terminal screen is divided into imaging region and light filling region, the imaging region is located at the center of screen, described
Light filling region is located at the boundary of screen, and including at least two light filling units;
Target area in recognition imaging region, the target area are human face region or portrait area;
Target area brightness and background area brightness are calculated, the target area brightness is the brightness of each pixel in target area
Average value, the background area brightness be background area in each pixel brightness average value, wherein, the background area be into
As the region in region in addition to target area;
When the difference of the target area brightness and the background area brightness is more than first threshold, adjust each in light filling unit
The property value of pixel is to realize light filling.
2. light compensation method as claimed in claim 1, wherein, at least two light filling unit is arranged to relative to mobile whole
Hold the axis of screen symmetrical.
3. the method for claim 1, wherein the brightness of the pixel is the ash being calculated according to the rgb value of pixel
Angle value.
4. the method for claim 1, wherein in the adjustment light filling unit property value of each pixel to realize light filling
Step includes:
Determine that maximum light filling intensity and minimum light filling are strong according to the difference of the target area brightness and the background area brightness
Degree, wherein, each light filling intensity corresponds to one group of property value;
Each light filling unit is calculated respectively to the distance of target area;
The property value of each pixel in farthest light filling unit is arranged to the property value corresponding to the maximum light filling intensity, it is described most
Remote light filling unit is the farthest light filling unit in distance objective region;
The property value of each pixel in nearest light filling unit is arranged to the property value corresponding to the minimum light filling intensity, it is described most
Nearly light filling unit is the nearest light filling unit in distance objective region;
The property value of each pixel in other light filling units is arranged to property value corresponding to minimum light filling intensity to maximum light filling
The numerical value between property value corresponding to intensity, other described light filling units be in light filling region except farthest light filling unit and most
Light filling unit outside nearly light filling unit.
5. method as claimed in claim 4, wherein, the maximum light filling intensity is 1, and minimum light filling intensity is according to formula min
(max (0, (G1-G2)/M), 1) is determined, wherein, G1 is target area brightness, G2 is background area brightness, and M is target area
The maximum difference of brightness and background area brightness, max () expressions take maximum, and min () represents to take minimum value.
6. the method as described in claim 4 or 5, wherein, the attribute includes transparency and rgb value;One light filling intensity institute
Corresponding one group of property value is:
Transparency=light filling intensity * 100%;
R values=R default value * light filling intensity;
G values=G default value * light filling intensity;B values=B default value * light filling intensity;
Wherein, R default values, G default values, B default values are default constant.
7. such as the method any one of claim 4-6, wherein, the distance of the light filling unit to target area is light filling
Distance of the central point of unit to the central point of target area.
8. such as the method any one of claim 4-6, wherein, the distance of the light filling unit to target area is light filling
Minimum value of the central point of unit to the distance at any point on target area boundaries.
9. a kind of mobile terminal, including:
At least one processor;With
Have program stored therein the memory of instruction, wherein, described program instruction is configured as being suitable to by least one processor
Perform, described program instruction includes being used for the instruction for performing the light compensation method as any one of claim 1-8.
10. a kind of readable storage medium storing program for executing for the instruction that has program stored therein, when described program instruction is read by the mobile terminal and is performed,
So that the mobile terminal performs the light compensation method as any one of claim 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710693895.5A CN107566695B (en) | 2017-08-14 | 2017-08-14 | A kind of light compensation method and mobile terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710693895.5A CN107566695B (en) | 2017-08-14 | 2017-08-14 | A kind of light compensation method and mobile terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107566695A true CN107566695A (en) | 2018-01-09 |
CN107566695B CN107566695B (en) | 2019-07-02 |
Family
ID=60975505
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710693895.5A Active CN107566695B (en) | 2017-08-14 | 2017-08-14 | A kind of light compensation method and mobile terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107566695B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108280431A (en) * | 2018-01-25 | 2018-07-13 | 广东欧珀移动通信有限公司 | Face recognition processing method, recognition of face processing unit and intelligent terminal |
CN108449549A (en) * | 2018-03-19 | 2018-08-24 | 浙江国自机器人技术有限公司 | A kind of method, apparatus and storage medium adjusting LED light supplement lamp plate brightness |
CN108900780A (en) * | 2018-06-28 | 2018-11-27 | 努比亚技术有限公司 | A kind of screen light compensation method, mobile terminal and storage medium |
CN111083388A (en) * | 2019-12-26 | 2020-04-28 | 浙江大华技术股份有限公司 | Light supplement lamp control method and device, electronic equipment and storage medium |
CN111345019A (en) * | 2018-04-04 | 2020-06-26 | 华为技术有限公司 | Ambient light detection method and terminal |
CN112312030A (en) * | 2019-08-01 | 2021-02-02 | 深圳怡化电脑股份有限公司 | Photographing light supplement method and device, computer equipment and storage medium |
CN112702531A (en) * | 2020-12-29 | 2021-04-23 | 维沃移动通信有限公司 | Shooting method and device and electronic equipment |
CN114900617A (en) * | 2022-03-28 | 2022-08-12 | 北京京东乾石科技有限公司 | Light supplement method, device, equipment, storage medium and light supplement brightness adjusting device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1499823A (en) * | 2002-11-05 | 2004-05-26 | 奥林巴斯株式会社 | Camera |
CN103428568A (en) * | 2012-05-23 | 2013-12-04 | 索尼公司 | Electronic mirror device, electronic mirror display method, and electronic mirror program |
CN104301598A (en) * | 2013-07-18 | 2015-01-21 | 国龙信息技术(上海)有限公司 | Method of setting lighting effect of front camera by mobile terminal |
CN104320578A (en) * | 2014-10-22 | 2015-01-28 | 厦门美图之家科技有限公司 | Method for performing self-shot soft light compensation on basis of screen luminance |
CN105554411A (en) * | 2016-02-15 | 2016-05-04 | 广东欧珀移动通信有限公司 | Photographing method and device based on screen light compensation and mobile terminal |
CN106534707A (en) * | 2015-09-14 | 2017-03-22 | 中兴通讯股份有限公司 | Photographing method and device |
-
2017
- 2017-08-14 CN CN201710693895.5A patent/CN107566695B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1499823A (en) * | 2002-11-05 | 2004-05-26 | 奥林巴斯株式会社 | Camera |
CN103428568A (en) * | 2012-05-23 | 2013-12-04 | 索尼公司 | Electronic mirror device, electronic mirror display method, and electronic mirror program |
CN104301598A (en) * | 2013-07-18 | 2015-01-21 | 国龙信息技术(上海)有限公司 | Method of setting lighting effect of front camera by mobile terminal |
CN104320578A (en) * | 2014-10-22 | 2015-01-28 | 厦门美图之家科技有限公司 | Method for performing self-shot soft light compensation on basis of screen luminance |
CN106534707A (en) * | 2015-09-14 | 2017-03-22 | 中兴通讯股份有限公司 | Photographing method and device |
CN105554411A (en) * | 2016-02-15 | 2016-05-04 | 广东欧珀移动通信有限公司 | Photographing method and device based on screen light compensation and mobile terminal |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108280431A (en) * | 2018-01-25 | 2018-07-13 | 广东欧珀移动通信有限公司 | Face recognition processing method, recognition of face processing unit and intelligent terminal |
CN108280431B (en) * | 2018-01-25 | 2021-04-30 | Oppo广东移动通信有限公司 | Face recognition processing method, face recognition processing device and intelligent terminal |
CN108449549B (en) * | 2018-03-19 | 2021-02-12 | 浙江国自机器人技术股份有限公司 | Method and device for adjusting brightness of LED fill light lamp panel and storage medium |
CN108449549A (en) * | 2018-03-19 | 2018-08-24 | 浙江国自机器人技术有限公司 | A kind of method, apparatus and storage medium adjusting LED light supplement lamp plate brightness |
CN111345019B (en) * | 2018-04-04 | 2021-08-31 | 华为技术有限公司 | Ambient light detection method and terminal |
CN111345019A (en) * | 2018-04-04 | 2020-06-26 | 华为技术有限公司 | Ambient light detection method and terminal |
US11250813B2 (en) | 2018-04-04 | 2022-02-15 | Huawei Technologies Co., Ltd. | Ambient light detection method and terminal |
CN108900780A (en) * | 2018-06-28 | 2018-11-27 | 努比亚技术有限公司 | A kind of screen light compensation method, mobile terminal and storage medium |
CN112312030A (en) * | 2019-08-01 | 2021-02-02 | 深圳怡化电脑股份有限公司 | Photographing light supplement method and device, computer equipment and storage medium |
CN111083388A (en) * | 2019-12-26 | 2020-04-28 | 浙江大华技术股份有限公司 | Light supplement lamp control method and device, electronic equipment and storage medium |
CN112702531A (en) * | 2020-12-29 | 2021-04-23 | 维沃移动通信有限公司 | Shooting method and device and electronic equipment |
CN114900617A (en) * | 2022-03-28 | 2022-08-12 | 北京京东乾石科技有限公司 | Light supplement method, device, equipment, storage medium and light supplement brightness adjusting device |
CN114900617B (en) * | 2022-03-28 | 2023-08-08 | 北京京东乾石科技有限公司 | Light supplementing method, device, equipment, storage medium and light supplementing brightness adjusting device |
WO2023184863A1 (en) * | 2022-03-28 | 2023-10-05 | 北京京东乾石科技有限公司 | Light filling method and apparatus, device, storage medium, and light filling brightness adjusting apparatus |
Also Published As
Publication number | Publication date |
---|---|
CN107566695B (en) | 2019-07-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107566695B (en) | A kind of light compensation method and mobile terminal | |
US12014663B2 (en) | Dark mode display interface processing method, electronic device, and storage medium | |
US11470294B2 (en) | Method, device, and storage medium for converting image from raw format to RGB format | |
JP5136669B2 (en) | Image processing apparatus, image processing method, and program | |
US9843716B2 (en) | Method and apparatus for adjusting photography parameters | |
WO2016011747A1 (en) | Skin color adjustment method and device | |
CN112529784B (en) | Image distortion correction method and device | |
KR20130099521A (en) | Method for correcting user's gaze direction in image, machine-readable storage medium and communication terminal | |
CN112887582A (en) | Image color processing method and device and related equipment | |
CN113965694B (en) | Video recording method, electronic device and computer readable storage medium | |
US20220329729A1 (en) | Photographing method, storage medium and electronic device | |
KR20180044200A (en) | Electronic device with display-based image compensation and corresponding systems and methods | |
CN105469357B (en) | Image processing method, device and terminal | |
US10009545B2 (en) | Image processing apparatus and method of operating the same | |
KR102273059B1 (en) | Method, apparatus and electronic device for enhancing face image | |
JP5370555B2 (en) | Imaging apparatus, imaging method, and program | |
CN113850709A (en) | Image transformation method and device | |
CN105472228B (en) | Image processing method and device and terminal | |
US9626932B2 (en) | Image processing apparatus, image processing method and recording medium recording program for correcting image in predetermined area | |
US20170163852A1 (en) | Method and electronic device for dynamically adjusting gamma parameter | |
US20230020937A1 (en) | Image processing method, electronic device, and storage medium | |
JP6873816B2 (en) | Imaging device, control method of imaging device, and program | |
CN115633250A (en) | Image processing method and electronic equipment | |
WO2021147648A1 (en) | Suggestion method and device, storage medium, and electronic apparatus | |
CN107872619B (en) | Photographing processing method, device and equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |