CN105227843A - The filming control method of terminal, the imaging control device of terminal and terminal - Google Patents

The filming control method of terminal, the imaging control device of terminal and terminal Download PDF

Info

Publication number
CN105227843A
CN105227843A CN201510685833.0A CN201510685833A CN105227843A CN 105227843 A CN105227843 A CN 105227843A CN 201510685833 A CN201510685833 A CN 201510685833A CN 105227843 A CN105227843 A CN 105227843A
Authority
CN
China
Prior art keywords
terminal
backlight
environment
preview image
brightness
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510685833.0A
Other languages
Chinese (zh)
Inventor
张旭
吕乐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority to CN201510685833.0A priority Critical patent/CN105227843A/en
Publication of CN105227843A publication Critical patent/CN105227843A/en
Pending legal-status Critical Current

Links

Abstract

The present invention proposes a kind of filming control method of terminal, the imaging control device of terminal and terminal, wherein, the filming control method of described terminal comprises: when the front-facing camera of terminal gathers preview image, detected the current environment brightness of described terminal by the light sensor of described terminal; If when detecting that described current environment brightness is greater than default ambient brightness, add up the brightness histogram of described preview image; The current backlight degree of described terminal is calculated according to described brightness histogram; The shoot function of the high dynamic range images opening described terminal is determined whether according to described current backlight degree.By technical scheme of the present invention, when utilizing front-facing camera to take, terminal can be determined accurately and rapidly whether under backlight environment, thus improve the quality of the image shot under backlight environment.

Description

