CN105827902B - A kind of night scene detection method and terminal - Google Patents
A kind of night scene detection method and terminal Download PDFInfo
- Publication number
- CN105827902B CN105827902B CN201510350965.8A CN201510350965A CN105827902B CN 105827902 B CN105827902 B CN 105827902B CN 201510350965 A CN201510350965 A CN 201510350965A CN 105827902 B CN105827902 B CN 105827902B
- Authority
- CN
- China
- Prior art keywords
- iso
- night scene
- terminal
- exposure
- ratio
- 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.)
- Active
Links
Landscapes
- Studio Devices (AREA)
- Image Analysis (AREA)
Abstract
The present invention provides a kind of night scene detection method and terminal, is related to field of terminal technology, to solve the problems, such as that terminal accurately can not detect night scene and invent in the prior art.The night scene detection method includes: multiple environmental parameters in the shooting preview image for obtain terminal;According to the multiple environmental parameter, determine that environment locating for the terminal is night scene.The solution of the present invention, can determine that environment locating for the terminal is night scene according to multiple environmental parameters in the shooting preview image of terminal, compared to the prior art in by single environment parameter carry out night scene detection method, the probability for occurring judging by accident is reduced, the accuracy of night scene detection is improved.
Description
Technical field
The present invention relates to field of terminal technology, more particularly to a kind of night scene detection method and terminal.
Background technique
It carries out often night scene being needed to detect in shooting process in such as mobile phone camera, and night scene detection is actually
Dark situation detection, with to detecting it is that the scene of dark situation carries out noise reduction and luminance raising, so as to the dark situation the case where
Under shoot brightness suitably and can record the nearly all details of current scene and the image that noise is less.
Currently, during carrying out night scene detection to scene, it can be determined that the element of night scene condition includes intensity histogram
Figure, exposure gain Exposure Gain (ISO value) and time for exposure Exposure Time.Specifically, when straight by gray scale
When side's figure carries out night scene detection, a gray threshold is mainly defined, calculates the pixel that gray value is less than the gray threshold
Number account for total pixel number ratio, if the ratio be greater than a preset threshold, judgement be night scene.When passing through
Exposure Gain and Exposure Time carry out night scene detection when, if Exposure Gain and Exposure Time compared with
Hour, belong to bright ring border, and when Exposure Gain and Exposure Time are larger, belong to dark situation.Or it first passes through
Exposure Gain and Exposure Time filter out brighter scene, and grey level histogram is recycled to carry out night scene detection.
But current night scene detection method is easy to appear and largely judges by accident.For example, some clap under night scene environment
The photo taken the photograph, but ISO=100, Exposure Time=0.01, this is typical bright environmental condition, but due to alignment lens night
A brighter luminous object shooting under scape environment, so that judging by accident.Likewise, alignment lens are pure under bright ring border
Black object is shot, and may be mistaken for being dark situation according to current night scene detection method.
Summary of the invention
The purpose of the present invention is to provide a kind of night scene detection method and terminals, and for solving, terminal can not in the prior art
The technical issues of accurate detection night scene, to improve the accuracy of night scene detection.
In order to achieve the above purpose, the present invention provides a kind of night scene detection method, comprising:
Obtain multiple environmental parameters in the shooting preview image of terminal;
According to the multiple environmental parameter, determine that environment locating for the terminal is night scene.
The present invention also provides a kind of terminals, comprising:
Obtain module, multiple environmental parameters in shooting preview image for obtaining terminal;
First determining module, for determining that environment locating for the terminal is night scene according to the multiple environmental parameter.
Above-mentioned technical proposal through the invention, the beneficial effects of the present invention are:
The night scene detection method and terminal of the embodiment of the present invention are joined according to multiple environment in the shooting preview image of terminal
Number, determine that environment locating for the terminal is night scene, compared to the prior art in by single environment parameter carry out night scene inspection
Survey method reduces the probability for occurring judging by accident, improves the accuracy of night scene detection.
Detailed description of the invention
Fig. 1 shows the flow charts of the night scene detection method of the embodiment of the present invention.
Fig. 2 indicates the flow chart that night scene detection is carried out to shooting preview image A of the preferred embodiment of the present invention.
Fig. 3 indicates the structural schematic diagram of the terminal of the embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing to specific reality
Example is applied to be described in detail.
First embodiment
Shown in Figure 1, the embodiment of the present invention provides a kind of night scene detection method, is used for a terminal, the night scene detection
Method includes:
S101: multiple environmental parameters in the shooting preview image of terminal are obtained;
S102: according to the multiple environmental parameter, determine that environment locating for the terminal is night scene.
Night scene detection method through the embodiment of the present invention is joined according to multiple environment in the shooting preview image of terminal
Number, determine that environment locating for the terminal is night scene, compared to the prior art in by single environment parameter carry out night scene inspection
Survey method reduces the probability for occurring judging by accident, improves the accuracy of night scene detection.
Second embodiment
Currently judge that the environmental parameter of night scene condition includes exposure parameter and grey level histogram, the embodiment of the present invention also mentions
For a kind of night scene detection method, comprising:
S1011 obtains exposure parameter and grey level histogram in the shooting preview image of terminal;
S1012, according to the corresponding relationship between preset exposure parameter, gray threshold and proportion threshold value, described in acquisition
The first gray threshold corresponding with the exposure parameter of preview image and the first proportion threshold value;
S1013 obtains the number that gray value is less than the pixel of first gray threshold according to the grey level histogram
With the ratio of the number of total pixel of the preview image;
S1021 determines that environment locating for the terminal is night scene according to the ratio and the first proportion threshold value.
In the specific embodiment of the invention, if the ratio be more than or equal to first proportion threshold value, determine described in
Environment locating for terminal is night scene.
In this way, by the shooting preview image of terminal exposure parameter and grey level histogram be combined together, and according to pre-
If exposure parameter, the corresponding relationship between gray threshold and proportion threshold value, environment locating for the terminal is judged,
Improve the accuracy of night scene detection.
In this embodiment, in the first gray threshold corresponding with the exposure parameter for obtaining the preview image and the
When one proportion threshold value, mainly according to the corresponding relationship between preset exposure parameter, gray threshold and proportion threshold value, utilize
What interpolation algorithm obtained.
Wherein, there are many kinds of interpolation algorithms, for example, linear difference algorithm, quadratic interpolation algorithm etc., different interpolation algorithms
The precision that may be implemented is different, and time efficiency when operation is also different.Selection for different interpolation algorithms, root
According to current demand, according to the requirement of logarithm precision and time efficiency.
In the specific embodiment of the invention, the interpolation algorithm is preferably linear interpolation algorithm.
In practical application, the exposure parameter may include exposure gain and time for exposure.
And when the interpolation algorithm is linear interpolation algorithm, it is described obtaining the preview image with the exposure gain
The step of the first gray threshold corresponding with the time for exposure includes:
Calculate the preview image according to linear interpolation algorithm formula (1) with the exposure gain ISO and time for exposure T
Corresponding first gray threshold N;
Wherein, formula (1) are as follows: N=N1﹢ (L1÷L)×△N;
(ISO, T) is regarded into as the coordinate of any on two-dimensional surface, and (ISO1, T1) and (ISO2, T2) it is described two
Coordinate on dimensional plane with coordinate (ISO, T) apart from nearest two o'clock;
L is (ISO1, T1) and (ISO2, T2The distance between), L1For (ISO1, T1The distance between) and (ISO, T), and
ISO1< ISO2, N1For with (ISO1, T1) corresponding gray threshold, △ N is and (ISO1, T1) corresponding gray threshold N1With with
(ISO2, T2) corresponding gray threshold N2Difference.
It is described obtaining the preview image with the exposure meanwhile when the interpolation algorithm is linear interpolation algorithm
The step of gain and time for exposure corresponding first proportion threshold value includes:
Calculate the preview image according to linear interpolation algorithm formula (2) with the exposure gain ISO and time for exposure T
Corresponding first proportion threshold value Ratio;
Wherein, formula (2) are as follows: Ratio=Ratio1﹢ (L1÷L)×△Ratio;
(ISO, T) is regarded into as the coordinate of any on two-dimensional surface, and (ISO1, T1) and (ISO2, T2) it is described two
Coordinate on dimensional plane with coordinate (ISO, T) apart from nearest two o'clock;
L is (ISO1, T1) and (ISO2, T2The distance between), L1For (ISO1, T1The distance between) and (ISO, T), and
ISO1< ISO2, Ratio1For with (ISO1, T1) corresponding proportion threshold value, △ Ratio is and (ISO1, T1) corresponding proportion threshold value
Ratio1With with (ISO2, T2) corresponding proportion threshold value Ratio2Difference.
In this way, using linear interpolation algorithm can be quick calculate the preview image with the exposure gain and
Time for exposure corresponding first gray threshold and the first proportion threshold value.
In the following, being described in detail by a specific embodiment to linear interpolation algorithm of the invention.
It is assumed that the range of the exposure gain ISO of a terminal is: 100-4000;The range of time for exposure T is: 0.01S-
0.1S;
Using linear interpolation algorithm, need through above-mentioned two parameter value calculation distance, but the value of above-mentioned two groups of numerical value
Not on the same order of magnitude, using its calculating apart from when, it may appear that a parameter occupies leading position, and another parameter
Almost situation like water off a duck's back, so, in practical applications, first the value of above-mentioned parameter can be handled, such as ISO value is all
Range is obtained divided by 40: 2.5-100, while time for exposure T obtains range multiplied by 1000 that: 10-100 is at same number
Magnitude, recycling linear interpolation algorithm, parameter value is calculated accordingly to treated.
Again it is assumed that treated exposure gain ISO and time for exposure T, gray threshold N and ratio with corresponding preview image
Preset corresponding relationship such as the following table 1 between threshold value Ratio:
ISO | T | Ratio | N | Night scene rank |
10 | 10 | 0.1 | 10 | 1 |
20 | 20 | 0.2 | 20 | 2 |
30 | 30 | 0.3 | 30 | 3 |
40 | 40 | 0.4 | 40 | 4 |
50 | 50 | 0.5 | 50 | 5 |
60 | 60 | 0.6 | 60 | 6 |
70 | 70 | 0.7 | 70 | 7 |
80 | 80 | 0.8 | 80 | 8 |
Table 1
In this way, working as, the exposure gain ISO in the shooting preview image of the terminal obtained is 1280 and time for exposure T is
When 0.058, first the two numerical value are handled, corresponding with above table, i.e., treated, and ISO is 32, and T is 58;
(ISO, T) is regarded as to the coordinate of any on two-dimensional surface, that is, 8 groups of numerical value (10,10) ... are listed in table 1,
(80,80), and the numerical value of acquired preview image is (32,58);Then, (32,58) to (10,10) are calculated separately out ...
The distance value Distance1 ..., Distance8 of (80,80);
The size of these distance values of multilevel iudge again obtains two the smallest distance values, it is assumed that be Distance4 and
Distance5, then two nearest points of distance (32,58) are (40,40) and (50,50), it can are approximately considered (32,58) position
Between (40,40) and (50,50);
The distance between (40,40) and (50,50) L, the distance between (32,58) and (40,40) L are calculated again1, (32,
And the distance between (50,50) L 58)2;
Assume that L is 100, L again1It is 60, L2It is 40, so that it may be found out using formula (1) and formula (2) corresponding with (32,58)
N and Ratio;
Specifically, N=40 ﹢ (60 ÷ 100) × 10=46;
Ratio=0.4 ﹢ (60 ÷ 100) × 0.1=0.46.
3rd embodiment
Under actual conditions, night scene environment is that distinguishing, different night scene environment can correspond to different gray thresholds, is obtained
Preview image be also different.Better treatment effect in order to obtain, the embodiment of the present invention also provide a kind of night scene detection side
Method, comprising:
S301 obtains multiple environmental parameters in the shooting preview image of terminal;
S302 determines that environment locating for the terminal is night scene according to the multiple environmental parameter;
S303 determines the night scene rank of environment locating for the terminal according to a default night scene level relation;Wherein, institute
State the corresponding relationship that default night scene level relation includes: default gray threshold Yu night scene rank.
In the embodiment, S301 and S302 can also be realized using all steps in above-mentioned second embodiment;S303
May include:
Default gray threshold in S3031, first gray threshold and the default night scene level relation;
S3032, if first gray threshold is greater than the first default gray threshold and is less than or equal to the second default ash
Threshold value is spent, determines that the night scene rank of environment locating for the terminal is the corresponding night scene rank of the second default gray threshold.
Wherein, the default night scene level relation can be found in shown in table 2:
ISO | T | Ratio | N | Night scene rank |
ISO_1 | T_1 | R_1 | N_1 | 1 |
ISO_2 | T_2 | R_2 | N_2 | 2 |
ISO_3 | T_3 | R_3 | N_3 | 3 |
ISO_4 | T_4 | R_4 | N_4 | 4 |
ISO_5 | T_5 | R_5 | N_5 | 5 |
ISO_6 | T_6 | R_6 | N_6 | 6 |
ISO_7 | T_7 | R_7 | N_7 | 7 |
ISO_8 | T_8 | R_8 | N_8 | 8 |
Table 2
When first gray threshold of acquisition is N, the night scene rank of environment locating for terminal in order to obtain, it is necessary to
Compare the default gray threshold N_1 ... N_8 in the first gray threshold N and the default night scene level relation.
Specifically, night scene rank is 1 as N≤N_1, as N_1 < N≤N_2, night scene rank is 2 ... ..., works as N_7
When < N≤N_8, night scene rank is 8.
In the following, the present invention is described in detail with a preferred embodiment.Pair of Fig. 2 expression preferred embodiment of the present invention
Shooting preview image A carry out night scene detection flow chart, it is shown in Figure 2, the process the following steps are included:
S201: shooting preview image A is obtained;
S202: the exposure gain ISO of the preview image A is obtained0With time for exposure T0, while obtaining the intensity histogram of A
Figure;
S203: according between preset exposure gain ISO, time for exposure T, gray threshold N and proportion threshold value Ratio
Corresponding relationship is calculated and ISO using linear interpolation algorithm0And T0Corresponding N0And Ratio0;
S204: according to the grey level histogram, gray value < N is obtained0Pixel number Cn and the preview image A
Total pixel number C ratio R atioBelowN, i.e. RatioBelowN=Cn ÷ C;
S205: judge the Ratio0Whether RatioBelowN is more than or equal to;
S206: if RatioBelowN >=Ratio0, it is determined that the preview image A is in night scene environment;
S207: if RatioBelowN < Ratio0, it is determined that the preview image A is in bright ring border;
S208: when A is in night scene environment, compare N0With the default gray threshold in default night scene level relation, with true
Determine night scene rank locating for A.
In this way, night scene detection method through the embodiment of the present invention, can not only reduce night scene detection occur judging by accident it is several
Rate improves the accuracy of night scene detection, additionally it is possible to according to default night scene level relation, obtain night scene locating for current night scene environment
Rank, so that different degrees of night scene can obtain preferable treatment effect.
As shown in figure 3, the embodiment of the present invention also provides a kind of terminal, institute corresponding with night scene detection method shown in FIG. 1
Stating terminal includes:
Obtain module 31, multiple environmental parameters in shooting preview image for obtaining terminal;
First determining module 32, for determining that environment locating for the terminal is night scene according to the multiple environmental parameter.
Terminal through the embodiment of the present invention is determined according to multiple environmental parameters in the shooting preview image of terminal
Environment locating for the terminal is night scene, compared to the prior art in by single environment parameter carry out night scene detection method, drop
Low there is the probability judged by accident, improves the accuracy of night scene detection.
Specifically, currently judging that the environmental parameter of night scene condition includes exposure parameter and grey level histogram, in the present invention
In embodiment, the exposure parameter and gray scale of the preview image for obtaining the terminal that module is in environment specifically for acquisition are straight
Fang Tu.
And first determining module includes:
First acquisition submodule, for according to the correspondence between preset exposure parameter, gray threshold and proportion threshold value
Relationship obtains the first gray threshold corresponding with the exposure parameter and the first proportion threshold value of the preview image;
Second acquisition submodule, for obtaining gray value and being less than first gray threshold according to the grey level histogram
Pixel number and the preview image total pixel number ratio;
First determines submodule, for determining environment locating for the terminal according to the ratio and the first proportion threshold value
It is night scene.
Also, described first determines that submodule is specifically used for being more than or equal to first proportion threshold value when the ratio
When, determine that environment locating for the terminal is night scene.
In this way, the exposure parameter of the preview image of the terminal in environment and grey level histogram are combined together, and
According to the corresponding relationship between preset exposure parameter, gray threshold and proportion threshold value, to environment locating for the terminal into
Row judgement, improves the accuracy of night scene detection.
In the specific embodiment of the invention, first acquisition submodule is specifically used for according to preset exposure parameter, ash
The corresponding relationship between threshold value and proportion threshold value is spent, using interpolation algorithm, obtains joining with the exposure for the preview image
Corresponding first gray threshold of number and the first proportion threshold value.
Wherein, in the prior art, there are many kinds of interpolation algorithms, such as linear difference algorithm, quadratic interpolation algorithm etc., it is different
The precision that may be implemented of interpolation algorithm be different, time efficiency when operation is also different.For different interpolation algorithms
Selection, be according to current demand, according to the requirement of logarithm precision and time efficiency.
In the specific embodiment of the invention, the interpolation algorithm is preferably linear interpolation algorithm.
In practical application, the exposure parameter includes exposure gain and time for exposure.
And first acquisition submodule includes:
First computational submodule, for calculating the preview image with the exposure according to linear interpolation algorithm formula (1)
The corresponding first gray threshold N of gain of light ISO and time for exposure T;
Wherein, formula (1) are as follows: N=N1﹢ (L1÷L)×△N;
(ISO, T) is regarded into as the coordinate of any on two-dimensional surface, and (ISO1, T1) and (ISO2, T2) it is described two
Coordinate on dimensional plane with coordinate (ISO, T) apart from nearest two o'clock;
L is (ISO1, T1) and (ISO2, T2The distance between), L1For (ISO1, T1The distance between) and (ISO, T), and
ISO1< ISO2, N1For with (ISO1, T1) corresponding gray threshold, △ to for (ISO1, T1) corresponding gray threshold N1With with
(ISO2, T2) corresponding gray threshold N2Difference.
And first acquisition submodule further include:
Second computational submodule, for calculating the preview image with the exposure according to linear interpolation algorithm formula (2)
The corresponding first proportion threshold value Ratio of gain of light ISO and time for exposure T;
Wherein, formula (2) are as follows: Ratio=Ratio1﹢ (L1÷L)×△Ratio;
(ISO, T) is regarded into as the coordinate of any on two-dimensional surface, and (ISO1, T1) and (ISO2, T2) it is described two
Coordinate on dimensional plane with coordinate (ISO, T) apart from nearest two o'clock;
L is (ISO1, T1) and (ISO2, T2The distance between), L1For (ISO1, T1The distance between) and (ISO, T), and
ISO1< ISO2, Ratio1For with (ISO1, T1) corresponding proportion threshold value, △ Ratio is and (ISO1, T1) corresponding proportion threshold value
Ratio1With with (ISO2, T2) corresponding proportion threshold value Ratio2Difference.
In this way, using linear interpolation algorithm can be quick calculate the preview image with the exposure gain and
Time for exposure corresponding first gray threshold and the first proportion threshold value.
Under actual conditions, night scene environment is that distinguishing, different night scene environment can correspond to different gray thresholds, is obtained
Preview image be also different.
Better treatment effect in order to obtain, the terminal of the specific embodiment of the invention further include:
Second determining module, for determining the night scene of environment locating for the terminal according to a default night scene level relation
Rank;Wherein, the default night scene level relation includes: the corresponding relationship of default gray threshold Yu night scene rank.
Also, second determining module includes:
Comparative sub-module, for the default gray scale in first gray threshold and the default night scene level relation
Threshold value;
Second determines submodule, for when first gray threshold is greater than the first default gray threshold and is less than or waits
When the second default gray threshold, determine that the night scene rank of environment locating for the terminal is that the second default gray threshold is corresponding
Night scene rank.
Terminal of the invention can be the mobile terminal that mobile phone etc. has photographing module, and the embodiment of the terminal can not only
It enough reduces night scene detection and the probability judged by accident occurs, improve the accuracy of night scene detection, additionally it is possible to according to default night scene level relation,
Night scene rank locating for current night scene environment is obtained, so that different degrees of night scene can obtain preferable treatment effect.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.
Claims (14)
1. a kind of night scene detection method characterized by comprising
Obtain multiple environmental parameters in the shooting preview image of terminal;
According to the multiple environmental parameter, determine that environment locating for the terminal is night scene;
Wherein, it is described obtain terminal shooting preview image in multiple environmental parameters the step of include:
Obtain the exposure parameter and grey level histogram in the shooting preview image of terminal;
It is described according to the multiple environmental parameter, determine that the step of environment locating for the terminal is night scene includes:
According to the corresponding relationship between preset exposure parameter, gray threshold and proportion threshold value, the preview image is obtained
The first gray threshold corresponding with the exposure parameter and the first proportion threshold value;
According to the grey level histogram, number and the preview that gray value is less than the pixel of first gray threshold are obtained
The ratio of the number of total pixel of image;
According to the ratio and the first proportion threshold value, determine that environment locating for the terminal is night scene.
2. night scene detection method according to claim 1, which is characterized in that described according to preset exposure parameter, gray scale
Corresponding relationship between threshold value and proportion threshold value obtains the first gray scale corresponding with the exposure parameter of the preview image
The step of threshold value and the first proportion threshold value includes:
It is obtained according to the corresponding relationship between preset exposure parameter, gray threshold and proportion threshold value using linear interpolation algorithm
Take the first gray threshold corresponding with the exposure parameter and the first proportion threshold value of the preview image.
3. night scene detection method according to claim 2, which is characterized in that the exposure parameter include: exposure gain and
Time for exposure;
The step of first gray threshold corresponding with the exposure gain and time for exposure for obtaining the preview image, wraps
It includes:
The corresponding with the exposure gain ISO and time for exposure T of the preview image is calculated according to linear interpolation algorithm formula (1)
The first gray threshold N;
Wherein, formula (1) are as follows: N=N1﹢ (L1÷L)×△N;
(ISO, T) is regarded into as the coordinate of any on two-dimensional surface, there are the coordinate points of preset quantity on the two-dimensional surface,
The corresponding exposure gain of the coordinate points of the preset quantity and time for exposure, gray threshold and ratio threshold with corresponding preview image
There are preset corresponding relationship, (ISO between value1, T1) and (ISO2, T2) it is in the coordinate points of the preset quantity and coordinate
The coordinate of (ISO, T) apart from nearest two o'clock;
L is (ISO1, T1) and (ISO2, T2The distance between), L1For (ISO1, T1The distance between) and (ISO, T), and ISO1<
ISO2, N1For with (ISO1, T1) corresponding gray threshold, △ N is and (ISO1, T1) corresponding gray threshold N1With with (ISO2, T2)
Corresponding gray threshold N2Difference.
4. night scene detection method according to claim 3, which is characterized in that it is described it is obtaining the preview image with it is described
The step of exposure gain and time for exposure corresponding first proportion threshold value includes:
The corresponding with the exposure gain ISO and time for exposure T of the preview image is calculated according to linear interpolation algorithm formula (2)
The first proportion threshold value Ratio;
Wherein, formula (2) are as follows: Ratio=Ratio1﹢ (L1÷L)×△Ratio;
Ratio1For with (ISO1, T1) corresponding proportion threshold value, △ Ratio is and (ISO1, T1) corresponding proportion threshold value Ratio1
With with (ISO2, T2) corresponding proportion threshold value Ratio2Difference.
5. night scene detection method according to claim 1, which is characterized in that described according to the ratio and the first ratio threshold
Value, determines that the step of environment locating for the terminal is night scene includes:
If the ratio is more than or equal to first proportion threshold value, determine that environment locating for the terminal is night scene.
6. night scene detection method according to claim 5, which is characterized in that it is described according to the multiple environmental parameter, really
After environment locating for the fixed terminal is night scene further include:
According to a default night scene level relation, the night scene rank of environment locating for the terminal is determined;Wherein, the default night scene
Level relation includes: the corresponding relationship of default gray threshold Yu night scene rank.
7. night scene detection method according to claim 6, which is characterized in that it is described according to a default night scene level relation,
The step of determining the night scene rank of environment locating for the terminal include:
Compare the default gray threshold in first gray threshold and the default night scene level relation;
If first gray threshold is greater than the first default gray threshold and is less than or equal to the second default gray threshold, determine
The night scene rank of environment locating for the terminal is the corresponding night scene rank of the second default gray threshold.
8. a kind of terminal characterized by comprising
Obtain module, multiple environmental parameters in shooting preview image for obtaining terminal;
First determining module, for determining that environment locating for the terminal is night scene according to the multiple environmental parameter;
Wherein, the exposure parameter and grey level histogram for obtaining module and being specifically used in the shooting preview image of acquisition terminal;
First determining module includes:
First acquisition submodule, for according to the corresponding relationship between preset exposure parameter, gray threshold and proportion threshold value,
Obtain the first gray threshold corresponding with the exposure parameter and the first proportion threshold value of the preview image;
Second acquisition submodule, for obtaining the picture that gray value is less than first gray threshold according to the grey level histogram
The ratio of the number of total pixel of the number of vegetarian refreshments and the preview image;
First determines submodule, for determining that environment locating for the terminal is night according to the ratio and the first proportion threshold value
Scape.
9. terminal according to claim 8, which is characterized in that first acquisition submodule is specifically used for according to preset
Corresponding relationship between exposure parameter, gray threshold and proportion threshold value obtains the preview image using linear interpolation algorithm
The first gray threshold corresponding with the exposure parameter and the first proportion threshold value.
10. terminal according to claim 9, which is characterized in that when the exposure parameter includes: exposure gain and exposure
Between;First acquisition submodule includes:
First computational submodule, for calculating increasing with the exposure for the preview image according to linear interpolation algorithm formula (1)
The corresponding first gray threshold N of beneficial ISO and time for exposure T;
Wherein, formula (1) are as follows: N=N1﹢ (L1÷L)×△N;
(ISO, T) is regarded into as the coordinate of any on two-dimensional surface, there are the coordinate points of preset quantity on the two-dimensional surface,
The corresponding exposure gain of the coordinate points of the preset quantity and time for exposure, gray threshold and ratio threshold with corresponding preview image
There are preset corresponding relationship, (ISO between value1, T1) and (ISO2, T2) it is in the coordinate points of the preset quantity and coordinate
The coordinate of (ISO, T) apart from nearest two o'clock;
L is (ISO1, T1) and (ISO2, T2The distance between), L1For (ISO1, T1The distance between) and (ISO, T), and ISO1<
ISO2, N1For with (ISO1, T1) corresponding gray threshold, △ N is and (ISO1, T1) corresponding gray threshold N1With with (ISO2, T2)
Corresponding gray threshold N2Difference.
11. terminal according to claim 10, which is characterized in that first acquisition submodule further include:
Second computational submodule, for calculating increasing with the exposure for the preview image according to linear interpolation algorithm formula (2)
The corresponding first proportion threshold value Ratio of beneficial ISO and time for exposure T;
Wherein, formula (2) are as follows: Ratio=Ratio1﹢ (L1÷L)×△Ratio;
Ratio1For with (ISO1, T1) corresponding proportion threshold value, △ Ratio is and (ISO1, T1) corresponding proportion threshold value Ratio1
With with (ISO2, T2) corresponding proportion threshold value Ratio2Difference.
12. terminal according to claim 8, which is characterized in that described first determines that submodule is specifically used for working as the ratio
When value is more than or equal to first proportion threshold value, determine that environment locating for the terminal is night scene.
13. terminal according to claim 12, which is characterized in that further include:
Second determining module, for determining the night scene rank of environment locating for the terminal according to a default night scene level relation;
Wherein, the default night scene level relation includes: the corresponding relationship of default gray threshold Yu night scene rank.
14. terminal according to claim 13, which is characterized in that second determining module includes:
Comparative sub-module, for the default gray scale threshold in first gray threshold and the default night scene level relation
Value;
Second determines submodule, for when first gray threshold is greater than the first default gray threshold and is less than or equal to the
When two default gray thresholds, determine that the night scene rank of environment locating for the terminal is the second default gray threshold corresponding night
Scape rank.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510350965.8A CN105827902B (en) | 2015-06-19 | 2015-06-19 | A kind of night scene detection method and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510350965.8A CN105827902B (en) | 2015-06-19 | 2015-06-19 | A kind of night scene detection method and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105827902A CN105827902A (en) | 2016-08-03 |
CN105827902B true CN105827902B (en) | 2019-01-11 |
Family
ID=56514396
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510350965.8A Active CN105827902B (en) | 2015-06-19 | 2015-06-19 | A kind of night scene detection method and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105827902B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106454099A (en) * | 2016-10-25 | 2017-02-22 | 武汉烽火众智数字技术有限责任公司 | day-night mode switching method of improved video camera |
CN107295255B (en) * | 2017-06-21 | 2020-08-04 | 深圳市万普拉斯科技有限公司 | Shooting mode determining method and device and terminal |
CN108989700B (en) | 2018-08-13 | 2020-05-15 | Oppo广东移动通信有限公司 | Imaging control method, imaging control device, electronic device, and computer-readable storage medium |
CN109062255A (en) * | 2018-08-31 | 2018-12-21 | 深圳市研本品牌设计有限公司 | A kind of night claps unmanned plane and storage medium |
CN115604572B (en) * | 2022-09-02 | 2023-12-01 | 荣耀终端有限公司 | Image acquisition method, electronic device and computer readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101494738A (en) * | 2008-01-22 | 2009-07-29 | 索尼株式会社 | Image capturing apparatus, image processing apparatus and method, and program therefor |
CN101778220A (en) * | 2010-03-01 | 2010-07-14 | 华为终端有限公司 | Method for automatically switching over night scene mode and image pickup device |
CN102457665A (en) * | 2010-11-04 | 2012-05-16 | 佳能株式会社 | Imaging apparatus, imaging system and control method thereof |
CN102547079A (en) * | 2010-12-29 | 2012-07-04 | 株式会社理光 | Night scene light source detection device and method |
CN103945088A (en) * | 2013-01-21 | 2014-07-23 | 华为终端有限公司 | Method and device for scene recognition |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7872670B2 (en) * | 2002-04-22 | 2011-01-18 | Sanyo Electric Co., Ltd. | Camera performing photographing in accordance with photographing mode depending on object scene |
JP5520038B2 (en) * | 2009-12-25 | 2014-06-11 | キヤノン株式会社 | Video processing apparatus and video processing method |
-
2015
- 2015-06-19 CN CN201510350965.8A patent/CN105827902B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101494738A (en) * | 2008-01-22 | 2009-07-29 | 索尼株式会社 | Image capturing apparatus, image processing apparatus and method, and program therefor |
CN101778220A (en) * | 2010-03-01 | 2010-07-14 | 华为终端有限公司 | Method for automatically switching over night scene mode and image pickup device |
CN102457665A (en) * | 2010-11-04 | 2012-05-16 | 佳能株式会社 | Imaging apparatus, imaging system and control method thereof |
CN102547079A (en) * | 2010-12-29 | 2012-07-04 | 株式会社理光 | Night scene light source detection device and method |
CN103945088A (en) * | 2013-01-21 | 2014-07-23 | 华为终端有限公司 | Method and device for scene recognition |
Also Published As
Publication number | Publication date |
---|---|
CN105827902A (en) | 2016-08-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105827902B (en) | A kind of night scene detection method and terminal | |
US10878539B2 (en) | Image-processing method, apparatus and device | |
CN111246051B (en) | Method, device, equipment and storage medium for automatically detecting stripes and inhibiting stripes | |
US20210004952A1 (en) | Method for image processing, non-transitory computer readable storage medium, and electronic device | |
US10063789B2 (en) | Enhanced brightness image acquisition devices and methods | |
US8508606B2 (en) | System and method for deblurring motion blurred images | |
CN108174118B (en) | Image processing method and device and electronic equipment | |
US9600887B2 (en) | Techniques for disparity estimation using camera arrays for high dynamic range imaging | |
US9454805B2 (en) | Method and apparatus for reducing noise of image | |
CN111862195A (en) | Light spot detection method and device, terminal and storage medium | |
CN107395991B (en) | Image synthesis method, image synthesis device, computer-readable storage medium and computer equipment | |
CN101366271A (en) | Automatic flicker correction in an image capture device | |
CN106210532B (en) | One kind is taken pictures processing method and terminal device | |
CN110740266B (en) | Image frame selection method and device, storage medium and electronic equipment | |
JP2016081427A (en) | Image processor, image processing method and program | |
CN109257540B (en) | Photographing correction method of multi-photographing lens group and photographing device | |
CN110121031A (en) | Image-pickup method and device, electronic equipment, computer readable storage medium | |
US20150138076A1 (en) | Communication device and method of processing incoming call by facial image | |
CN111031256B (en) | Image processing method, image processing device, storage medium and electronic equipment | |
CN105957020A (en) | Image generator and image generation method | |
CN107295261B (en) | Image defogging method and device, storage medium and mobile terminal | |
CN115334250B (en) | Image processing method and device and electronic equipment | |
CN111654640A (en) | Exposure adjusting method and device and electronic equipment | |
CN105898156A (en) | Shooting method and system based on reduction of luminance values | |
JP2017135554A (en) | Image processor, image processing method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |