CN105827902A - Night scene detection method and terminal - Google Patents

Night scene detection method and terminal Download PDF

Info

Publication number
CN105827902A
CN105827902A CN201510350965.8A CN201510350965A CN105827902A CN 105827902 A CN105827902 A CN 105827902A CN 201510350965 A CN201510350965 A CN 201510350965A CN 105827902 A CN105827902 A CN 105827902A
Authority
CN
China
Prior art keywords
iso
night scene
gray threshold
terminal
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.)
Granted
Application number
CN201510350965.8A
Other languages
Chinese (zh)
Other versions
CN105827902B (en
Inventor
方超
胡鹏翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201510350965.8A priority Critical patent/CN105827902B/en
Publication of CN105827902A publication Critical patent/CN105827902A/en
Application granted granted Critical
Publication of CN105827902B publication Critical patent/CN105827902B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention provides a night scene detection method and a terminal, relating to the technical field of terminals. The night scene detection method and the terminal are invented for solving the problem that a night scene can not be accurately detected by a terminal in the prior art. The night scene detection method comprises a step of obtaining multiple environment parameters in a shooting preview image of the terminal, and a step of determining whether the environment where the terminal is located is a night scene or not according to the multiple environment parameters. According to the scheme, whether the environment where the terminal is located is the night scene or not can be determined according to the multiple environment parameters in the shooting preview image of the terminal, compared with a night scene detection method based on a single environment parameter in the prior art, the probability of wrong judgment is reduced, and the accuracy of night scene detection is improved.

Description

A kind of night scene detection method and terminal
Technical field
The present invention relates to field of terminal technology, particularly relate to a kind of night scene detection method and terminal.
Background technology
In such as mobile phone camera carries out shooting process, night scene is often needed to detect, and described night scene detection actually dark situation detection, with to detecting it is that the scene of dark situation carries out noise reduction and luminance raising, such that it is able to shoot brightness in the case of dark situation suitably can record nearly all details and the less image of noise of current scene.
Currently, during scene is carried out night scene detection, it can be determined that the element of night scene condition includes grey level histogram, exposure gain ExposureGain (ISO value) and time of exposure ExposureTime.Concrete, when carrying out night scene detection by grey level histogram, mainly one gray threshold of definition, calculate the ratio that gray value accounts for the number of total pixel less than the number of the pixel of described gray threshold, if described ratio is more than a predetermined threshold value, then judge it is night scene.When carrying out night scene detection by ExposureGain and ExposureTime, if ExposureGain and ExposureTime is less, belongs to bright ring border, and when ExposureGain and ExposureTime is bigger, belong to dark situation.Or first pass through ExposureGain and ExposureTime and filter out the scene that comparison is bright, recycling grey level histogram carries out night scene detection.
But, judging by accident largely easily occurs in current night scene detection method.Such as, some photos shot under night scene environment, but ISO=100, ExposureTime=0.01, this is typical bright environmental condition, but due to a brighter luminous object shooting under alignment lens night scene environment, to such an extent as to erroneous judgement occurs.Same, under bright ring border, alignment lens ater object shoots, and may be mistaken for being dark situation according to current night scene detection method.
Summary of the invention
It is an object of the invention to provide a kind of night scene detection method and terminal, cannot accurately detect the technical problem of night scene for solving terminal in prior art, to improve the accuracy of night scene detection.
In order to realize above-mentioned purpose, the present invention provides a kind of night scene detection method, including:
Obtain the multiple ambient parameters in the shooting preview image of terminal;
According to the plurality of ambient parameter, determine that the environment residing for described terminal is night scene.
The present invention also provides for a kind of terminal, including:
Acquisition module, the multiple ambient parameters in the shooting preview image obtaining terminal;
First determines module, for according to the plurality of ambient parameter, determines that the environment residing for described terminal is night scene.
By the technique scheme of the present invention, the beneficial effects of the present invention is:
The night scene detection method of the embodiment of the present invention and terminal, the multiple ambient parameters in shooting preview image according to terminal, determine that the environment residing for described terminal is night scene, compared to the night scene detection method carried out by single environment parameter in prior art, reduce the probability that erroneous judgement occurs, improve the accuracy of night scene detection.
Accompanying drawing explanation
Fig. 1 represents the flow chart of the night scene detection method of the embodiment of the present invention.
Fig. 2 represents the flow chart that shooting preview image A carries out night scene detection of the preferred embodiment of the present invention.
Fig. 3 represents the structural representation of the terminal of the embodiment of the present invention.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearer, below in conjunction with accompanying drawing, specific embodiment is described in detail.
First embodiment
Shown in Figure 1, the embodiment of the present invention provides a kind of night scene detection method, and for a terminal, described night scene detection method includes:
S101: obtain the multiple ambient parameters in the shooting preview image of terminal;
S102: according to the plurality of ambient parameter, determines that the environment residing for described terminal is night scene.
By the night scene detection method of the embodiment of the present invention, the multiple ambient parameters in shooting preview image according to terminal, determine that the environment residing for described terminal is night scene, compared to the night scene detection method carried out by single environment parameter in prior art, reduce the probability that erroneous judgement occurs, improve the accuracy of night scene detection.
Second embodiment
Currently judging that the ambient parameter of night scene condition includes exposure parameter and grey level histogram, the embodiment of the present invention also provides for a kind of night scene detection method, including:
S1011, obtains the exposure parameter in the shooting preview image of terminal and grey level histogram;
S1012, according to the corresponding relation between default exposure parameter, gray threshold and proportion threshold value, obtains first gray threshold corresponding with described exposure parameter and first proportion threshold value of described preview image;
S1013, according to described grey level histogram, acquisition gray value is less than the ratio of the number of the pixel of described first gray threshold and the number of the pixel of the total of described preview image;
S1021, according to described ratio and the first proportion threshold value, determines that the environment residing for described terminal is night scene.
In the specific embodiment of the invention, if described ratio is more than or equal to described first proportion threshold value, determine that the environment residing for described terminal is night scene.
So, exposure parameter in the shooting preview image of terminal and grey level histogram are combined, and according to the corresponding relation between default exposure parameter, gray threshold and proportion threshold value, the environment residing for described terminal is judged, improve the accuracy of night scene detection.
In this embodiment, when obtaining first gray threshold corresponding with described exposure parameter and first proportion threshold value of described preview image, mainly according to the corresponding relation between exposure parameter, gray threshold and the proportion threshold value preset, interpolation algorithm is utilized to obtain.
Wherein, interpolation algorithm has a variety of, such as linear difference algorithm, quadratic interpolation algorithm etc., and the precision that different interpolation algorithms can realize is different, and time efficiency during operation is also different.For the selection of different interpolation algorithms, be according to current demand, according to logarithm value precision and the requirement of time efficiency.
In the specific embodiment of the invention, described interpolation algorithm is preferably linear interpolation algorithm.
In actual application, described exposure parameter can include exposure gain and time of exposure.
And when described interpolation algorithm is linear interpolation algorithm, the step of first gray threshold corresponding with described exposure gain and time of exposure of the described preview image of described acquisition includes:
The first gray threshold N corresponding with described exposure gain ISO and time of exposure T of described preview image is calculated according to linear interpolation algorithm formula (1);
Wherein, formula (1) is: N=N1(L1÷L)×△N;
(ISO, T) is regarded as the coordinate of any on two dimensional surface, and (ISO1, T1) and (ISO2, T2) it is the coordinate of closest with coordinate (ISO, T) on described two dimensional surface 2;
L is (ISO1, T1) and (ISO2, T2Distance between), L1For (ISO1, T1) and (ISO, T) between distance, and ISO1< ISO2, N1For with (ISO1, T1) corresponding gray threshold, △ N is and (ISO1, T1) corresponding gray threshold N1And with (ISO2, T2) corresponding gray threshold N2Difference.
Meanwhile, when described interpolation algorithm is linear interpolation algorithm, the step of first proportion threshold value corresponding with described exposure gain and time of exposure of the described preview image of described acquisition includes:
First proportion threshold value Ratio corresponding with described exposure gain ISO and time of exposure T of described preview image is calculated according to linear interpolation algorithm formula (2);
Wherein, formula (2) is: Ratio=Ratio1(L1÷L)×△Ratio;
(ISO, T) is regarded as the coordinate of any on two dimensional surface, and (ISO1, T1) and (ISO2, T2) it is the coordinate of closest with coordinate (ISO, T) on described two dimensional surface 2;
L is (ISO1, T1) and (ISO2, T2Distance between), L1For (ISO1, T1) and (ISO, T) between distance, and ISO1< ISO2, Ratio1For with (ISO1, T1) corresponding proportion threshold value, △ Ratio is and (ISO1, T1) corresponding proportion threshold value Ratio1And with (ISO2, T2) corresponding proportion threshold value Ratio2Difference.
So, linear interpolation algorithm is utilized just quick can must to calculate first gray threshold corresponding with described exposure gain and time of exposure and first proportion threshold value of described preview image.
Below, by a specific embodiment, the linear interpolation algorithm of the present invention is described in detail.
It is assumed that the scope of the exposure gain ISO of a terminal is: 100-4000;The scope of time of exposure T is: 0.01S-0.1S;
Utilize linear interpolation algorithm, need by above-mentioned two parameter value calculation distance, but the value of above-mentioned two groups of numerical value is not on the same order of magnitude, when utilizing its computed range, there will be a parameter and occupy leading position, and the situation that another parameter is the most like water off a duck's back, so, in actual applications, first the value of above-mentioned parameter can be processed, such as ISO value all obtains scope divided by 40: 2.5-100, time of exposure T is multiplied by 1000 and obtains scope simultaneously: 10-100, it is at the same order of magnitude, parameter value after processing is calculated by recycling linear interpolation algorithm accordingly.
Again it is assumed that the corresponding relation such as table 1 below preset between exposure gain ISO and time of exposure T, and gray threshold N and proportion threshold value Ratio of corresponding preview image after Chu Liing:
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
So, when the exposure gain ISO in the shooting preview image of the terminal obtained is 1280 and time of exposure T is 0.058, first processing the two numerical value, corresponding with above table, the ISO after i.e. processing is 32, and T is 58;
(ISO, T) is regarded the coordinate of any on two dimensional surface as, i.e. table 1 is listed 8 groups of numerical value (10,10) ..., (80,80), and the numerical value of acquired preview image is (32,58);Subsequently, (32,58) to (10,10) are calculated respectively ... the distance value Distance1 of (80,80) ..., Distance8;
The size of these distance values of multilevel iudge again, obtain two minimum distance values, assume it is Distance4 and Distance5, then two points that distance (32,58) is nearest are (40,40) and (50,50), i.e. can be approximately considered (32,58) and be positioned at (40,40) and between (50,50);
Calculate distance L between (40,40) and (50,50) again, distance L between (32,58) and (40,40)1, distance L between (32,58) and (50,50)2
Assume that again L is 100, L1It is 60, L2It is 40, it is possible to utilize formula (1) and formula (2) to obtain N and Ratio corresponding with (32,58);
Concrete, N=40 (60 ÷ 100) × 10=46;
Ratio=0.4 (60 ÷ 100) × 0.1=0.46.
3rd embodiment
Under practical situation, night scene environment is distinguishing, different night scene environment can corresponding different gray threshold, the preview image obtained also is different.In order to obtain more preferable treatment effect, the embodiment of the present invention also provides for a kind of night scene detection method, including:
S301, obtains the multiple ambient parameters in the shooting preview image of terminal;
S302, according to the plurality of ambient parameter, determines that the environment residing for described terminal is night scene;
S303, presets night scene level relation according to one, determines the night scene rank of environment residing for described terminal;Wherein, described default night scene level relation includes: preset the corresponding relation of gray threshold and night scene rank.
In this embodiment, S301 and S302, it would however also be possible to employ realizing in steps in above-mentioned second embodiment;S303 may include that
S3031, relatively described first gray threshold and the default gray threshold in described default night scene level relation;
S3032, if described first gray threshold is preset gray threshold and presets gray threshold less than or equal to second more than first, determines that the night scene rank of the environment residing for described terminal is that this second presets the night scene rank that gray threshold is corresponding.
Wherein, described 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 described first gray threshold obtained is N, in order to obtain the night scene rank of the environment residing for terminal, it is necessary to relatively described first gray threshold N and the default gray threshold N_1 in described default night scene level relation ... N_8.
Concrete, as N≤N_1, night scene rank is 1, and as N_1 < N≤N_2, night scene rank is 2 ..., as N_7 < N≤N_8, night scene rank is 8.
Below, with a preferred embodiment, the present invention is described in detail.Fig. 2 represents the flow chart that shooting preview image A carries out night scene detection of the preferred embodiment of the present invention, and shown in Figure 2, described flow process comprises the following steps:
S201: obtain shooting preview image A;
S202: obtain the exposure gain ISO of described preview image A0With time of exposure T0, obtain the grey level histogram of A simultaneously;
S203: according to default exposure gain ISO, time of exposure T, corresponding relation between gray threshold N and proportion threshold value Ratio, utilize linear interpolation algorithm, be calculated and ISO0And T0Corresponding N0And Ratio0
S204: according to described grey level histogram, obtains gray value < N0Ratio R atioBelowN of number C of total pixel of number Cn and described preview image A of pixel, i.e. RatioBelowN=Cn ÷ C;
S205: judge described Ratio0Whether more than or equal to RatioBelowN;
S206: if RatioBelowN >=Ratio0, it is determined that described preview image A is in night scene environment;
S207: if RatioBelowN is < Ratio0, it is determined that described 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, to determine the night scene rank residing for A.
So, by the night scene detection method of the embodiment of the present invention, night scene detection can not only be reduced the probability of erroneous judgement occurs, improve the accuracy of night scene detection, can also be according to default night scene level relation, obtain the night scene rank residing for current night scene environment so that night scene in various degree can obtain preferable treatment effect.
As it is shown on figure 3, the embodiment of the present invention also provides for a kind of terminal, corresponding with the night scene detection method shown in Fig. 1, described terminal includes:
Acquisition module 31, the multiple ambient parameters in the shooting preview image obtaining terminal;
First determines module 32, for according to the plurality of ambient parameter, determines that the environment residing for described terminal is night scene.
By the terminal of the embodiment of the present invention, the multiple ambient parameters in shooting preview image according to terminal, determine that the environment residing for described terminal is night scene, compared to the night scene detection method carried out by single environment parameter in prior art, reduce the probability that erroneous judgement occurs, improve the accuracy of night scene detection.
Concrete, currently judge that the ambient parameter of night scene condition includes exposure parameter and grey level histogram, in embodiments of the present invention, described acquisition module is specifically for obtaining exposure parameter and the grey level histogram of the preview image of the terminal being in environment.
And described first determines that module includes:
First obtains submodule, for according to the corresponding relation between exposure parameter, gray threshold and the proportion threshold value preset, obtaining first gray threshold corresponding with described exposure parameter and first proportion threshold value of described preview image;
Second obtains submodule, and for according to described grey level histogram, acquisition gray value is less than the ratio of the number of the pixel of described first gray threshold and the number of the pixel of the total of described preview image;
First determines submodule, for according to described ratio and the first proportion threshold value, determines that the environment residing for described terminal is night scene.
Further, described first determines that submodule is specifically for when described ratio is more than or equal to described first proportion threshold value, determining that the environment residing for described terminal is night scene.
So, exposure parameter and the grey level histogram of the preview image of the terminal being in environment are combined, and according to the corresponding relation between default exposure parameter, gray threshold and proportion threshold value, the environment residing for described terminal is judged, improve the accuracy of night scene detection.
In the specific embodiment of the invention, described first obtains submodule specifically for according to the corresponding relation between exposure parameter, gray threshold and the proportion threshold value preset, utilize interpolation algorithm, obtain first gray threshold corresponding with described exposure parameter and first proportion threshold value of described preview image.
Wherein, in prior art, interpolation algorithm has a variety of, such as linear difference algorithm, quadratic interpolation algorithm etc., and the precision that different interpolation algorithms can realize is different, and time efficiency during operation is also different.For the selection of different interpolation algorithms, be according to current demand, according to logarithm value precision and the requirement of time efficiency.
In the specific embodiment of the invention, described interpolation algorithm is preferably linear interpolation algorithm.
In actual application, described exposure parameter includes exposure gain and time of exposure.
And described first obtain submodule include:
First calculating sub module, for calculating the first gray threshold N corresponding with described exposure gain ISO and time of exposure T of described preview image according to linear interpolation algorithm formula (1);
Wherein, formula (1) is: N=N1(L1÷L)×△N;
(ISO, T) is regarded as the coordinate of any on two dimensional surface, and (ISO1, T1) and (ISO2, T2) it is the coordinate of closest with coordinate (ISO, T) on described two dimensional surface 2;
L is (ISO1, T1) and (ISO2, T2Distance between), L1For (ISO1, T1) and (ISO, T) between distance, and ISO1< ISO2, N1For with (ISO1, T1) corresponding gray threshold, △ to for (ISO1, T1) corresponding gray threshold N1And with (ISO2, T2) corresponding gray threshold N2Difference.
And described first obtain submodule also include:
Second calculating sub module, for calculating first proportion threshold value Ratio corresponding with described exposure gain ISO and time of exposure T of described preview image according to linear interpolation algorithm formula (2);
Wherein, formula (2) is: Ratio=Ratio1(L1÷L)×△Ratio;
(ISO, T) is regarded as the coordinate of any on two dimensional surface, and (ISO1, T1) and (ISO2, T2) it is the coordinate of closest with coordinate (ISO, T) on described two dimensional surface 2;
L is (ISO1, T1) and (ISO2, T2Distance between), L1For (ISO1, T1) and (ISO, T) between distance, and ISO1< ISO2, Ratio1For with (ISO1, T1) corresponding proportion threshold value, △ Ratio is and (ISO1, T1) corresponding proportion threshold value Ratio1And with (ISO2, T2) corresponding proportion threshold value Ratio2Difference.
So, linear interpolation algorithm is utilized just quick can must to calculate first gray threshold corresponding with described exposure gain and time of exposure and first proportion threshold value of described preview image.
Under practical situation, night scene environment is distinguishing, different night scene environment can corresponding different gray threshold, the preview image obtained also is different.
In order to obtain more preferable treatment effect, the terminal of the specific embodiment of the invention also includes:
Second determines module, for presetting night scene level relation according to one, determines the night scene rank of environment residing for described terminal;Wherein, described default night scene level relation includes: preset the corresponding relation of gray threshold and night scene rank.
Further, described second determines that module includes:
Comparison sub-module, for relatively described first gray threshold and the default gray threshold in described default night scene level relation;
Second determines submodule, for when described first gray threshold is preset gray threshold and presets gray threshold less than or equal to second more than first, determines that the night scene rank of the environment residing for described terminal is that this second presets the night scene rank that gray threshold is corresponding.
The terminal of the present invention can be the mobile terminal that mobile phone etc. has photographing module, the embodiment of this terminal, night scene detection can not only be reduced the probability of erroneous judgement occurs, improve the accuracy of night scene detection, can also be according to default night scene level relation, obtain the night scene rank residing for current night scene environment so that night scene in various degree can obtain preferable treatment effect.
The above is only the preferred embodiment of the present invention; it should be pointed out that, for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be regarded as protection scope of the present invention.

Claims (18)

1. a night scene detection method, it is characterised in that including:
Obtain the multiple ambient parameters in the shooting preview image of terminal;
According to the plurality of ambient parameter, determine that the environment residing for described terminal is night scene.
Night scene detection method the most according to claim 1, it is characterised in that the step of the multiple ambient parameters in the shooting preview image of described acquisition terminal includes:
Obtain the exposure parameter in the shooting preview image of terminal and grey level histogram.
Night scene detection method the most according to claim 2, it is characterised in that described according to the plurality of ambient parameter, determines that the environment residing for described terminal is that the step of night scene includes:
According to the corresponding relation between default exposure parameter, gray threshold and proportion threshold value, obtain first gray threshold corresponding with described exposure parameter and first proportion threshold value of described preview image;
According to described grey level histogram, acquisition gray value is less than the ratio of the number of the pixel of described first gray threshold and the number of the pixel of the total of described preview image;
According to described ratio and the first proportion threshold value, determine that the environment residing for described terminal is night scene.
Night scene detection method the most according to claim 3, it is characterized in that, corresponding relation between exposure parameter, gray threshold and proportion threshold value that described basis is preset, the step of first gray threshold corresponding with described exposure parameter and the first proportion threshold value that obtain described preview image includes:
According to the corresponding relation between default exposure parameter, gray threshold and proportion threshold value, utilize linear interpolation algorithm, obtain first gray threshold corresponding with described exposure parameter and first proportion threshold value of described preview image.
Night scene detection method the most according to claim 4, it is characterised in that described exposure parameter includes: exposure gain and time of exposure;
The step of first gray threshold corresponding with described exposure gain and time of exposure of the described preview image of described acquisition includes:
The first gray threshold N corresponding with described exposure gain ISO and time of exposure T of described preview image is calculated according to linear interpolation algorithm formula (1);
Wherein, formula (1) is: N=N1(L1÷L)×△N;
(ISO, T) is regarded as the coordinate of any on two dimensional surface, and (ISO1, T1) and (ISO2, T2) it is the coordinate of closest with coordinate (ISO, T) on described two dimensional surface 2;
L is (ISO1, T1) and (ISO2, T2Distance between), L1For (ISO1, T1) and (ISO, T) between distance, and ISO1< ISO2, N1For with (ISO1, T1) corresponding gray threshold, △ N is and (ISO1, T1) corresponding gray threshold N1And with (ISO2, T2) corresponding gray threshold N2Difference.
Night scene detection method the most according to claim 5, it is characterised in that the step of first proportion threshold value corresponding with described exposure gain and time of exposure of the described preview image of described acquisition includes:
First proportion threshold value Ratio corresponding with described exposure gain ISO and time of exposure T of described preview image is calculated according to linear interpolation algorithm formula (2);
Wherein, formula (2) is: Ratio=Ratio1(L1÷L)×△Ratio;
(ISO, T) is regarded as the coordinate of any on two dimensional surface, and (ISO1, T1) and (ISO2, T2) it is the coordinate of closest with coordinate (ISO, T) on described two dimensional surface 2;
L is (ISO1, T1) and (ISO2, T2Distance between), L1For (ISO1, T1) and (ISO, T) between distance, and ISO1< ISO2, Ratio1For with (ISO1, T1) corresponding proportion threshold value, △ Ratio is and (ISO1, T1) corresponding proportion threshold value Ratio1And with (ISO2, T2) corresponding proportion threshold value Ratio2Difference.
Night scene detection method the most according to claim 3, it is characterised in that described according to described ratio with the first proportion threshold value, determines that the environment residing for described terminal is that the step of night scene includes:
If described ratio is more than or equal to described first proportion threshold value, determine that the environment residing for described terminal is night scene.
Night scene detection method the most according to claim 7, it is characterised in that described according to the plurality of ambient parameter, determines that the environment residing for described terminal is also to include after night scene:
Preset night scene level relation according to one, determine the night scene rank of environment residing for described terminal;Wherein, described default night scene level relation includes: preset the corresponding relation of gray threshold and night scene rank.
Night scene detection method the most according to claim 8, it is characterised in that described preset night scene level relation according to one, determines that the step of the night scene rank of the environment residing for described terminal includes:
Relatively described first gray threshold and the default gray threshold in described default night scene level relation;
If described first gray threshold is preset gray threshold and presets gray threshold less than or equal to second more than first, determine that the night scene rank of the environment residing for described terminal is that this second presets the night scene rank that gray threshold is corresponding.
10. a terminal, it is characterised in that including:
Acquisition module, the multiple ambient parameters in the shooting preview image obtaining terminal;
First determines module, for according to the plurality of ambient parameter, determines that the environment residing for described terminal is night scene.
11. terminals according to claim 10, it is characterised in that described acquisition module is specifically for the exposure parameter in the shooting preview image of acquisition terminal and grey level histogram.
12. terminals according to claim 11, it is characterised in that described first determines that module includes:
First obtains submodule, for according to the corresponding relation between exposure parameter, gray threshold and the proportion threshold value preset, obtaining first gray threshold corresponding with described exposure parameter and first proportion threshold value of described preview image;
Second obtains submodule, and for according to described grey level histogram, acquisition gray value is less than the ratio of the number of the pixel of described first gray threshold and the number of the pixel of the total of described preview image;
First determines submodule, for according to described ratio and the first proportion threshold value, determines that the environment residing for described terminal is night scene.
13. terminals according to claim 12, it is characterized in that, described first obtains submodule specifically for according to the corresponding relation between exposure parameter, gray threshold and the proportion threshold value preset, utilize linear interpolation algorithm, obtain first gray threshold corresponding with described exposure parameter and first proportion threshold value of described preview image.
14. terminals according to claim 13, it is characterised in that described exposure parameter includes: exposure gain and time of exposure;Described first obtains submodule includes:
First calculating sub module, for calculating the first gray threshold N corresponding with described exposure gain ISO and time of exposure T of described preview image according to linear interpolation algorithm formula (1);
Wherein, formula (1) is: N=N1(L1÷L)×△N;
(ISO, T) is regarded as the coordinate of any on two dimensional surface, and (ISO1, T1) and (ISO2, T2) it is the coordinate of closest with coordinate (ISO, T) on described two dimensional surface 2;
L is (ISO1, T1) and (ISO2, T2Distance between), L1For (ISO1, T1) and (ISO, T) between distance, and ISO1< ISO2, N1For with (ISO1, T1) corresponding gray threshold, △ N is and (ISO1, T1) corresponding gray threshold N1 and with (ISO2, T2) corresponding gray threshold N2Difference.
15. terminals according to claim 14, it is characterised in that described first obtains submodule also includes:
Second calculating sub module, for calculating first proportion threshold value Ratio corresponding with described exposure gain ISO and time of exposure T of described preview image according to linear interpolation algorithm formula (2);
Wherein, formula (2) is: Ratio=Ratio1(L1÷L)×△Ratio;
(ISO, T) is regarded as the coordinate of any on two dimensional surface, and (ISO1, T1) and (ISO2, T2) it is the coordinate of closest with coordinate (ISO, T) on described two dimensional surface 2;
L is (ISO1, T1) and (ISO2, T2Distance between), L1For (ISO1, T1) and (ISO, T) between distance, and ISO1< ISO2, Ratio1For with (ISO1, T1) corresponding proportion threshold value, △ Ratio is and (ISO1, T1) corresponding proportion threshold value Ratio1And with (ISO2, T2) corresponding proportion threshold value Ratio2Difference.
16. terminals according to claim 12, it is characterised in that described first determines that submodule is specifically for when described ratio is more than or equal to described first proportion threshold value, determining that the environment residing for described terminal is night scene.
17. terminals according to claim 16, it is characterised in that also include:
Second determines module, for presetting night scene level relation according to one, determines the night scene rank of environment residing for described terminal;Wherein, described default night scene level relation includes: preset the corresponding relation of gray threshold and night scene rank.
18. terminals according to claim 17, it is characterised in that described second determines that module includes:
Comparison sub-module, for relatively described first gray threshold and the default gray threshold in described default night scene level relation;
Second determines submodule, for when described first gray threshold is preset gray threshold and presets gray threshold less than or equal to second more than first, determines that the night scene rank of the environment residing for described terminal is that this second presets the night scene rank that gray threshold is corresponding.
CN201510350965.8A 2015-06-19 2015-06-19 A kind of night scene detection method and terminal Active CN105827902B (en)

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 true CN105827902A (en) 2016-08-03
CN105827902B 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)