The filming control method of terminal, the imaging control device of terminal and terminal
Technical field
The present invention relates to field of terminal technology, in particular to imaging control device and a kind of terminal of a kind of filming control method of terminal, a kind of terminal.
Background technology
At present, increasing electronic equipment has camera function.Such as, mostly digital camera head is integrated with in notebook computer, at personal digital assistant (PDA, PersonalDigitalAssistant, personal digital assistant) and smart mobile phone in be mostly integrated with digital camera, in panel computer, be also integrated with digital camera, these electronic equipments all may be used for taking pictures.
When utilizing electronic equipment to take, inevitably run into the problem of backlight scene capture and non-backlight scene capture.When reversible-light shooting, often occur that background parts crosses the bright and real subject paid close attention to and the excessively dark result of reference object part.But there is following a few point defect in existing technical scheme:
1., not for the backlighting detecting of front-facing camera, user can not be met and put before use when camera is taken pictures for the demand that backlight scene detection strengthens;
2. compared with rearmounted front-facing camera, the cost of front-facing camera is lower, second-rate, and therefore the monochrome information that collects of front-facing camera is inaccurate sometimes, and this is unfavorable for the transplanting of existing backlight detection algorithm;
3. the preview image to each frame of the prior art all carries out analyzing and processing, easily increases algorithm complex, and in the critical part of backlight and non-backlight scene, frequent saltus step easily occurs testing result;
4. the practicality of prior art and Consumer's Experience all poor.
Therefore, when utilizing front-facing camera to take, how to determine terminal accurately and rapidly whether under backlight environment, thus improve the quality of the image shot under backlight environment.
Summary of the invention
The present invention, just based on the problems referred to above, proposes a kind of new technical scheme, when utilizing front-facing camera to take, can determine terminal accurately and rapidly whether under backlight environment, thus improve the quality of the image shot under backlight environment.
In view of this, a first aspect of the present invention proposes a kind of filming control method of terminal, comprising: when the front-facing camera of terminal gathers preview image, detected the current environment brightness of described terminal by the light sensor of described terminal; If when detecting that described current environment brightness is greater than default ambient brightness, add up the brightness histogram of described preview image; The current backlight degree of described terminal is calculated according to described brightness histogram; The shoot function of the high dynamic range images opening described terminal is determined whether according to described current backlight degree.
In this technical scheme, when the front-facing camera of terminal is taken pictures, by the current environment brightness of the light sensor sense terminals of terminal, if detect, current environment brightness is greater than default ambient brightness (preferably, the scope presetting ambient brightness is 100lux to 200lux, lux is sound lux, luminous intensity unit), namely the environment at terminal place is brighter, then add up the brightness histogram of preview image, otherwise, do not carry out backlight detection, so not only can avoid error detection during half-light, again can in unnecessary (when namely current environment brightness is less than default ambient brightness) close backlight measuring ability in front-facing camera, not only save system resource, the power consumption of terminal can also be reduced.
When adding up the brightness histogram of preview image, particularly, obtain the gray value rank belonging to each pixel in the multiple pixels in preview image, and add up in multiple pixel the number of pixels of each level grey scale value belonged in multiple level grey scale value (such as the 0th level grey scale value is to the 255th level grey scale value), using multiple level grey scale value as abscissa, using the number of pixels of each for the correspondence in multiple pixel level grey scale value as ordinate, thus the brightness histogram of preview image can be counted.Then can carry out the current backlight degree of computing terminal according to brightness histogram, then determine whether the shoot function of the high dynamic range images (HDR, HighDynamicRange) opening terminal according to current backlight degree.Because the cost of front-facing camera is lower, second-rate, the backlight detection algorithm in rearmounted front-facing camera is difficult to be applied to front-facing camera, and technique scheme is easy to be applied to front-facing camera, not only effectively can improve and utilize front-facing camera to carry out the effect of taking pictures, also there is the feature of low-power consumption, high-accuracy and high practicability.In addition, also avoid and of the prior artly determine terminal whether under backlight environment by carrying out analyzing and processing to the preview image of each frame, thus reduce the complexity of algorithm.
In technique scheme, preferably, the described step calculating the current backlight degree of described terminal according to described brightness histogram, specifically comprises: the number of pixels obtaining each level grey scale value in the multiple level grey scale values in described brightness histogram; The standard deviation of described brightness histogram is calculated according to the number of pixels of described each level grey scale value, and using described standard deviation as described current backlight degree.
In this technical scheme, the standard deviation of brightness histogram is calculated according to the number of pixels of each level grey scale value in brightness histogram, particularly, the average of gray value in brightness histogram is calculated according to the number of pixels of each level grey scale value, according to the standard deviation of gray value in mean value computation brightness histogram, standard deviation is the current backlight degree of terminal, thus can determine current backlight degree fairly simple, rapidly.
In above-mentioned arbitrary technical scheme, preferably, the described step determining whether the shoot function of the high dynamic range images opening described terminal according to described current backlight degree, specifically comprises: under determining whether described terminal is in backlight environment according to described current backlight degree; If so, the shoot function of the high dynamic range images of described terminal is opened, otherwise, close the shoot function of the high dynamic range images of described terminal.
In this technical scheme, under determining whether terminal is in backlight environment according to current backlight degree, if so, open the shoot function of the high dynamic range images of terminal, thus improve the quality of taking pictures when utilizing front-facing camera to take pictures.If terminal is not under being in backlight environment, illustrates and now do not need the shoot function of the high dynamic range images starting terminal just can get the higher image of quality, then close the shoot function of high dynamic range images, thus the power consumption of terminal can be reduced.
In above-mentioned arbitrary technical scheme, preferably, describedly determine whether described terminal is in the step under backlight environment, specifically comprises according to described current backlight degree: the backlight probability by preview image described in following formulae discovery: wherein, p (Y=1| σ) represents the described backlight probability of described preview image, and σ represents described current backlight degree, and α and β is preset parameter; And judge whether described backlight probability is greater than predetermined threshold value, under if so, determining that described terminal is in described backlight environment, otherwise, under determining that described terminal is in non-backlight environment.
In this technical scheme, the backlight probability of preview image can be determined more exactly by above-mentioned formula, and judge whether backlight probability is greater than predetermined threshold value (namely 0.5), if, under then determining that terminal is in backlight environment, otherwise, under determining that terminal is in non-backlight environment, thus improve the accuracy rate of sense terminals whether under backlight environment and reliability.
In above-mentioned arbitrary technical scheme, preferably, the step of the brightness histogram in the described preview image of described statistics, specifically comprises: after the Preset Time gathering described preview image, add up described brightness histogram.
In this technical scheme, by adding up brightness histogram after the Preset Time gathering preview image, the stability that backlight detects can be ensured.
Preferably, by gathering preview image every frame sampling mode, such as, sampling interval is 1.5 seconds or 45 frames, avoid and under backlight environment, carry out backlight detection and the saltus step continually not carrying out backlight detection under non-backlight environment, namely avoid the situation occurring frequent saltus step in the critical part of backlight environment, thus improve accuracy rate and reliability that terminal carries out backlight detection.And accumulation judgement can be carried out by the multiple current backlight degree detected different time sections, if accumulated result is backlight degree be greater than preset value, under then judging that terminal is in backlight environment, thus avoid the situation occurring frequent saltus step in the critical part of backlight environment further.
A second aspect of the present invention proposes a kind of imaging control device of terminal, comprising: detecting unit, for when the front-facing camera of terminal gathers preview image, is detected the current environment brightness of described terminal by the light sensor of described terminal; Statistic unit, if for detecting that described current environment brightness is greater than default ambient brightness time, add up the brightness histogram of described preview image; Computing unit, for calculating the current backlight degree of described terminal according to described brightness histogram; Control unit, for determining whether the shoot function of the high dynamic range images opening described terminal according to described current backlight degree.
In this technical scheme, when the front-facing camera of terminal is taken pictures, by the current environment brightness of the light sensor sense terminals of terminal, if judge, current environment brightness is greater than default ambient brightness (preferably, the scope presetting ambient brightness is 100lux to 200lux, lux is sound lux, luminous intensity unit), namely the environment at terminal place is brighter, then add up the brightness histogram of preview image, otherwise, do not carry out backlight detection, so not only can avoid error detection during half-light, again can in unnecessary (when namely current environment brightness is less than default ambient brightness) close backlight measuring ability in front-facing camera, not only save system resource, the power consumption of terminal can also be reduced.
When adding up the brightness histogram of preview image, particularly, obtain the gray value rank belonging to each pixel in the multiple pixels in preview image, and add up in multiple pixel the number of pixels of each level grey scale value belonged in multiple level grey scale value (such as the 0th level grey scale value is to the 255th level grey scale value), using multiple level grey scale value as abscissa, using the number of pixels of each for the correspondence in multiple pixel level grey scale value as ordinate, thus the brightness histogram of preview image can be counted.Then can carry out the current backlight degree of computing terminal according to brightness histogram, then determine whether the shoot function of the high dynamic range images (HDR, HighDynamicRange) opening terminal according to current backlight degree.Because the cost of front-facing camera is lower, second-rate, the backlight detection algorithm in rearmounted front-facing camera is difficult to be applied to front-facing camera, and technique scheme is easy to be applied to front-facing camera, not only effectively can improve and utilize front-facing camera to carry out the effect of taking pictures, also there is the feature of low-power consumption, high-accuracy and high practicability.In addition, also avoid and of the prior artly determine terminal whether under backlight environment by carrying out analyzing and processing to the preview image of each frame, thus reduce the complexity of algorithm.
In technique scheme, preferably, described computing unit comprises: acquiring unit, for obtaining the number of pixels of each level grey scale value in the multiple level grey scale values in described brightness histogram; First determining unit, for calculating the standard deviation of described brightness histogram, and using described standard deviation as described current backlight degree according to the number of pixels of described each level grey scale value.
In this technical scheme, the standard deviation of brightness histogram is calculated according to the number of pixels of each level grey scale value in brightness histogram, particularly, the average of gray value in brightness histogram is calculated according to the number of pixels of each level grey scale value, according to the standard deviation of gray value in mean value computation brightness histogram, standard deviation is the current backlight degree of terminal, thus can determine current backlight degree fairly simple, rapidly.
In above-mentioned arbitrary technical scheme, preferably, described control unit comprises: the second determining unit, under determining whether described terminal is in backlight environment according to described current backlight degree; Described control unit specifically for, if so, open the shoot function of the high dynamic range images of described terminal, otherwise, close the shoot function of the high dynamic range images of described terminal.
In this technical scheme, under determining whether terminal is in backlight environment according to current backlight degree, if so, open the shoot function of the high dynamic range images of terminal, thus improve the quality of taking pictures when utilizing front-facing camera to take pictures.If terminal is not under being in backlight environment, illustrates and now do not need the shoot function of the high dynamic range images starting terminal just can get the higher image of quality, then close the shoot function of high dynamic range images, thus the power consumption of terminal can be reduced.
In above-mentioned arbitrary technical scheme, preferably, described second determining unit is specifically for, the backlight probability by preview image described in following formulae discovery: wherein, p (Y=1| σ) represents the described backlight probability of described preview image, σ represents described current backlight degree, α and β is preset parameter, and judge whether described backlight probability is greater than predetermined threshold value, under if so, determining that described terminal is in described backlight environment, otherwise, under determining that described terminal is in non-backlight environment.
In this technical scheme, the backlight probability of preview image can be determined more exactly by above-mentioned formula, and judge whether backlight probability is greater than predetermined threshold value (namely 0.5), if, under then determining that terminal is in backlight environment, otherwise, under determining that terminal is in non-backlight environment, thus improve the accuracy rate of sense terminals whether under backlight environment and reliability.
In technique scheme, preferably, described statistic unit specifically for, gather described preview image Preset Time after add up described brightness histogram.
In this technical scheme, by adding up brightness histogram after the Preset Time gathering preview image, the stability that backlight detects can be ensured.
Preferably, by gathering preview image every frame sampling mode, such as, sampling interval is 1.5 seconds or 45 frames, avoid and under backlight environment, carry out backlight detection and the saltus step continually not carrying out backlight detection under non-backlight environment, namely avoid the situation occurring frequent saltus step in the critical part of backlight environment, thus improve accuracy rate and reliability that terminal carries out backlight detection.And accumulation judgement can be carried out by the multiple current backlight degree detected different time sections, if accumulated result is backlight degree be greater than preset value, under then judging that terminal is in backlight environment, thus avoid the situation occurring frequent saltus step in the critical part of backlight environment further.
A third aspect of the present invention proposes a kind of terminal, comprise the imaging control device of the terminal according to any one of technique scheme, therefore, this terminal has the technique effect identical with the imaging control device of the terminal according to any one of technique scheme, does not repeat them here.
By technical scheme of the present invention, terminal can be determined accurately and rapidly whether under backlight environment, thus improve the quality of the image shot under backlight environment.
Accompanying drawing explanation
Fig. 1 shows the schematic flow sheet of the filming control method of terminal according to an embodiment of the invention;
Fig. 2 shows the schematic flow sheet of the filming control method of terminal according to another embodiment of the invention;
Fig. 3 shows the structural representation of the imaging control device of terminal according to an embodiment of the invention;
Fig. 4 shows the structural representation of terminal according to an embodiment of the invention;
Fig. 5 shows the principle schematic of the imaging control device of terminal according to an embodiment of the invention.
Embodiment
In order to more clearly understand above-mentioned purpose of the present invention, feature and advantage, below in conjunction with the drawings and specific embodiments, the present invention is further described in detail.It should be noted that, when not conflicting, the feature in the embodiment of the application and embodiment can combine mutually.
Set forth a lot of detail in the following description so that fully understand the present invention; but; the present invention can also adopt other to be different from other modes described here and implement, and therefore, protection scope of the present invention is not by the restriction of following public specific embodiment.
Fig. 1 shows the schematic flow sheet of the filming control method of terminal according to an embodiment of the invention.
As shown in Figure 1, the filming control method of terminal according to an embodiment of the invention, comprising:
Step 102, when the front-facing camera of terminal gathers preview image, detects the current environment brightness of described terminal by the light sensor of described terminal;
Step 104, if when detecting that described current environment brightness is greater than default ambient brightness, add up the brightness histogram of described preview image;
Step 106, calculates the current backlight degree of described terminal according to described brightness histogram;
Step 108, determines whether the shoot function of the high dynamic range images opening described terminal according to described current backlight degree.
In this technical scheme, when the front-facing camera of terminal is taken pictures, by the current environment brightness of sense terminals, if judge, current environment brightness is greater than default ambient brightness (preferably, the scope presetting ambient brightness is 100lux to 200lux, lux is sound lux, luminous intensity unit), namely the environment at terminal place is brighter, then add up the brightness histogram in preview image, otherwise, do not carry out backlight detection, so not only can avoid error detection during half-light, again can in unnecessary (when namely current environment brightness is less than default ambient brightness) close backlight measuring ability in front-facing camera, not only save system resource, the power consumption of terminal can also be reduced.
When adding up the brightness histogram of preview image, particularly, obtain the gray value rank belonging to each pixel in the multiple pixels in preview image, and add up in multiple pixel the number of pixels of each level grey scale value belonged in multiple level grey scale value (such as the 0th level grey scale value is to the 255th level grey scale value), using multiple level grey scale value as abscissa, using the number of pixels of each for the correspondence in multiple pixel level grey scale value as ordinate, thus the brightness histogram of preview image can be counted.Then can carry out the current backlight degree of computing terminal according to brightness histogram, then determine whether the shoot function of the high dynamic range images (HDR, HighDynamicRange) opening terminal according to current backlight degree.Because the cost of front-facing camera is lower, second-rate, the backlight detection algorithm in rearmounted front-facing camera is difficult to be applied to front-facing camera, and technique scheme is easy to be applied to front-facing camera, not only effectively can improve and utilize front-facing camera to carry out the effect of taking pictures, also there is the feature of low-power consumption, high-accuracy and high practicability.In addition, also avoid and of the prior artly determine terminal whether under backlight environment by carrying out analyzing and processing to the preview image of each frame, thus reduce the complexity of algorithm.
In technique scheme, preferably, step 106 specifically comprises: the number of pixels obtaining each level grey scale value in the multiple level grey scale values in described brightness histogram; The standard deviation of described brightness histogram is calculated according to the number of pixels of described each level grey scale value, and using described standard deviation as described current backlight degree.
In this technical scheme, the standard deviation of brightness histogram is calculated according to the number of pixels of each level grey scale value in brightness histogram, particularly, the average of gray value in brightness histogram is calculated according to the number of pixels of each level grey scale value, according to the standard deviation of gray value in mean value computation brightness histogram, standard deviation is the current backlight degree of terminal, thus can determine current backlight degree fairly simple, rapidly.
In above-mentioned arbitrary technical scheme, preferably, step 108 specifically comprises: under determining whether described terminal is in backlight environment according to described current backlight degree; If so, the shoot function of the high dynamic range images of described terminal is opened, otherwise, close the shoot function of the high dynamic range images of described terminal.
In this technical scheme, under determining whether terminal is in backlight environment according to current backlight degree, if so, open the shoot function of the high dynamic range images of terminal, thus improve the quality of taking pictures when utilizing front-facing camera to take pictures.If terminal is not under being in backlight environment, illustrates and now do not need the shoot function of the high dynamic range images starting terminal just can get the higher image of quality, then close the shoot function of high dynamic range images, thus the power consumption of terminal can be reduced.
In above-mentioned arbitrary technical scheme, preferably, described second determining unit is specifically for, the backlight probability by preview image described in following formulae discovery: wherein, p (Y=1| σ) represents the described backlight probability of described preview image, σ represents described current backlight degree, α and β is preset parameter, and judge whether described backlight probability is greater than predetermined threshold value, under if so, determining that described terminal is in described backlight environment, otherwise, under determining that described terminal is in non-backlight environment.
In this technical scheme, the backlight probability of preview image can be determined more exactly by above-mentioned formula, and judge whether backlight probability is greater than predetermined threshold value (namely 0.5), if, under then determining that terminal is in backlight environment, otherwise, under determining that terminal is in non-backlight environment, thus improve the accuracy rate of sense terminals whether under backlight environment and reliability.
In above-mentioned arbitrary technical scheme, preferably, the step of the brightness histogram of the described preview image of described statistics, specifically comprises: after the Preset Time gathering described preview image, add up described brightness histogram.
In this technical scheme, by adding up brightness histogram after the Preset Time gathering preview image, the stability that backlight detects can be ensured.
Preferably, by gathering preview image every frame sampling mode, such as, sampling interval is 1.5 seconds or 45 frames, avoid and under backlight environment, carry out backlight detection and the saltus step continually not carrying out backlight detection under non-backlight environment, namely avoid the situation occurring frequent saltus step in the critical part of backlight environment, thus improve accuracy rate and reliability that terminal carries out backlight detection.And accumulation judgement can be carried out by the multiple current backlight degree detected different time sections, if accumulated result is backlight degree be greater than preset value, under then judging that terminal is in backlight environment, thus avoid the situation occurring frequent saltus step in the critical part of backlight environment further.
Fig. 2 shows the schematic flow sheet of the filming control method of terminal according to another embodiment of the invention.
As shown in Figure 2, the filming control method of terminal according to another embodiment of the invention, comprising:
Step 202, starts the front-facing camera of terminal.
Step 204, judges whether terminal opens backlight scene detection pattern, if so, then enters step 206, otherwise, enter step 208.
Step 206, opens backlight scene detection pattern, then by the current environment brightness of the light sensor sense terminals of terminal if judge.
Step 208, does not open backlight scene detection pattern, front-facing camera normal photographing if judge.
Step 210, judges whether current environment brightness is greater than default ambient brightness, if so, enters step 212, otherwise, enter step 218.
Step 212, if judge, current environment brightness is greater than default ambient brightness, then add up the brightness histogram of the preview image that front-facing camera collects, according to the current backlight degree of brightness histogram computing terminal.
According to current backlight degree, step 214, judges whether terminal is in backlight scene, if so, then enters step 216, otherwise enters step 218.
Step 216, starts the HDR function of terminal.
Step 218, judges whether user presses space shooting shutter, if so, enters step 220, otherwise, enter step 210.
Step 220, record preview image.
Fig. 3 shows the structural representation of the imaging control device of terminal according to an embodiment of the invention.
As shown in Figure 3, the imaging control device 300 of terminal according to an embodiment of the invention, comprise: detecting unit 302, statistic unit 304, computing unit 306 and control unit 308, wherein, described detecting unit 302, for when the front-facing camera of terminal gathers preview image, detects the current environment brightness of described terminal by the light sensor of described terminal; Statistic unit 304, if for detecting that described current environment brightness is greater than default ambient brightness time, add up the brightness histogram of described preview image; Computing unit 306, for calculating the current backlight degree of described terminal according to described brightness histogram; Control unit 308, for determining whether the shoot function of the high dynamic range images opening described terminal according to described current backlight degree.
In this technical scheme, when the front-facing camera of terminal is taken pictures, by the current environment brightness of sense terminals, if judge, current environment brightness is greater than default ambient brightness (preferably, the scope presetting ambient brightness is 100lux to 200lux, lux is sound lux, luminous intensity unit), namely the environment at terminal place is brighter, then add up the brightness histogram of preview image, otherwise, do not carry out backlight detection, so not only can avoid error detection during half-light, again can in unnecessary (when namely current environment brightness is less than default ambient brightness) close backlight measuring ability in front-facing camera, not only save system resource, the power consumption of terminal can also be reduced.
When adding up the brightness histogram of preview image, particularly, obtain the gray value rank belonging to each pixel in the multiple pixels in preview image, and add up in multiple pixel the number of pixels of each level grey scale value belonged in multiple level grey scale value (such as the 0th level grey scale value is to the 255th level grey scale value), using multiple level grey scale value as abscissa, using the number of pixels of each for the correspondence in multiple pixel level grey scale value as ordinate, thus the brightness histogram of preview image can be counted.Then can carry out the current backlight degree of computing terminal according to brightness histogram, then determine whether the shoot function of the high dynamic range images (HDR, HighDynamicRange) opening terminal according to current backlight degree.Because the cost of front-facing camera is lower, second-rate, the backlight detection algorithm in rearmounted front-facing camera is difficult to be applied to front-facing camera, and technique scheme is easy to be applied to front-facing camera, not only effectively can improve and utilize front-facing camera to carry out the effect of taking pictures, also there is the feature of low-power consumption, high-accuracy and high practicability.In addition, also avoid and of the prior artly determine terminal whether under backlight environment by carrying out analyzing and processing to the preview image of each frame, thus reduce the complexity of algorithm.
In technique scheme, preferably, described computing unit 306 comprises: acquiring unit 3062, for obtaining the number of pixels of each level grey scale value in the multiple level grey scale values in described brightness histogram; First determining unit 3064, for calculating the standard deviation of described brightness histogram, and using described standard deviation as described current backlight degree according to the number of pixels of described each level grey scale value.
In this technical scheme, the standard deviation of brightness histogram is calculated according to the number of pixels of each level grey scale value in brightness histogram, particularly, the average of gray value in brightness histogram is calculated according to the number of pixels of each level grey scale value, according to the standard deviation of gray value in mean value computation brightness histogram, standard deviation is the current backlight degree of terminal, thus can determine current backlight degree fairly simple, rapidly.
In above-mentioned arbitrary technical scheme, preferably, described control unit 308 comprises: the second determining unit 3082, under determining whether described terminal is in backlight environment according to described current backlight degree; Described control unit 308 specifically for, if so, open the shoot function of the high dynamic range images of described terminal, otherwise, close the shoot function of the high dynamic range images of described terminal.
In this technical scheme, under determining whether terminal is in backlight environment according to current backlight degree, if so, open the shoot function of the high dynamic range images of terminal, thus improve the quality of taking pictures when utilizing front-facing camera to take pictures.If terminal is not under being in backlight environment, illustrates and now do not need the shoot function of the high dynamic range images starting terminal just can get the higher image of quality, then close the shoot function of high dynamic range images, thus the power consumption of terminal can be reduced.
In above-mentioned arbitrary technical scheme, preferably, described second determining unit is specifically for, the backlight probability by preview image described in following formulae discovery: wherein, p (Y=1| σ) represents the described backlight probability of described preview image, σ represents described current backlight degree, α and β is preset parameter, and judge whether described backlight probability is greater than predetermined threshold value, under if so, determining that described terminal is in described backlight environment, otherwise, under determining that described terminal is in non-backlight environment.
In this technical scheme, the backlight probability of preview image can be determined more exactly by above-mentioned formula, and judge whether backlight probability is greater than predetermined threshold value (namely 0.5), if, under then determining that terminal is in backlight environment, otherwise, under determining that terminal is in non-backlight environment, thus improve the accuracy rate of sense terminals whether under backlight environment and reliability.
In technique scheme, preferably, described statistic unit 304 specifically for, gather described preview image Preset Time after add up described brightness histogram.
In this technical scheme, by adding up brightness histogram after the Preset Time gathering preview image, the stability that backlight detects can be ensured.
Preferably, by gathering preview image every frame sampling mode, such as, sampling interval is 1.5 seconds or 45 frames, avoid and under backlight environment, carry out backlight detection and the saltus step continually not carrying out backlight detection under non-backlight environment, namely avoid the situation occurring frequent saltus step in the critical part of backlight environment, thus improve accuracy rate and reliability that terminal carries out backlight detection.And accumulation judgement can be carried out by the multiple current backlight degree detected different time sections, if accumulated result is backlight degree be greater than preset value, under then judging that terminal is in backlight environment, thus avoid the situation occurring frequent saltus step in the critical part of backlight environment further.
Fig. 4 shows the structural representation of terminal according to an embodiment of the invention.
As shown in Figure 4, terminal 400 according to an embodiment of the invention, comprise the imaging control device 300 of the terminal according to any one of technique scheme, therefore, this terminal 400 has the technique effect identical with the imaging control device 300 of the terminal according to any one of technique scheme, does not repeat them here.
Fig. 5 shows the principle schematic of the imaging control device of terminal according to an embodiment of the invention.
As shown in Figure 5, the imaging control device 500 (terminal is mobile phone in this embodiment) of terminal according to an embodiment of the invention, comprise system setup module 502, data acquisition module 504 and scene detection module 506, wherein, backlight scene detection pattern is opened or closed to system setup module 502 for controlling under self-timer mode (self-timer mode refers to that the front-facing camera starting mobile phone is taken), can in default situations for opening.If open backlight scene detection pattern, then the data acquisition module 504 on the right side of dotted line and scene detection module 506 are activated, and namely backlight scene-detection algorithms will be activated.If backlight scene detection pattern is closed, then cancel backlight scene detection function.System setup module 502 can be integrated in the middle of mobile phone camera software, also can directly add among operating system setting.Data acquisition module 504 utilizes the light sensor in mobile phone faceplate front and front-facing camera to gather current environment brightness and the preview image of mobile phone respectively.Scene detection module 506, is the information analyzing and processing in addition got data acquisition module 504, and judges whether mobile phone is in backlight scene according to given threshold value.If it is determined that result is backlight scene, so mobile phone will start HDR function automatically, and user will record the image after a width HDR enhancing after autodyning; If judged result is non-backlight scene, so mobile phone will cut out HDR function automatically, and user only need normally autodyne.
The following detailed description of technical scheme of the present invention:
The front-facing camera of terminal gathers preview image, the brightness histogram of statistics preview image, can say that brightness histogram is the discrete function of one dimension:
p ( S K ) = n k n , k = 0 , 1 , ... , L - 1 Formula (1),
Wherein, S kfor the kth level gray value of preview image, k and L (such as, L is 256) is positive integer, n kbe S for having gray value in multiple pixels of preview image kthe number of pixel, n represents the total quantity of the multiple pixels in preview image, p (S k) represent S kthe estimated probability occurred in a plurality of pixels, therefore, brightness histogram gives the distribution situation of the gray value of preview image, alternatively gives the whole description of the gray value of the multiple pixels in preview image.
Then the average of brightness histogram and standard deviation can be calculated respectively by formula (2) and formula (3):
μ = 1 n Σ i = 1 L - 1 x i Formula (2),
σ = 1 n Σ i = 1 L - 1 ( x i - μ ) Formula (3),
Wherein, μ is the average of brightness histogram, and σ represents the standard deviation of brightness histogram, and n is the total quantity of the multiple pixels in preview image, and L is positive integer, x ifor the number of pixels of the i-th level grey scale value in brightness histogram.
Using the standard deviation sigma of brightness histogram that the calculates current backlight degree as preview image, backlight probability or non-backlight probability finally by following formulae discovery preview figure:
p ( Y = 1 | σ ) = 1 1 + e α × σ + β ,
Wherein, p (Y=1| σ) represents the backlight probability of preview image, and σ represents current backlight degree, and α and β is preset parameter.
Due to backlight probability and non-backlight probability and be 1, therefore, non-backlight probability can be calculated according to the backlight probability calculated.Under finally whether being in backlight environment according to backlight probability or non-backlight probability determination mobile phone, concrete, if backlight probability is greater than 0.5, or non-backlight probability is less than 0.5, then under determining that mobile phone is in backlight environment, otherwise under determining that mobile phone is in non-backlight environment.
More than be described with reference to the accompanying drawings technical scheme of the present invention, when utilizing front-facing camera to take, terminal can have been determined accurately and rapidly whether under backlight environment, thus improve the quality of the image shot under backlight environment.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (11)

