CN101794371A - Method for adjusting light source threshold value for face recognition - Google Patents
Method for adjusting light source threshold value for face recognition Download PDFInfo
- Publication number
- CN101794371A CN101794371A CN200910003753A CN200910003753A CN101794371A CN 101794371 A CN101794371 A CN 101794371A CN 200910003753 A CN200910003753 A CN 200910003753A CN 200910003753 A CN200910003753 A CN 200910003753A CN 101794371 A CN101794371 A CN 101794371A
- Authority
- CN
- China
- Prior art keywords
- target image
- value
- threshold value
- brightness
- input picture
- 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
Links
Images
Landscapes
- Image Processing (AREA)
Abstract
The invention discloses a method for adjusting a light source threshold value for face recognition, which comprises the following steps of: photographing an input image; calculating a first brightness value of the input image; loading a target image; loading a second brightness value of the target image; comparing the first brightness value with the second brightness image to obtain a brightness difference between the input image and the target image; adjusting a basic threshold according to the brightness difference to obtain a recognition threshold; and performing a face recognition process on the input image by using the recognition threshold value.
Description
Technical field
The present invention relates to a kind of face recognition method, particularly a kind of method of adjustment of light source threshold value of face recognition.
Background technology
In the face recognition technology, user's face only needs behind electronic installation extraction user's face image, can carry out the face recognition program in effective shooting distance of the electronic installation with image abstraction function.
Because face recognition is applied on the electronic installation, is by a series of algorithm of the process of electronic installation and image values result calculated.Electronic installation compare and calculate according to user's input picture and the target image in the memory storage and a numerical value.This numerical value is used for representing the image similarity value of user in face recognition.In addition, in electronic installation, can be provided with a basic threshold value, in order in the face recognition program, to judge the whether standard by identification of image similarity value.
Common user's that electronic installation extracts input picture can be excessive with actual user's face image difference because of the difference of environment light source.Because the external environment light source can have influence on the variation of user face shadow, and make the image similarity value change that calculates excessive.Cause the image similarity value can't conform with the standard of basic threshold value, and allow the user can't be by identification.Therefore the face recognition program of electronic installation is often because of the influence of environment light source, and reduced the effect of identification and allow and bring many inconveniences in user's the operation.
Summary of the invention
In view of above problem, the invention provides a kind of method of adjustment of light source threshold value of face recognition, use under different environment light sources, dynamically adjust the basic threshold value of face recognition.
Therefore, the method for adjustment of the light source threshold value of face recognition disclosed in this invention comprises: take input picture; First brightness value of calculating input image; Be written into target image; Be written into second brightness value of target image; Relatively first brightness value and second brightness value are to obtain the luminance difference value between input picture and the target image; According to the basic threshold value of luminance difference value adjustment to obtain the identification threshold value; And utilize the identification threshold value that input picture is carried out the face recognition program.
Wherein, first brightness value can comprise the average brightness and the luminance standard difference of input picture, and second brightness value can comprise the average brightness and the luminance standard difference of target image.
In addition, the average brightness of input picture can utilize following formula to calculate:
In this calculating formula,
Be the average brightness of input picture, the sum of all pixels that N is input picture, i pixel, the x that i is input picture
iFor the brightness value of i pixel of input picture and N and i are positive integer.
And the average brightness of target image then utilizes following formula to calculate:
In this calculating formula,
Be the average brightness of target image, the sum of all pixels that M is target image, j pixel, the y that j is target image
jFor the brightness value of j pixel of target image and M and j are positive integer.
In addition, the luminance standard difference of input picture can utilize following formula to calculate:
In this calculating formula, σ is the luminance standard difference of input picture, the sum of all pixels that N is input picture, i pixel, the x that i is input picture
iFor the brightness value of i pixel of input picture,
For the average brightness of input picture and N and i are positive integer.
And the luminance standard difference of target image then can utilize following formula to calculate:
In this calculating formula, θ is the luminance standard difference of target image, the sum of all pixels that M is target image, j pixel, the y that j is target image
jFor the brightness value of j pixel of target image,
For the average brightness of target image and M and j are positive integer.
In addition, in the step that is written into target image and before being written into the step of second brightness value of the pairing target image of target image, can also comprise: the photographic subjects image; Calculating take second brightness value of target image; And the storage take target image and second brightness value that calculates.
In addition, comparing first brightness value and second brightness value to obtain the step of the luminance difference value between input picture and the target image, can comprise: relatively average brightness in first brightness value and the average brightness in second brightness value are to obtain first difference value; Relatively the luminance standard difference of first brightness value and the luminance standard difference in second brightness value are to obtain second difference value; And according to the luminance difference value between first difference value and the second difference value calculating input image and the target image.
In addition,, can comprise to obtain the step of identification threshold value according to the basic threshold value of luminance difference value adjustment: search first look-up table to obtain first offset corresponding to the luminance difference value according to the luminance difference value; Search second look-up table to obtain second offset according to the luminance difference value corresponding to the luminance difference value; According to first offset and the second compensation value calculation thresholding offset; And with the basic threshold value of thresholding offset adjustment to obtain the identification threshold value.
Wherein, according to the step of first offset and second compensation value calculation compensation threshold value, can comprise: add up first offset and second offset are to be compensated threshold value.
At this, first offset is relevant to the average brightness of input picture, and second offset is relevant to the luminance standard difference of input picture.
In addition, before the step of adjusting basic threshold value, can also comprise: set basic threshold value.
At last, the face recognition program can comprise: detect first face's block in the input picture; Detect second face's block in the target image; Calculating detect first face's block with detect second face's block to obtain the image similarity value; And compare identification threshold value and image similarity value, to judge that whether input picture is by the face recognition program.
Method of adjustment according to the light source threshold value of face recognition provided by the present invention is applied to face recognition, the identification threshold value of using in the time of can dynamically adjusting face recognition under the light source of varying environment.No matter when the brightness of image difference that is write down in relatively poor environment of light or database is excessive, rising that can be suitable or reduce the identification threshold value.Allow the user under different environment and different light, can both finish face recognition smoothly.
Relevant characteristics and implementation of the present invention cooperate diagram to be described in detail as follows as most preferred embodiment now.
Description of drawings
Fig. 1 is the method for adjustment process flow diagram of the light source threshold value of face recognition according to an embodiment of the invention.
Fig. 2 is in the method for adjustment according to the light source threshold value of face recognition of the present invention, the thin portion process flow diagram of the photographic subjects image of an embodiment.
Fig. 3 is in the method for adjustment according to the light source threshold value of face recognition of the present invention, the comparison input picture of an embodiment and the thin portion process flow diagram of the luminance difference value between the target image.
Fig. 4 is in the method for adjustment according to the light source threshold value of face recognition of the present invention, the basic threshold value of the adjustment of an embodiment with the thin portion process flow diagram of identification threshold value.
Fig. 5 is in the method for adjustment according to the light source threshold value of face recognition of the present invention, the thin portion process flow diagram of the calculating of embodiment compensation threshold value.
Fig. 6 is in the method for adjustment according to the light source threshold value of face recognition of the present invention, the thin portion process flow diagram of the face recognition program of an embodiment.
Embodiment
According to the method for adjustment of the light source threshold value of face recognition of the present invention, be applied to having the electronic installation of image abstraction function.This method can be by being built in software or the firmware program in the memory storage of electronic installation, carries out built-in software or firmware program collocation image abstraction function by the processor of electronic installation again and realize method of adjustment according to the light source threshold value of face recognition of the present invention.At this, electronic installation can be the computing machine (Computer) of tool image abstraction function, the mobile phone (Mobile Phone) of tool image abstraction function or personal digital assistant (the Personal DigitalAssistant of tool image abstraction function, but not only be confined to above-mentioned electronic installation PDA) etc..
In asking in basis, earlier by comparing the luminance difference value between input picture and the target image, dynamically the basic threshold value of adjustment then, utilizes the identification threshold value that obtains to carry out the face recognition program of input picture to obtain the identification threshold value more according to this.
Please refer to " Fig. 1 ", it is the method for adjustment process flow diagram according to the light source threshold value of the face recognition of one embodiment of the invention.
When electronic installation received the instruction of face recognition, at first electronic installation was taken input picture (step S110), and calculate take first brightness value (step S120) of input picture.Then, electronic installation is by being written into target image (step S130) in the memory storage, and second brightness value (step S140) that is written into target image.Relatively first brightness value and second brightness value are to obtain the luminance difference value (step S150) between input picture and the target image.At this moment, according to the basic threshold value of luminance difference value adjustment to obtain identification threshold value (step S160).At last, utilize the identification threshold value that input picture is carried out face recognition program (step S170).
Wherein, first brightness value comprises the average brightness and the luminance standard difference of input picture, and second brightness value comprises the average brightness and the luminance standard difference of target image.
At this, the average brightness of input picture can utilize following formula to calculate:
Wherein,
Be the average brightness of input picture, the sum of all pixels that N is input picture, i pixel, the x that i is input picture
iFor the brightness value of i pixel of input picture and N and i are positive integer.
And the average brightness of target image can utilize following formula to calculate:
Wherein,
Be the average brightness of target image, the sum of all pixels that M is target image, j pixel, the y that j is target image
jFor the brightness value of j pixel of target image and M and j are positive integer.
In addition, the luminance standard difference of input picture can utilize following formula to calculate:
Wherein, σ is the luminance standard difference of input picture, the sum of all pixels that N is input picture, i pixel, the x that i is input picture
iFor the brightness value of i pixel of input picture,
For the average brightness of input picture and N and i are positive integer.
And the luminance standard difference of target image can utilize following formula to calculate:
Wherein, θ is the luminance standard difference of target image, the sum of all pixels that M is target image, j pixel, the y that j is target image
jFor the brightness value of j pixel of target image,
For the average brightness of target image and M and j are positive integer.
At this,, can also comprise following implementation step to before step S130 and step S140.
Please refer to " Fig. 2 ", at first, electronic installation photographic subjects image (step S210), and calculate take second brightness value (step S220) of target image.Then electronic installation storage take target image and second brightness value (step S230) to memory storage that calculates.
At this, the average brightness of target image can utilize following formula to calculate:
Wherein,
Be the average brightness of target image, the sum of all pixels that M is target image, j pixel, the y that j is target image
jFor the brightness value of y pixel of target image and M and j are positive integer.
And the luminance standard difference of target image can utilize following formula to calculate:
Wherein, θ is the luminance standard difference of target image, the sum of all pixels that M is target image, j pixel, the y that j is target image
jFor the brightness value of j pixel of target image,
For the average brightness of target image and M and j are positive integer.
In addition, at step S150, can comprise following implementation step.
Please refer to " Fig. 3 ", at first, relatively average brightness in first brightness value and the average brightness in second brightness value are to obtain first difference value (step S152).Then, the luminance standard difference of comparison first brightness value and the luminance standard difference in second brightness value are to obtain second difference value (step S154).At last, according to the luminance difference value (step S156) between first difference value and the second difference value calculating input image and the target image.
In addition, at step S160, can comprise following implementation step.
Please refer to " Fig. 4 ", at first, search first look-up table to obtain first offset (step S162) corresponding to the luminance difference value according to the luminance difference value.Then, search second look-up table to obtain second offset (step S164) according to the luminance difference value corresponding to the luminance difference value.And, according to first offset and the second compensation value calculation thresholding offset (step S166).At last, with the basic threshold value of thresholding offset adjustment to obtain identification threshold value (step S168).
Wherein " table one " is first look-up table according to an embodiment of the invention, and it is first offset of the first difference value correspondence in the luminance difference value." table two " is the second look-up table according to the embodiment of the invention, and it is second offset of the second difference value correspondence in the luminance difference value.
Table one
Table two
Wherein, at step S166, can comprise following implementation step.
Please refer to " Fig. 5 ", add up first offset and second offset are to be compensated threshold value (step S167).
In addition, first offset is relevant to the average brightness of input picture, and second offset is relevant to the luminance standard difference of input picture.
In addition, electronic installation is predeterminable a basic threshold value, with in carrying out the face recognition program process, as and input picture and target image between the relatively use of luminance difference value.
At last, at step S170, can comprise following implementation step.
Please refer to " Fig. 6 ", at first, detect first face's block (step S172) in the input picture.Then, second face's block (step S174) in the detection target image.Calculating detect first face's block with detect second face's block to obtain image similarity value (step S176).At last, relatively whether identification threshold value and image similarity value pass through face recognition program (step S178) to judge input picture.
For instance, when electronic installation received the instruction of face recognition, at first electronic installation was taken input picture, and calculate take first brightness value of input picture.At this for convenience of description, suppose that average brightness in first brightness value is that standard difference in 64, the first brightness values is 18.Then, electronic installation is by being written into target image in the memory storage, and second brightness value that is written into target image.At this for convenience of description, suppose that average brightness in second brightness value is that standard difference in 86, the second brightness values is 33.Relatively average brightness 64 in first brightness value and the average brightness 86 in second brightness value are to obtain the first difference value 64-86=-22.And relatively the luminance standard difference 18 of first brightness value and the luminance standard difference 33 in second brightness value are to obtain the second difference value 18-33=-15.At last, be (22,15) according to the luminance difference value between first difference value-22 and second difference value-15 calculating input image and the target image.
According to first difference value 22 in the luminance difference value (22,15), can obtain being 0.5 of item inferior 2 corresponding to first offset of luminance difference value by searching " table one ".And, look into first difference value 15 in (22,15) according to the luminance difference value, by search " table two " can obtain corresponding to second offset of luminance difference value for times 3 3.0.Then, calculate first offset 0.5 and second offset 3.0 and to obtain thresholding offset 3.5.At last, adjust basic threshold value with thresholding offset 3.5 and can obtain the identification threshold value, and then can utilize the identification threshold value that input picture is carried out the face recognition program.
In the present embodiment, though as an illustration with the input picture of two different brightness and target image.But on practical application face recognition program, can be written into the picture of marking on a map of opening one's eyes wide in the memory storage of electronic installation more.Utilize input picture to carry out face recognition with the picture of marking on a map of opening one's eyes wide respectively, to judge that whether input picture is by the face recognition program more.
Method of adjustment according to the light source threshold value of face recognition provided by the present invention is applied to face recognition, the identification threshold value of using in the time of can dynamically adjusting face recognition under the light source of varying environment.No matter when the brightness of image difference that is write down in relatively poor environment of light or database is excessive, rising that can be suitable or reduce the identification threshold value.Allow the user under different environment and different light, can both finish face recognition smoothly.
Though the present invention with aforesaid preferred embodiment openly as above; right its is not in order to limit the present invention; those skilled in the art; without departing from the spirit and scope of the present invention; when can doing a little change and retouching, therefore scope of patent protection of the present invention must be looked this instructions appending claims person of defining and is as the criterion.
Claims (15)
1. the method for adjustment of the light source threshold value of a face recognition comprises:
Take an input picture;
Calculate one first brightness value of this input picture;
Be written into a target image;
Be written into one second brightness value of this target image;
Relatively this first brightness value and this second brightness value are to obtain the luminance difference value between this input picture and this target image;
According to this luminance difference value adjustment one basic threshold value to obtain an identification threshold value; And
Utilize this identification threshold value that this input picture is carried out a face recognition program.
2. the method for adjustment of the light source threshold value of face recognition as claimed in claim 1, wherein this first brightness value comprises an average brightness and a luminance standard difference of this input picture, and this second brightness value comprises an average brightness and a luminance standard difference of this target image.
3. the method for adjustment of the light source threshold value of face recognition as claimed in claim 2, wherein this average brightness of this input picture is to utilize following formula to calculate:
4. the method for adjustment of the light source threshold value of face recognition as claimed in claim 3, wherein this average brightness of this target image is to utilize following formula to calculate:
5. the method for adjustment of the light source threshold value of face recognition as claimed in claim 2, wherein this luminance standard difference of this input picture is to utilize following formula to calculate:
Wherein, σ is that this luminance standard difference, the N of this input picture are i pixel, the x of this input picture for sum of all pixels, the i of this input picture
iFor the brightness value of this i pixel of this input picture,
For this average brightness of this input picture and N and i are positive integer.
6. the method for adjustment of the light source threshold value of face recognition as claimed in claim 5, wherein this luminance standard difference of this target image is to utilize following formula to calculate:
Wherein, θ is that this luminance standard difference, the M of this target image are j pixel, the y of this target image for sum of all pixels, the j of this target image
jFor the brightness value of this j pixel of this target image,
For this average brightness of this target image and M and j are positive integer.
7. the method for adjustment of the light source threshold value of face recognition as claimed in claim 1 wherein is written into before the step of this target image and this is written into before the step of this second brightness value of pairing this target image of this target image, also comprises:
Take this target image;
Calculating take this second brightness value of this target image; And
The storage take this target image and this second brightness value that calculates.
8. the method for adjustment of the light source threshold value of face recognition as claimed in claim 7, wherein this average brightness of this target image is to utilize following formula to calculate:
9. the method for adjustment of the light source threshold value of face recognition as claimed in claim 7, wherein this luminance standard difference of this target image is to utilize following formula to calculate:
Wherein, θ is that this luminance standard difference, the M of this target image are j pixel, the y of this target image for sum of all pixels, the j of this target image
jFor the brightness value of this j pixel of this target image,
For this average brightness of this target image and M and j are positive integer.
10. the method for adjustment of the light source threshold value of face recognition as claimed in claim 1, wherein relatively this first brightness value and this second brightness value comprise to obtain the step of this luminance difference value between this input picture and this target image:
Relatively average brightness in this first brightness value and the average brightness in this second brightness value are to obtain one first difference value;
Relatively a luminance standard difference of this first brightness value and the luminance standard difference in this second brightness value are to obtain one second difference value; And
Calculate this luminance difference value between this input picture and this target image according to this first difference value and this second difference value.
11. the method for adjustment of the light source threshold value of face recognition as claimed in claim 1 is wherein adjusted this basic threshold value to obtain the step of this identification threshold value according to this luminance difference value, comprising:
Search one first look-up table to obtain one first offset according to this luminance difference value corresponding to this luminance difference value;
Search this second look-up table to obtain one second offset according to this luminance difference value corresponding to this luminance difference value;
According to this first offset and this second compensation value calculation one thresholding offset; And
With this this basic threshold value of thresholding offset adjustment to obtain this identification threshold value.
12. the method for adjustment of the light source threshold value of face recognition as claimed in claim 1 wherein is somebody's turn to do the step that compensates threshold value according to this first offset and this second compensation value calculation, comprising:
Add up this first offset and this second offset to obtain this compensation threshold value.
13. the method for adjustment of the light source threshold value of face recognition as claimed in claim 1, wherein this first offset is relevant to an average brightness of this input picture, and this second offset is relevant to a luminance standard difference of this input picture.
14. the method for adjustment of the light source threshold value of face recognition as claimed in claim 1 is wherein adjusted before the step of this basic threshold value, also comprises:
Set this basic threshold value.
15. the method for adjustment of the light source threshold value of face recognition as claimed in claim 1, this face recognition program wherein comprises:
Detect one first face's block in this input picture;
Detect one second face's block in this target image;
Calculating detect this first face block with detect this second face block to obtain an image similarity value; And
Relatively whether this identification threshold value and this image similarity value pass through the face recognition program to judge this input picture.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910003753A CN101794371A (en) | 2009-02-01 | 2009-02-01 | Method for adjusting light source threshold value for face recognition |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910003753A CN101794371A (en) | 2009-02-01 | 2009-02-01 | Method for adjusting light source threshold value for face recognition |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101794371A true CN101794371A (en) | 2010-08-04 |
Family
ID=42587055
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200910003753A Pending CN101794371A (en) | 2009-02-01 | 2009-02-01 | Method for adjusting light source threshold value for face recognition |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101794371A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102629989A (en) * | 2012-04-01 | 2012-08-08 | 山东神思电子技术股份有限公司 | Environmental irradiation removing photographic method |
CN103190144A (en) * | 2010-10-27 | 2013-07-03 | 高通股份有限公司 | Region of interest extraction |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1860490A (en) * | 2003-09-30 | 2006-11-08 | 皇家飞利浦电子股份有限公司 | System and method for adaptively setting biometric measurement thresholds |
CN101103635A (en) * | 2005-01-11 | 2008-01-09 | 伊斯曼柯达公司 | White balance correction in digital camera images |
-
2009
- 2009-02-01 CN CN200910003753A patent/CN101794371A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1860490A (en) * | 2003-09-30 | 2006-11-08 | 皇家飞利浦电子股份有限公司 | System and method for adaptively setting biometric measurement thresholds |
CN101103635A (en) * | 2005-01-11 | 2008-01-09 | 伊斯曼柯达公司 | White balance correction in digital camera images |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103190144A (en) * | 2010-10-27 | 2013-07-03 | 高通股份有限公司 | Region of interest extraction |
CN103190144B (en) * | 2010-10-27 | 2016-01-27 | 高通股份有限公司 | Region of interest extracts |
CN102629989A (en) * | 2012-04-01 | 2012-08-08 | 山东神思电子技术股份有限公司 | Environmental irradiation removing photographic method |
CN102629989B (en) * | 2012-04-01 | 2014-08-13 | 山东神思电子技术股份有限公司 | Environmental irradiation removing photographic method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10607325B2 (en) | Methods for enhancing image contrast and related image processing systems thereof | |
Kim et al. | Optimized contrast enhancement for real-time image and video dehazing | |
Bulatov et al. | MIDV-2019: challenges of the modern mobile-based document OCR | |
CN108960211B (en) | Multi-target human body posture detection method and system | |
US8320644B2 (en) | Object detection metadata | |
US9443149B2 (en) | Method and apparatus for detecting smoke from image | |
US8750573B2 (en) | Hand gesture detection | |
CN108875451B (en) | Method, device, storage medium and program product for positioning image | |
US11055561B2 (en) | Similar picture identification method, device, and storage medium | |
US9478037B2 (en) | Techniques for efficient stereo block matching for gesture recognition | |
US9235779B2 (en) | Method and apparatus for recognizing a character based on a photographed image | |
US20130044951A1 (en) | Moving object detection method using image contrast enhancement | |
US20150278997A1 (en) | Method and apparatus for inferring facial composite | |
CN109919002B (en) | Yellow stop line identification method and device, computer equipment and storage medium | |
CN105243371A (en) | Human face beauty degree detection method and system and shooting terminal | |
CN107786780B (en) | Video image noise reduction method and device and computer readable storage medium | |
US20130279763A1 (en) | Method and apparatus for providing a mechanism for gesture recognition | |
US20100158324A1 (en) | Method for adjusting light source threshold value for face recognition | |
CN112348761B (en) | Equipment appearance image brightness adjusting method and device | |
CN102103457A (en) | Briefing operating system and method | |
CN111080665B (en) | Image frame recognition method, device, equipment and computer storage medium | |
CN112333385A (en) | Electronic anti-shake control method and device | |
WO2020082731A1 (en) | Electronic device, credential recognition method and storage medium | |
CN101794371A (en) | Method for adjusting light source threshold value for face recognition | |
CN111062272A (en) | Image processing and pedestrian identification method and device based on color recovery and readable 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 | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20100804 |