Cited By (5)

* Cited by examiner, † Cited by third party
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
CN107295255A (en) * 2017-06-21 2017-10-24 深圳市万普拉斯科技有限公司 Determination method, device and the terminal of screening-mode
CN108989700A (en) * 2018-08-13 2018-12-11 Oppo广东移动通信有限公司 Image formation control method, device, electronic equipment and computer readable storage medium
CN109062255A (en) * 2018-08-31 2018-12-21 深圳市研本品牌设计有限公司 A kind of night claps unmanned plane and storage medium
CN115604572A (en) * 2022-09-02 2023-01-13 荣耀终端有限公司(Cn) Image acquisition method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090153695A1 (en) * 2002-04-22 2009-06-18 Sanyo Electric Co., Ltd. Camera performing photographing in accordance with photographing mode depending on object scene
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
US20130300886A1 (en) * 2009-12-25 2013-11-14 Canon Kabushiki Kaisha Video processing apparatus and video processing method
CN103945088A (en) * 2013-01-21 2014-07-23 华为终端有限公司 Method and device for scene recognition

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090153695A1 (en) * 2002-04-22 2009-06-18 Sanyo Electric Co., Ltd. Camera performing photographing in accordance with photographing mode depending on object scene
CN101494738A (en) * 2008-01-22 2009-07-29 索尼株式会社 Image capturing apparatus, image processing apparatus and method, and program therefor
US20130300886A1 (en) * 2009-12-25 2013-11-14 Canon Kabushiki Kaisha Video processing apparatus and video processing method
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