1. a filming control method for terminal, is characterized in that, comprising:
When the front-facing camera of terminal gathers preview image, detected the current environment brightness of described terminal by the light sensor of described terminal;
If when detecting that described current environment brightness is greater than default ambient brightness, add up the brightness histogram of described preview image;
The current backlight degree of described terminal is calculated according to described brightness histogram;
The shoot function of the high dynamic range images opening described terminal is determined whether according to described current backlight degree.
2. the filming control method of terminal according to claim 1, is characterized in that, the described step calculating the current backlight degree of described terminal according to described brightness histogram, specifically comprises:
Obtain the number of pixels of each level grey scale value in the multiple level grey scale values in described brightness histogram;
The standard deviation of described brightness histogram is calculated according to the number of pixels of described each level grey scale value, and using described standard deviation as described current backlight degree.
3. the filming control method of terminal according to claim 1, is characterized in that, the described step determining whether the shoot function of the high dynamic range images opening described terminal according to described current backlight degree, specifically comprises:
Under determining whether described terminal is in backlight environment according to described current backlight degree;
If so, the shoot function of the high dynamic range images of described terminal is opened, otherwise, close the shoot function of the high dynamic range images of described terminal.
4. the filming control method of terminal according to claim 3, is characterized in that, describedly determines whether described terminal is in the step under backlight environment, specifically comprises according to described current backlight degree:
Backlight probability by preview image described in following formulae discovery:
p ( Y = 1 | σ ) = 1 1 + e α × σ + β ,
Wherein, p (Y=1 Shu σ) represents the described backlight probability of described preview image, and σ represents described current backlight degree, and α and β is preset parameter; And
Judge whether described backlight probability is greater than predetermined threshold value, under if so, determining that described terminal is in described backlight environment, otherwise, under determining that described terminal is in non-backlight environment.
5. the filming control method of terminal according to any one of claim 1 to 4, is characterized in that, the step of the brightness histogram of the described preview image of described statistics, specifically comprises:
Described brightness histogram is added up after the Preset Time gathering described preview image.
6. an imaging control device for terminal, is characterized in that, comprising:
Detecting unit, for when the front-facing camera of terminal gathers preview image, detects the current environment brightness of described terminal by the light sensor of described terminal;
Statistic unit, if for detecting that described current environment brightness is greater than default ambient brightness time, add up the brightness histogram of described preview image;
Computing unit, for calculating the current backlight degree of described terminal according to described brightness histogram;
Control unit, for determining whether the shoot function of the high dynamic range images opening described terminal according to described current backlight degree.
7. the imaging control device of terminal according to claim 6, is characterized in that, described computing unit comprises:
Acquiring unit, for obtaining the number of pixels of each level grey scale value in the multiple level grey scale values in described brightness histogram;
First determining unit, for calculating the standard deviation of described brightness histogram, and using described standard deviation as described current backlight degree according to the number of pixels of described each level grey scale value.
8. the imaging control device of terminal according to claim 6, is characterized in that, described control unit comprises:
According to described current backlight degree, second determining unit, under determining whether described terminal is in backlight environment;
Described control unit specifically for, if so, open the shoot function of the high dynamic range images of described terminal, otherwise, close the shoot function of the high dynamic range images of described terminal.
9. the imaging control device of terminal according to claim 8, is characterized in that, described second determining unit specifically for,
Backlight probability by preview image described in following formulae discovery:
p ( Y = 1 | σ ) = 1 1 + e α × σ + β ,
Wherein, p (Y=1 Shu σ) represents the described backlight probability of described preview image, and σ represents described current backlight degree, and α and β is preset parameter, and
Judge whether described backlight probability is greater than predetermined threshold value, under if so, determining that described terminal is in described backlight environment, otherwise, under determining that described terminal is in non-backlight environment.
10. the imaging control device of the terminal according to any one of claim 6 to 9, is characterized in that, described statistic unit specifically for,
Described brightness histogram is added up after the Preset Time gathering described preview image.
11. 1 kinds of terminals, is characterized in that, comprising: the imaging control device of the terminal according to any one of claim 6 to 10.
CN201510685833.0A 2015-10-20 2015-10-20 The filming control method of terminal, the imaging control device of terminal and terminal Pending CN105227843A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510685833.0A CN105227843A (en) 2015-10-20 2015-10-20 The filming control method of terminal, the imaging control device of terminal and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510685833.0A CN105227843A (en) 2015-10-20 2015-10-20 The filming control method of terminal, the imaging control device of terminal and terminal

Publications (1)

Publication Number Publication Date
CN105227843A true CN105227843A (en) 2016-01-06

Family

ID=54996494

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510685833.0A Pending CN105227843A (en) 2015-10-20 2015-10-20 The filming control method of terminal, the imaging control device of terminal and terminal

Country Status (1)

Country Link
CN (1) CN105227843A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105872399A (en) * 2016-04-19 2016-08-17 奇酷互联网络科技(深圳)有限公司 Backlighting detection method and system
CN107395978A (en) * 2017-08-14 2017-11-24 维沃移动通信有限公司 The control method and mobile terminal of a kind of camera module
WO2017215527A1 (en) * 2016-06-15 2017-12-21 深圳市万普拉斯科技有限公司 Hdr scenario detection method, device, and computer storage medium
CN107888840A (en) * 2017-10-30 2018-04-06 广东欧珀移动通信有限公司 High-dynamic-range image acquisition method and device
CN108174125A (en) * 2018-01-23 2018-06-15 奇酷互联网络科技(深圳)有限公司 Control the method, apparatus and electronic equipment of HDR functions
CN108322669A (en) * 2018-03-06 2018-07-24 广东欧珀移动通信有限公司 The acquisition methods and device of image, imaging device, computer readable storage medium and computer equipment
CN111031254A (en) * 2020-01-15 2020-04-17 浙江大华技术股份有限公司 Camera mode switching method and device, computer device and readable storage medium
CN111770264A (en) * 2020-06-04 2020-10-13 深圳明心科技有限公司 Method and device for improving imaging effect of camera module and camera module
CN112261306A (en) * 2020-09-27 2021-01-22 厦门亿联网络技术股份有限公司 Backlight judgment method, device, equipment and storage medium
CN112312001A (en) * 2019-07-30 2021-02-02 北京百度网讯科技有限公司 Image detection method, device, equipment and computer storage medium
CN113422908A (en) * 2021-07-01 2021-09-21 联想(北京)有限公司 Data processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100110226A1 (en) * 2008-11-04 2010-05-06 Texas Instruments Incorporated Method and apparatus for detecting type of back light of an image
CN102542552A (en) * 2010-12-21 2012-07-04 北京汉王智通科技有限公司 Frontlighting and backlighting judgment of video images and detection method of shooting time
CN103841324A (en) * 2014-02-20 2014-06-04 小米科技有限责任公司 Shooting processing method and device and terminal device
CN103905737A (en) * 2012-12-25 2014-07-02 联想(北京)有限公司 Backlight detection method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100110226A1 (en) * 2008-11-04 2010-05-06 Texas Instruments Incorporated Method and apparatus for detecting type of back light of an image
CN102542552A (en) * 2010-12-21 2012-07-04 北京汉王智通科技有限公司 Frontlighting and backlighting judgment of video images and detection method of shooting time
CN103905737A (en) * 2012-12-25 2014-07-02 联想(北京)有限公司 Backlight detection method and device
CN103841324A (en) * 2014-02-20 2014-06-04 小米科技有限责任公司 Shooting processing method and device and terminal device

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105872399B (en) * 2016-04-19 2019-10-08 奇酷互联网络科技(深圳)有限公司 Backlighting detecting and backlight detection system
CN105872399A (en) * 2016-04-19 2016-08-17 奇酷互联网络科技(深圳)有限公司 Backlighting detection method and system
WO2017215527A1 (en) * 2016-06-15 2017-12-21 深圳市万普拉斯科技有限公司 Hdr scenario detection method, device, and computer storage medium
CN107395978A (en) * 2017-08-14 2017-11-24 维沃移动通信有限公司 The control method and mobile terminal of a kind of camera module
CN107888840A (en) * 2017-10-30 2018-04-06 广东欧珀移动通信有限公司 High-dynamic-range image acquisition method and device
CN107888840B (en) * 2017-10-30 2019-10-15 Oppo广东移动通信有限公司 High-dynamic-range image acquisition method and device
CN108174125B (en) * 2018-01-23 2020-12-25 奇酷互联网络科技(深圳)有限公司 Method, device, electronic equipment and storage medium for controlling HDR function
CN108174125A (en) * 2018-01-23 2018-06-15 奇酷互联网络科技(深圳)有限公司 Control the method, apparatus and electronic equipment of HDR functions
CN108322669A (en) * 2018-03-06 2018-07-24 广东欧珀移动通信有限公司 The acquisition methods and device of image, imaging device, computer readable storage medium and computer equipment
CN108322669B (en) * 2018-03-06 2021-03-23 Oppo广东移动通信有限公司 Image acquisition method and apparatus, imaging apparatus, and readable storage medium
CN112312001A (en) * 2019-07-30 2021-02-02 北京百度网讯科技有限公司 Image detection method, device, equipment and computer storage medium
CN112312001B (en) * 2019-07-30 2022-08-23 阿波罗智能技术(北京)有限公司 Image detection method, device, equipment and computer storage medium
CN111031254B (en) * 2020-01-15 2021-02-26 浙江大华技术股份有限公司 Camera mode switching method and device, computer device and readable storage medium
CN111031254A (en) * 2020-01-15 2020-04-17 浙江大华技术股份有限公司 Camera mode switching method and device, computer device and readable storage medium
CN111770264A (en) * 2020-06-04 2020-10-13 深圳明心科技有限公司 Method and device for improving imaging effect of camera module and camera module
CN111770264B (en) * 2020-06-04 2022-04-08 深圳明心科技有限公司 Method and device for improving imaging effect of camera module and camera module
CN112261306A (en) * 2020-09-27 2021-01-22 厦门亿联网络技术股份有限公司 Backlight judgment method, device, equipment and storage medium
CN112261306B (en) * 2020-09-27 2021-10-08 厦门亿联网络技术股份有限公司 Backlight judgment method, device, equipment and storage medium
CN113422908A (en) * 2021-07-01 2021-09-21 联想(北京)有限公司 Data processing method and device