Cited By (7)

* Cited by examiner, † Cited by third party
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
CN107295255A (en) * 2017-06-21 2017-10-24 深圳市万普拉斯科技有限公司 Determination method, device and the terminal of screening-mode
CN108989700A (en) * 2018-08-13 2018-12-11 Oppo广东移动通信有限公司 Image formation control method, device, electronic equipment and computer readable storage medium
US11228720B2 (en) 2018-08-13 2022-01-18 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method for imaging controlling, electronic device, and non-transitory computer-readable storage medium
CN109062255A (en) * 2018-08-31 2018-12-21 深圳市研本品牌设计有限公司 A kind of night claps unmanned plane and storage medium
CN115604572A (en) * 2022-09-02 2023-01-13 荣耀终端有限公司(Cn) Image acquisition method and device
CN115604572B (en) * 2022-09-02 2023-12-01 荣耀终端有限公司 Image acquisition method, electronic device and computer readable storage medium

Also Published As

Publication number Publication date
CN105827902B (en) 2019-01-11

Similar Documents

Publication Publication Date Title
CN105827902A (en) Night scene detection method and terminal
US20210004952A1 (en) Method for image processing, non-transitory computer readable storage medium, and electronic device
CN111028189B (en) Image processing method, device, storage medium and electronic equipment
US8508606B2 (en) System and method for deblurring motion blurred images
CN108322646B (en) Image processing method, image processing device, storage medium and electronic equipment
CN111862195A (en) Light spot detection method and device, terminal and storage medium
CN103297789B (en) White balance correcting method and white balance correcting device
CN107209931B (en) Color correction apparatus and method
US20130162864A1 (en) Capturing apparatus and method of capturing image
CN102369723A (en) Auto exposure method and device, and imaging device
CN105227805A (en) A kind of image processing method and mobile terminal
CN105321191A (en) Method and electronic apparatus for processing reflection in image
CN104125419A (en) Self-adaptive resolution ratio implementing method based on CMOS image sensor
US20150138076A1 (en) Communication device and method of processing incoming call by facial image
JP2016081427A (en) Image processor, image processing method and program
US20120114238A1 (en) Method of performing adaptive contrast enhancement using hyperloic tangent curve and image histogram
US20150271416A1 (en) Information Processing Method and Electronic Device
CN104535178A (en) Light strength value detecting method and terminal
CN102196153A (en) Image scene brightness difference judgment device and brightness difference judgment method
WO2019144262A1 (en) Smudge detection method and apparatus and mobile electronic device
CN107424134B (en) Image processing method, image processing device, computer-readable storage medium and computer equipment
CN111970501A (en) Pure color scene AE color processing method and device, electronic equipment and storage medium
CN108805883B (en) Image segmentation method, image segmentation device and electronic equipment
JP2017135554A (en) Image processor, image processing method, and program
CN116071562A (en) Plant seed identification method and device, electronic equipment and storage medium

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