Similar Documents

Publication Publication Date Title
CN105227843A (en) The filming control method of terminal, the imaging control device of terminal and terminal
CN105049743B (en) Backlighting detecting, backlight detection system, photographing device and terminal
CN101127835B (en) A pre-processing method and device for improving video image quality of digital video camera
CN105100632B (en) The method of adjustment and device of imaging device automatic exposure, imaging device
CN105450932B (en) Backlight photographic method and device
CN109005366A (en) Camera module night scene image pickup processing method, device, electronic equipment and storage medium
US20070104475A1 (en) Backlight compensation using threshold detection
CN103905737A (en) Backlight detection method and device
CN101848327B (en) Image capturing device and image processing method
WO2018228310A1 (en) Image processing method and apparatus, and terminal
CN105872399B (en) Backlighting detecting and backlight detection system
CN103702111B (en) A kind of method detecting camera video color cast
CN107087118B (en) Photographic method, device, storage medium and terminal
CN105611140A (en) Photographing control method, photographing control device and terminal
CN102542552B (en) Frontlighting and backlighting judgment method of video images and detection method of shooting time
CN109302566A (en) A kind of method, apparatus and terminal device of determining screening-mode
WO2023005827A1 (en) Exposure compensation method and apparatus, and electronic device
US20100328488A1 (en) Apparatus, methods and computer readable storage mediums
Hertel et al. Image quality standards in automotive vision applications
CN104954627B (en) A kind of information processing method and electronic equipment
CN109068060B (en) Image processing method and device, terminal device and computer readable storage medium
CN113177886B (en) Image processing method, device, computer equipment and readable storage medium
CN101685240B (en) Method for judging focusing quality of image extracting device
CN113112495A (en) Abnormal image processing method and device, thermal imaging equipment and storage medium
van Beek Improved image selection for stack-based hdr imaging

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160106

RJ01 Rejection of invention patent application after publication