CN101794371A - Method for adjusting light source threshold value of face identification - Google Patents

Method for adjusting light source threshold value of face identification Download PDF

Info

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
value
brightness
target image
threshold
input image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN200910003753A
Other languages
Chinese (zh)
Inventor
刘用九
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Micro Star International Co Ltd
Original Assignee
Micro Star International 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 Micro Star International Co Ltd filed Critical Micro Star International Co Ltd
Priority to CN200910003753A priority Critical patent/CN101794371A/en
Publication of CN101794371A publication Critical patent/CN101794371A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)

Abstract

A method for adjusting a light source threshold value of face recognition comprises the steps of shooting an input image; calculating a first luminance value of an input image; loading a target image; loading a second brightness value of the target image; comparing the first brightness value with the second brightness value to obtain a brightness difference value between the input image and the target image; adjusting the basic threshold value according to the brightness difference value to obtain an identification threshold value; and performing a face recognition procedure on the input image by using the recognition threshold.

Description

脸部辨识的光源阈值的调整方法 Method for adjusting light source threshold for face recognition

技术领域technical field

本发明涉及一种脸部辨识方法,特别涉及一种脸部辨识的光源阈值的调整方法。The invention relates to a face recognition method, in particular to a method for adjusting a light source threshold for face recognition.

背景技术Background technique

在脸部辨识技术中,使用者的脸部只需在具有图像提取功能的电子装置的有效拍摄距离内,在电子装置提取使用者的脸部图像后,即可进行脸部辨识程序。In the face recognition technology, the user's face only needs to be within the effective shooting distance of the electronic device with image capture function, and the face recognition process can be performed after the electronic device captures the user's face image.

由于脸部辨识应用于电子装置上,是由电子装置的经过一连串的演算法与图像数值计算的结果。电子装置依据使用者的输入图像与存储装置中的目标图像做比较与计算而得一个数值。此数值用来代表使用者在脸部辨识中的图像相似值。另外,在电子装置中会设有一个基本阈值,用以在脸部辨识程序中判断图像相似值是否通过辨识的标准。Since facial recognition is applied to electronic devices, it is the result of a series of calculations and image numerical calculations performed by the electronic devices. The electronic device compares and calculates a value according to the user's input image and the target image in the storage device. This value is used to represent the image similarity value of the user in face recognition. In addition, a basic threshold is set in the electronic device, which is used as a standard for judging whether the image similarity value passes the recognition in the face recognition program.

通常电子装置所提取到使用者的输入图像,会因环境光源的不同而与实际使用者的脸部图像差异过大。由于外在环境光源会影响到使用者脸部光影的变化,而使计算出的图像相似值变动过大。导致图像相似值无法合乎基本阈值的标准,而让使用者无法通过辨识。因此电子装置的脸部辨识程序常因环境光源的影响,而降低了辨识的效果而让使用者的操作上带来许多不便之处。Usually, the input image of the user extracted by the electronic device will be too different from the actual user's face image due to the difference of the ambient light source. Because the external ambient light source will affect the change of the light and shadow of the user's face, the calculated image similarity value will fluctuate too much. As a result, the image similarity value cannot meet the standard of the basic threshold, so that the user cannot pass the identification. Therefore, the face recognition program of the electronic device is often affected by the ambient light source, which reduces the recognition effect and brings a lot of inconvenience to the user's operation.

发明内容Contents of the invention

鉴于以上的问题,本发明提供一种脸部辨识的光源阈值的调整方法,藉以在不同的环境光源下,动态调整脸部辨识的基本阈值。In view of the above problems, the present invention provides a method for adjusting the light source threshold of face recognition, so as to dynamically adjust the basic threshold of face recognition under different ambient light sources.

因此,本发明所公开的脸部辨识的光源阈值的调整方法,包括:拍摄输入图像;计算输入图像的第一亮度值;载入目标图像;载入目标图像的第二亮度值;比较第一亮度值与第二亮度值以得到输入图像与目标图像之间的亮度差异值;依据亮度差异值调整基本阈值以得到辨识阈值;以及利用辨识阈值对输入图像进行脸部辨识程序。Therefore, the method for adjusting the light source threshold for face recognition disclosed in the present invention includes: taking an input image; calculating the first brightness value of the input image; loading the target image; loading the second brightness value of the target image; comparing the first the brightness value and the second brightness value to obtain a brightness difference value between the input image and the target image; adjust the basic threshold according to the brightness difference value to obtain a recognition threshold; and use the recognition threshold to perform a face recognition process on the input image.

其中,第一亮度值可包括输入图像的亮度平均值与亮度标准差值,而第二亮度值可包括目标图像的亮度平均值与亮度标准差值。Wherein, the first brightness value may include a brightness average value and a brightness standard deviation value of the input image, and the second brightness value may include a brightness average value and a brightness standard deviation value of the target image.

另外,输入图像的亮度平均值可利用下式计算得到: x ‾ = 1 N ∑ i = 1 N x i . In addition, the average brightness of the input image can be calculated using the following formula: x ‾ = 1 N ∑ i = 1 N x i .

在此计算式中,

Figure G2009100037537D0000022
为输入图像的亮度平均值、N为输入图像的像素总数、i为输入图像的第i个像素、xi为输入图像的第i个像素的亮度值、且N与i为正整数。In this calculation,
Figure G2009100037537D0000022
is the average brightness of the input image, N is the total number of pixels of the input image, i is the i-th pixel of the input image, x i is the brightness value of the i-th pixel of the input image, and N and i are positive integers.

并且,目标图像的亮度平均值则可是利用下式计算得到: y ‾ = 1 M ∑ j = 1 M y j . Moreover, the average brightness of the target image can be calculated using the following formula: the y ‾ = 1 m ∑ j = 1 m the y j .

在此计算式中,

Figure G2009100037537D0000024
为目标图像的亮度平均值、M为目标图像的像素总数、j为目标图像的第j个像素、yj为目标图像的第j个像素的亮度值、且M与j为正整数。In this calculation,
Figure G2009100037537D0000024
is the average brightness of the target image, M is the total number of pixels of the target image, j is the jth pixel of the target image, yj is the brightness value of the jth pixel of the target image, and M and j are positive integers.

另外,输入图像的亮度标准差值可利用下式计算得到:In addition, the brightness standard deviation value of the input image can be calculated using the following formula:

σσ == 11 NN ∑∑ ii == 11 NN (( xx ii -- xx ‾‾ )) 22 ..

在此计算式中,σ为输入图像的亮度标准差值、N为输入图像的像素总数、i为输入图像的第i个像素、xi为输入图像的第i个像素的亮度值、

Figure G2009100037537D0000026
为输入图像的亮度平均值、且N与i为正整数。In this calculation formula, σ is the brightness standard deviation value of the input image, N is the total number of pixels of the input image, i is the i-th pixel of the input image, x i is the brightness value of the i-th pixel of the input image,
Figure G2009100037537D0000026
is the average brightness of the input image, and N and i are positive integers.

并且,目标图像的亮度标准差值则可利用下式计算得到:And, the brightness standard deviation value of the target image can be calculated using the following formula:

θθ == 11 Mm ∑∑ jj == 11 Mm (( ythe y jj -- ythe y ‾‾ )) 22 ..

在此计算式中,θ为目标图像的亮度标准差值、M为目标图像的像素总数、j为目标图像的第j个像素、yj为目标图像的第j个像素的亮度值、

Figure G2009100037537D0000028
为目标图像的亮度平均值、且M与j为正整数。In this calculation formula, θ is the brightness standard deviation value of the target image, M is the total number of pixels of the target image, j is the jth pixel of the target image, y j is the brightness value of the jth pixel of the target image,
Figure G2009100037537D0000028
is the average brightness of the target image, and M and j are positive integers.

此外,在载入目标图像的步骤及载入目标图像所对应的目标图像的第二亮度值的步骤之前,可还包括:拍摄目标图像;计算拍摄得的目标图像的第二亮度值;以及存储拍摄得的目标图像及计算得的第二亮度值。In addition, before the step of loading the target image and the step of loading the second brightness value of the target image corresponding to the target image, it may further include: shooting the target image; calculating the second brightness value of the captured target image; and storing The captured target image and the calculated second brightness value.

另外,在比较第一亮度值与第二亮度值以得到输入图像与目标图像之间的亮度差异值的步骤,可包括:比较第一亮度值中的亮度平均值与第二亮度值中的亮度平均值以得到第一差异值;比较第一亮度值的亮度标准差值与第二亮度值中的亮度标准差值以得到第二差异值;以及依据第一差异值与第二差异值计算输入图像与目标图像之间的亮度差异值。In addition, the step of comparing the first brightness value with the second brightness value to obtain the brightness difference value between the input image and the target image may include: comparing the brightness average value in the first brightness value with the brightness in the second brightness value average value to obtain the first difference value; compare the brightness standard deviation value of the first brightness value with the brightness standard deviation value of the second brightness value to obtain the second difference value; and calculate the input according to the first difference value and the second difference value The brightness difference value between the image and the target image.

此外,依据亮度差异值调整基本阈值以得到辨识阈值的步骤,可包括:依据亮度差异值查找第一查找表以得到对应于亮度差异值的第一补偿值;依据亮度差异值查找第二查找表以得到对应于亮度差异值的第二补偿值;依据第一补偿值与第二补偿值计算门限补偿值;以及以门限补偿值调整基本阈值以得到辨识阈值。In addition, the step of adjusting the basic threshold according to the brightness difference value to obtain the identification threshold may include: looking up the first lookup table according to the brightness difference value to obtain the first compensation value corresponding to the brightness difference value; looking up the second lookup table according to the brightness difference value to obtain a second compensation value corresponding to the brightness difference value; calculate a threshold compensation value according to the first compensation value and the second compensation value; and adjust the basic threshold with the threshold compensation value to obtain a recognition threshold.

其中,依据第一补偿值与第二补偿值计算补偿门限值的步骤,可包括:累加第一补偿值与第二补偿值以得到补偿门限值。Wherein, the step of calculating the compensation threshold according to the first compensation value and the second compensation value may include: accumulating the first compensation value and the second compensation value to obtain the compensation threshold.

在此,第一补偿值相关于输入图像的亮度平均值,且第二补偿值相关于输入图像的亮度标准差值。Here, the first compensation value is related to the average brightness of the input image, and the second compensation value is related to the standard deviation of brightness of the input image.

此外,在调整基本阈值的步骤前,可还包括:设定基本阈值。In addition, before the step of adjusting the basic threshold, it may further include: setting the basic threshold.

最后,脸部辨识程序可包括:检测输入图像中的第一脸部区块;检测目标图像中的第二脸部区块;计算检测得的第一脸部区块与检测得的第二脸部区块以得到图像相似值;以及比较辨识阈值与图像相似值,以判定输入图像是否通过脸部辨识程序。Finally, the face recognition program may include: detecting the first face block in the input image; detecting the second face block in the target image; calculating the detected first face block and the detected second face block block to obtain the image similarity value; and compare the recognition threshold with the image similarity value to determine whether the input image passes the face recognition process.

根据本发明所提供的脸部辨识的光源阈值的调整方法,应用于脸部辨识系统,可在不同环境的光源下动态调整脸部辨识时所使用辨识阈值。不论在光线较差的环境或数据库中所记录的图像亮度差异过大时,可适当的升高或降低辨识阈值。让使用者在不同的环境以及不同的光线下,都能顺利完成脸部辨识。According to the method for adjusting the light source threshold for face recognition provided by the present invention, when applied to a face recognition system, the recognition threshold used for face recognition can be dynamically adjusted under different light sources. Regardless of the environment with poor light or the brightness difference of images recorded in the database is too large, the recognition threshold can be raised or lowered appropriately. This allows users to successfully complete facial recognition in different environments and under different lighting conditions.

有关本发明的特征与实作,现在配合图示作最佳实施例详细说明如下。Regarding the characteristics and implementation of the present invention, the best embodiment is described in detail below in conjunction with the drawings.

附图说明Description of drawings

图1为根据本发明一实施例的脸部辨识的光源阈值的调整方法流程图。FIG. 1 is a flow chart of a method for adjusting a light source threshold for face recognition according to an embodiment of the present invention.

图2为在根据本发明的脸部辨识的光源阈值的调整方法中,一实施例的拍摄目标图像的细部流程图。FIG. 2 is a detailed flow chart of an embodiment of a shooting target image in a method for adjusting a light source threshold for face recognition according to the present invention.

图3为在根据本发明的脸部辨识的光源阈值的调整方法中,一实施例的比较输入图像与目标图像之间的亮度差异值的细部流程图。3 is a detailed flow chart of comparing brightness difference values between an input image and a target image according to an embodiment of the method for adjusting a light source threshold for face recognition according to the present invention.

图4为在根据本发明的脸部辨识的光源阈值的调整方法中,一实施例的调整基本阈值以得辨识阈值的细部流程图。FIG. 4 is a detailed flowchart of an embodiment of adjusting a basic threshold to obtain a recognition threshold in the method for adjusting a light source threshold for face recognition according to the present invention.

图5为在根据本发明的脸部辨识的光源阈值的调整方法中,一实施例的计算补偿门限值的细部流程图。5 is a detailed flow chart of calculating the compensation threshold according to an embodiment of the method for adjusting the light source threshold for face recognition according to the present invention.

图6为在根据本发明的脸部辨识的光源阈值的调整方法中,一实施例的脸部辨识程序的细部流程图。FIG. 6 is a detailed flow chart of a face recognition program according to an embodiment of the method for adjusting a light source threshold for face recognition according to the present invention.

具体实施方式Detailed ways

根据本发明的脸部辨识的光源阈值的调整方法,被应用于具有图像提取功能的电子装置。本方法可通过软件或固件程序内建于电子装置的存储装置中,再由电子装置的处理器执行内建的软件或固件程序搭配图像提取功能来实现根据本发明的脸部辨识的光源阈值的调整方法。在此,电子装置可为具图像提取功能的计算机(Computer)、具图像提取功能的移动电话(Mobile Phone)、或具图像提取功能的个人数字助理(Personal DigitalAssistant,PDA)等,但不仅局限于上述的电子装置。The method for adjusting the light source threshold for face recognition according to the present invention is applied to an electronic device with image extraction function. This method can be built into the storage device of the electronic device through software or firmware program, and then the processor of the electronic device executes the built-in software or firmware program together with the image extraction function to realize the light source threshold value of face recognition according to the present invention. Adjustment method. Here, the electronic device can be a computer (Computer) with image extraction function, a mobile phone (Mobile Phone) with image extraction function, or a personal digital assistant (Personal Digital Assistant, PDA) with image extraction function, etc., but not limited to the aforementioned electronic devices.

在本中请中,先通过比较输入图像与目标图像之间的亮度差异值,据以动态调整基本阈值以得到辨识阈值,而后,再利用得到的辨识阈值进行输入图像的脸部辨识程序。In this application, the basic threshold is dynamically adjusted to obtain the recognition threshold by comparing the brightness difference between the input image and the target image, and then the face recognition process of the input image is performed using the obtained recognition threshold.

请参照「图1」,其为根据本发明的一实施例的脸部辨识的光源阈值的调整方法流程图。Please refer to FIG. 1 , which is a flowchart of a method for adjusting a light source threshold for face recognition according to an embodiment of the present invention.

当电子装置接收到脸部辨识的指令时,首先电子装置拍摄输入图像(步骤S110),并且计算拍摄得的输入图像的第一亮度值(步骤S120)。然后,电子装置由存储装置中载入目标图像(步骤S130),以及载入目标图像的第二亮度值(步骤S140)。比较第一亮度值与第二亮度值以得到输入图像与目标图像之间的亮度差异值(步骤S150)。此时,依据亮度差异值调整基本阈值以得到辨识阈值(步骤S160)。最后,利用辨识阈值对输入图像进行脸部辨识程序(步骤S170)。When the electronic device receives a face recognition instruction, firstly, the electronic device captures an input image (step S110 ), and calculates a first brightness value of the captured input image (step S120 ). Then, the electronic device loads the target image from the storage device (step S130 ), and loads the second brightness value of the target image (step S140 ). Comparing the first luminance value and the second luminance value to obtain a luminance difference value between the input image and the target image (step S150 ). At this time, the basic threshold is adjusted according to the brightness difference value to obtain the recognition threshold (step S160). Finally, a face recognition process is performed on the input image by using the recognition threshold (step S170).

其中,第一亮度值包括输入图像的亮度平均值与亮度标准差值,以及第二亮度值包括目标图像的亮度平均值与亮度标准差值。Wherein, the first brightness value includes an average brightness value and a brightness standard deviation value of the input image, and the second brightness value includes an average brightness value and a brightness standard deviation value of the target image.

在此,输入图像的亮度平均值可利用下式计算得到: x ‾ = 1 N ∑ i = 1 N x i . Here, the average brightness of the input image can be calculated using the following formula: x ‾ = 1 N ∑ i = 1 N x i .

其中,

Figure G2009100037537D0000051
为输入图像的亮度平均值、N为输入图像的像素总数、i为输入图像的第i个像素、xi为输入图像的第i个像素的亮度值、且N与i为正整数。in,
Figure G2009100037537D0000051
is the average brightness of the input image, N is the total number of pixels of the input image, i is the i-th pixel of the input image, x i is the brightness value of the i-th pixel of the input image, and N and i are positive integers.

并且,目标图像的亮度平均值可利用下式计算得到: y ‾ = 1 M ∑ j = 1 M y j . Moreover, the average brightness of the target image can be calculated using the following formula: the y ‾ = 1 m ∑ j = 1 m the y j .

其中,

Figure G2009100037537D0000053
为目标图像的亮度平均值、M为目标图像的像素总数、j为目标图像的第j个像素、yj为目标图像的第j个像素的亮度值、且M与j为正整数。in,
Figure G2009100037537D0000053
is the average brightness of the target image, M is the total number of pixels of the target image, j is the jth pixel of the target image, yj is the brightness value of the jth pixel of the target image, and M and j are positive integers.

此外,输入图像的亮度标准差值可利用下式计算得到:In addition, the brightness standard deviation value of the input image can be calculated using the following formula:

σσ == 11 NN ∑∑ ii == 11 NN (( xx ii -- xx ‾‾ )) 22 ..

其中,σ为输入图像的亮度标准差值、N为输入图像的像素总数、i为输入图像的第i个像素、xi为输入图像的第i个像素的亮度值、

Figure G2009100037537D0000055
为输入图像的亮度平均值、且N与i为正整数。Among them, σ is the brightness standard deviation value of the input image, N is the total number of pixels of the input image, i is the i-th pixel of the input image, x i is the brightness value of the i-th pixel of the input image,
Figure G2009100037537D0000055
is the average brightness of the input image, and N and i are positive integers.

并且,目标图像的亮度标准差值可利用下式计算得到:And, the brightness standard deviation value of the target image can be calculated using the following formula:

θθ == 11 Mm ∑∑ jj == 11 Mm (( ythe y jj -- ythe y ‾‾ )) 22 ..

其中,θ为目标图像的亮度标准差值、M为目标图像的像素总数、j为目标图像的第j个像素、yj为目标图像的第j个像素的亮度值、

Figure G2009100037537D0000057
为目标图像的亮度平均值、且M与j为正整数。Among them, θ is the brightness standard deviation value of the target image, M is the total number of pixels of the target image, j is the jth pixel of the target image, y j is the brightness value of the jth pixel of the target image,
Figure G2009100037537D0000057
is the average brightness of the target image, and M and j are positive integers.

在此,对在步骤S130以及步骤S140之前,可还包括以下实施步骤。Here, before step S130 and step S140, the following implementation steps may be further included.

请参考「图2」,首先,电子装置拍摄目标图像(步骤S210),并且计算拍摄得的目标图像的第二亮度值(步骤S220)。然后电子装置存储拍摄得的目标图像及计算得的第二亮度值至存储装置中(步骤S230)。Please refer to "FIG. 2", first, the electronic device captures a target image (step S210), and calculates a second brightness value of the captured target image (step S220). Then the electronic device stores the photographed target image and the calculated second brightness value in the storage device (step S230).

在此,目标图像的亮度平均值可利用下式计算得到: y ‾ = 1 M ∑ j = 1 M y j . Here, the average brightness of the target image can be calculated using the following formula: the y ‾ = 1 m ∑ j = 1 m the y j .

其中,

Figure G2009100037537D0000059
为目标图像的亮度平均值、M为目标图像的像素总数、j为目标图像的第j个像素、yj为目标图像的第y个像素的亮度值、且M与j为正整数。in,
Figure G2009100037537D0000059
is the average brightness of the target image, M is the total number of pixels of the target image, j is the jth pixel of the target image, y j is the brightness value of the yth pixel of the target image, and M and j are positive integers.

并且,目标图像的亮度标准差值可利用下式计算得到:And, the brightness standard deviation value of the target image can be calculated using the following formula:

θθ == 11 Mm ∑∑ jj == 11 Mm (( ythe y jj -- ythe y ‾‾ )) 22 ..

其中,θ为目标图像的亮度标准差值、M为目标图像的像素总数、j为目标图像的第j个像素、yj为目标图像的第j个像素的亮度值、

Figure G2009100037537D0000062
为目标图像的亮度平均值、且M与j为正整数。Among them, θ is the brightness standard deviation value of the target image, M is the total number of pixels of the target image, j is the jth pixel of the target image, y j is the brightness value of the jth pixel of the target image,
Figure G2009100037537D0000062
is the average brightness of the target image, and M and j are positive integers.

此外,对在步骤S150,可包括以下实施步骤。In addition, for step S150, the following implementation steps may be included.

请参考「图3」,首先,比较第一亮度值中的亮度平均值与第二亮度值中的亮度平均值以得到第一差异值(步骤S152)。然后,比较第一亮度值的亮度标准差值与第二亮度值中的亮度标准差值以得到第二差异值(步骤S154)。最后,依据第一差异值与第二差异值计算输入图像与目标图像之间的亮度差异值(步骤S156)。Please refer to "FIG. 3", first, compare the brightness average value in the first brightness value with the brightness average value in the second brightness value to obtain a first difference value (step S152). Then, compare the brightness standard deviation value of the first brightness value with the brightness standard deviation value of the second brightness value to obtain a second difference value (step S154 ). Finally, the brightness difference value between the input image and the target image is calculated according to the first difference value and the second difference value (step S156 ).

另外,对在步骤S160,可包括以下实施步骤。In addition, for step S160, the following implementation steps may be included.

请参考「图4」,首先,依据亮度差异值查找第一查找表以得到对应于亮度差异值的第一补偿值(步骤S162)。然后,依据亮度差异值查找第二查找表以得到对应于亮度差异值的第二补偿值(步骤S164)。以及,依据第一补偿值与第二补偿值计算门限补偿值(步骤S166)。最后,以门限补偿值调整基本阈值以得到辨识阈值(步骤S168)。Please refer to "FIG. 4", firstly, look up the first lookup table according to the brightness difference value to obtain the first compensation value corresponding to the brightness difference value (step S162). Then, look up the second lookup table according to the brightness difference value to obtain a second compensation value corresponding to the brightness difference value (step S164 ). And, a threshold compensation value is calculated according to the first compensation value and the second compensation value (step S166). Finally, adjust the basic threshold with the threshold compensation value to obtain the identification threshold (step S168).

其中「表一」为根据本发明一实施例的第一查找表,其为亮度差异值中第一差异值对应的第一补偿值。「表二」为根据本发明实施例的第二查找表,其为亮度差异值中第二差异值对应的第二补偿值。"Table 1" is a first look-up table according to an embodiment of the present invention, which is the first compensation value corresponding to the first difference value among the brightness difference values. "Table 2" is the second lookup table according to the embodiment of the present invention, which is the second compensation value corresponding to the second difference value in the brightness difference value.

表一Table I

Figure G2009100037537D0000063
Figure G2009100037537D0000063

表二Table II

Figure G2009100037537D0000071
Figure G2009100037537D0000071

其中,对在步骤S166,可包括以下实施步骤。Wherein, for step S166, the following implementation steps may be included.

请参考「图5」,累加第一补偿值与第二补偿值以得到补偿门限值(步骤S167)。Please refer to "FIG. 5", the first compensation value and the second compensation value are accumulated to obtain the compensation threshold (step S167).

另外,第一补偿值相关于输入图像的亮度平均值,且第二补偿值相关于输入图像的亮度标准差值。In addition, the first compensation value is related to the average brightness of the input image, and the second compensation value is related to the standard deviation of brightness of the input image.

此外,电子装置可预设有一基本阈值,以在执行脸部辨识程序过程中,作为与输入图像和目标图像间的亮度差异值的比较使用。In addition, the electronic device can preset a basic threshold, which is used as a comparison with the brightness difference between the input image and the target image during the execution of the face recognition program.

最后,对在步骤S170,可包括以下实施步骤。Finally, for step S170, the following implementation steps may be included.

请参考「图6」,首先,检测输入图像中的第一脸部区块(步骤S172)。然后,检测目标图像中的第二脸部区块(步骤S174)。计算检测得的第一脸部区块与检测得的第二脸部区块以得到图像相似值(步骤S176)。最后,比较辨识阈值与图像相似值,以判定输入图像是否通过脸部辨识程序(步骤S178)。Please refer to "FIG. 6", firstly, detect the first face block in the input image (step S172). Then, detect the second face block in the target image (step S174). Calculate the detected first face block and the detected second face block to obtain an image similarity value (step S176). Finally, compare the recognition threshold with the image similarity value to determine whether the input image passes the face recognition process (step S178).

举例来说,当电子装置接收到脸部辨识的指令时,首先电子装置拍摄输入图像,并且计算拍摄得的输入图像的第一亮度值。在此为方便说明,假设第一亮度值中的亮度平均值为64,第一亮度值中的标准差值为18。然后,电子装置由存储装置中载入目标图像,以及载入目标图像的第二亮度值。在此为方便说明,假设第二亮度值中的亮度平均值为86,第二亮度值中的标准差值为33。比较第一亮度值中的亮度平均值64与第二亮度值中的亮度平均值86以得到第一差异值64-86=-22。以及,比较第一亮度值的亮度标准差值18与第二亮度值中的亮度标准差值33以得到第二差异值18-33=-15。最后,依据第一差异值-22与第二差异值-15计算输入图像与目标图像之间的亮度差异值为(22,15)。For example, when the electronic device receives a face recognition instruction, the electronic device first captures an input image, and calculates a first brightness value of the captured input image. For the convenience of description here, it is assumed that the average brightness value in the first brightness value is 64, and the standard deviation value in the first brightness value is 18. Then, the electronic device loads the target image from the storage device, and loads the second brightness value of the target image. For the convenience of description here, it is assumed that the average value of brightness in the second brightness value is 86, and the standard deviation value in the second brightness value is 33. The brightness average 64 in the first brightness value is compared with the brightness average 86 in the second brightness value to obtain a first difference value 64−86=−22. And, compare the brightness standard deviation value 18 of the first brightness value with the brightness standard deviation value 33 of the second brightness value to obtain a second difference value 18−33=−15. Finally, the brightness difference value between the input image and the target image is calculated according to the first difference value −22 and the second difference value −15 (22, 15).

依据亮度差异值(22,15)中的第一差异值22,通过查找「表一」可得到对应于亮度差异值的第一补偿值为项次2的0.5。并且,依据亮度差异值查(22,15)中的第一差异值15,通过查找「表二」可得到对应于亮度差异值的第二补偿值为项次3的3.0。然后,计算第一补偿值0.5与第二补偿值3.0的和以得到门限补偿值3.5。最后,以门限补偿值3.5调整基本阈值即可获得辨识阈值,进而可利用辨识阈值对输入图像进行脸部辨识程序。According to the first difference value 22 in the brightness difference value (22, 15), the first compensation value corresponding to the brightness difference value can be obtained as 0.5 of item 2 by looking up "Table 1". And, according to the first difference value 15 in the brightness difference value lookup (22, 15), the second compensation value corresponding to the brightness difference value can be obtained by looking up "Table 2", which is 3.0 of item 3. Then, the sum of the first compensation value 0.5 and the second compensation value 3.0 is calculated to obtain the threshold compensation value 3.5. Finally, the recognition threshold can be obtained by adjusting the basic threshold with a threshold compensation value of 3.5, and then the face recognition process can be performed on the input image by using the recognition threshold.

在本实施例中,虽以两张不同亮度的输入图像与目标图像作为说明。但在实际应用脸部辨识程序上,可以载入电子装置的存储装置中多张目标图像。利用输入图像分别与多张目标图像进行脸部辨识,以判定输入图像是否通过脸部辨识程序。In this embodiment, two input images and target images with different brightness are used as illustrations. However, in the actual application of the facial recognition program, multiple target images can be loaded into the storage device of the electronic device. The input image is used to perform face recognition with multiple target images, so as to determine whether the input image passes the face recognition process.

根据本发明所提供的脸部辨识的光源阈值的调整方法,应用于脸部辨识系统,可在不同环境的光源下动态调整脸部辨识时所使用辨识阈值。不论在光线较差的环境或数据库中所记录的图像亮度差异过大时,可适当的升高或降低辨识阈值。让使用者在不同的环境以及不同的光线下,都能顺利完成脸部辨识。According to the method for adjusting the light source threshold for face recognition provided by the present invention, when applied to a face recognition system, the recognition threshold used for face recognition can be dynamically adjusted under different light sources. Regardless of the environment with poor light or the brightness difference of images recorded in the database is too large, the recognition threshold can be raised or lowered appropriately. This allows users to successfully complete facial recognition in different environments and under different lighting conditions.

虽然本发明以前述的优选实施例公开如上,然其并非用以限定本发明,本领域技术人员,在不脱离本发明的精神和范围内,当可作些许的更动与润饰,因此本发明的专利保护范围须视本说明书所附的权利要求书所界定者为准。Although the present invention is disclosed above with the aforementioned preferred embodiments, it is not intended to limit the present invention. Those skilled in the art may make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, the present invention The scope of patent protection shall be defined by the claims attached to this specification.

Claims (15)

1.一种脸部辨识的光源阈值的调整方法,包括:1. A method for adjusting a light source threshold for face recognition, comprising: 拍摄一输入图像;taking an input image; 计算该输入图像的一第一亮度值;calculating a first brightness value of the input image; 载入一目标图像;load a target image; 载入该目标图像的一第二亮度值;loading a second brightness value of the target image; 比较该第一亮度值与该第二亮度值以得到该输入图像与该目标图像之间的一亮度差异值;comparing the first brightness value with the second brightness value to obtain a brightness difference value between the input image and the target image; 依据该亮度差异值调整一基本阈值以得到一辨识阈值;以及adjusting a basic threshold according to the brightness difference value to obtain a recognition threshold; and 利用该辨识阈值对该输入图像进行一脸部辨识程序。A face recognition process is performed on the input image by using the recognition threshold. 2.如权利要求1所述的脸部辨识的光源阈值的调整方法,其中该第一亮度值包括该输入图像的一亮度平均值与一亮度标准差值,以及该第二亮度值包括该目标图像的一亮度平均值与一亮度标准差值。2. The method for adjusting the light source threshold for face recognition as claimed in claim 1, wherein the first brightness value includes a brightness average value and a brightness standard deviation value of the input image, and the second brightness value includes the target A brightness average value and a brightness standard deviation value of the image. 3.如权利要求2所述的脸部辨识的光源阈值的调整方法,其中该输入图像的该亮度平均值是利用下式计算得到:3. The method for adjusting the light source threshold for face recognition as claimed in claim 2, wherein the average brightness value of the input image is calculated using the following formula: xx ‾‾ == 11 NN ΣΣ ii == 11 NN xx ii 其中,
Figure F2009100037537C0000012
为该输入图像的该亮度平均值、N为该输入图像的像素总数、i为该输入图像的第i个像素、xi为该输入图像的该第i个像素的亮度值、且N与i为正整数。
in,
Figure F2009100037537C0000012
is the brightness average value of the input image, N is the total number of pixels of the input image, i is the i-th pixel of the input image, x i is the brightness value of the i-th pixel of the input image, and N and i is a positive integer.
4.如权利要求3所述的脸部辨识的光源阈值的调整方法,其中该目标图像的该亮度平均值是利用下式计算得到:4. The method for adjusting the light source threshold of face recognition as claimed in claim 3, wherein the average brightness of the target image is calculated by the following formula: ythe y ‾‾ == 11 Mm ΣΣ jj == 11 Mm ythe y jj 其中,
Figure F2009100037537C0000014
为该目标图像的该亮度平均值、M为该目标图像的像素总数、j为该目标图像的第j个像素、yj为该目标图像的该第j个像素的亮度值、且M与j为正整数。
in,
Figure F2009100037537C0000014
is the brightness average value of the target image, M is the total number of pixels of the target image, j is the jth pixel of the target image, y j is the brightness value of the jth pixel of the target image, and M and j is a positive integer.
5.如权利要求2所述的脸部辨识的光源阈值的调整方法,其中该输入图像的该亮度标准差值是利用下式计算得到:5. The method for adjusting the light source threshold for face recognition as claimed in claim 2, wherein the brightness standard deviation value of the input image is calculated using the following formula: σσ == 11 NN ΣΣ ii == 11 NN (( xx ii -- xx ‾‾ )) 22 其中,σ为该输入图像的该亮度标准差值、N为该输入图像的像素总数、i为该输入图像的第i个像素、xi为该输入图像的该第i个像素的亮度值、
Figure F2009100037537C0000022
为该输入图像的该亮度平均值、且N与i为正整数。
Wherein, σ is the brightness standard deviation value of the input image, N is the total number of pixels of the input image, i is the i-th pixel of the input image, x i is the brightness value of the i-th pixel of the input image,
Figure F2009100037537C0000022
is the average brightness value of the input image, and N and i are positive integers.
6.如权利要求5所述的脸部辨识的光源阈值的调整方法,其中该目标图像的该亮度标准差值是利用下式计算得到:6. The method for adjusting the light source threshold for face recognition as claimed in claim 5, wherein the brightness standard deviation value of the target image is calculated using the following formula: θθ == 11 Mm ΣΣ jj == 11 Mm (( ythe y jj -- ythe y ‾‾ )) 22 其中,θ为该目标图像的该亮度标准差值、M为该目标图像的像素总数、j为该目标图像的第j个像素、yj为该目标图像的该第j个像素的亮度值、
Figure F2009100037537C0000024
为该目标图像的该亮度平均值、且M与j为正整数。
Wherein, θ is the brightness standard deviation value of the target image, M is the total number of pixels of the target image, j is the jth pixel of the target image, and yj is the brightness value of the jth pixel of the target image,
Figure F2009100037537C0000024
is the average brightness of the target image, and M and j are positive integers.
7.如权利要求1所述的脸部辨识的光源阈值的调整方法,其中载入该目标图像的步骤之前及该载入该目标图像所对应的该目标图像的该第二亮度值的步骤之前,还包括:7. The method for adjusting the light source threshold for face recognition according to claim 1, wherein before the step of loading the target image and before the step of loading the second brightness value of the target image corresponding to the target image ,Also includes: 拍摄该目标图像;taking the target image; 计算拍摄得的该目标图像的该第二亮度值;以及calculating the second brightness value of the captured image of the target; and 存储拍摄得的该目标图像及计算得的该第二亮度值。The captured target image and the calculated second brightness value are stored. 8.如权利要求7所述的脸部辨识的光源阈值的调整方法,其中该目标图像的该亮度平均值是利用下式计算得到:8. The method for adjusting the light source threshold of face recognition as claimed in claim 7, wherein the average brightness of the target image is calculated by using the following formula: ythe y ‾‾ == 11 Mm ΣΣ jj == 11 Mm ythe y jj 其中,
Figure F2009100037537C0000026
为该目标图像的该亮度平均值、M为该目标图像的像素总数、j为该目标图像的第j个像素、yj为该目标图像的该第y个像素的亮度值、且M与j为正整数。
in,
Figure F2009100037537C0000026
is the brightness average value of the target image, M is the total number of pixels of the target image, j is the jth pixel of the target image, y j is the brightness value of the yth pixel of the target image, and M and j is a positive integer.
9.如权利要求7所述的脸部辨识的光源阈值的调整方法,其中该目标图像的该亮度标准差值是利用下式计算得到:9. The method for adjusting the light source threshold of face recognition as claimed in claim 7, wherein the brightness standard deviation value of the target image is calculated using the following formula: θθ == 11 Mm ΣΣ jj == 11 Mm (( ythe y jj -- ythe y ‾‾ )) 22 其中,θ为该目标图像的该亮度标准差值、M为该目标图像的像素总数、j为该目标图像的第j个像素、yj为该目标图像的该第j个像素的亮度值、
Figure F2009100037537C0000031
为该目标图像的该亮度平均值、且M与j为正整数。
Wherein, θ is the brightness standard deviation value of the target image, M is the total number of pixels of the target image, j is the jth pixel of the target image, and yj is the brightness value of the jth pixel of the target image,
Figure F2009100037537C0000031
is the average brightness of the target image, and M and j are positive integers.
10.如权利要求1所述的脸部辨识的光源阈值的调整方法,其中比较该第一亮度值与该第二亮度值以得到该输入图像与该目标图像之间的该亮度差异值的步骤,包括:10. The method for adjusting the light source threshold for face recognition as claimed in claim 1, wherein the step of comparing the first brightness value and the second brightness value to obtain the brightness difference value between the input image and the target image ,include: 比较该第一亮度值中的一亮度平均值与该第二亮度值中的一亮度平均值以得到一第一差异值;comparing a luminance average value of the first luminance value with a luminance average value of the second luminance value to obtain a first difference value; 比较该第一亮度值的一亮度标准差值与该第二亮度值中的一亮度标准差值以得到一第二差异值;以及comparing a brightness standard deviation value of the first brightness value with a brightness standard deviation value of the second brightness value to obtain a second difference value; and 依据该第一差异值与该第二差异值计算该输入图像与该目标图像之间的该亮度差异值。The brightness difference value between the input image and the target image is calculated according to the first difference value and the second difference value. 11.如权利要求1所述的脸部辨识的光源阈值的调整方法,其中依据该亮度差异值调整该基本阈值以得到该辨识阈值的步骤,包括:11. The method for adjusting the light source threshold for face recognition as claimed in claim 1, wherein the step of adjusting the basic threshold to obtain the recognition threshold according to the brightness difference value comprises: 依据该亮度差异值查找一第一查找表以得到对应于该亮度差异值的一第一补偿值;searching a first look-up table according to the brightness difference value to obtain a first compensation value corresponding to the brightness difference value; 依据该亮度差异值查找该第二查找表以得到对应于该亮度差异值的一第二补偿值;searching the second lookup table according to the brightness difference value to obtain a second compensation value corresponding to the brightness difference value; 依据该第一补偿值与该第二补偿值计算一门限补偿值;以及calculating a threshold compensation value according to the first compensation value and the second compensation value; and 以该门限补偿值调整该基本阈值以得到该辨识阈值。The basic threshold is adjusted with the threshold compensation value to obtain the identification threshold. 12.如权利要求1所述的脸部辨识的光源阈值的调整方法,其中依据该第一补偿值与该第二补偿值计算该补偿门限值的步骤,包括:12. The method for adjusting the light source threshold for face recognition as claimed in claim 1, wherein the step of calculating the compensation threshold according to the first compensation value and the second compensation value comprises: 累加该第一补偿值与该第二补偿值以得到该补偿门限值。Accumulate the first compensation value and the second compensation value to obtain the compensation threshold. 13.如权利要求1所述的脸部辨识的光源阈值的调整方法,其中该第一补偿值相关于该输入图像的一亮度平均值,且该第二补偿值相关于该输入图像的一亮度标准差值。13. The method for adjusting the light source threshold for face recognition as claimed in claim 1, wherein the first compensation value is related to an average brightness of the input image, and the second compensation value is related to a brightness of the input image standard deviation. 14.如权利要求1所述的脸部辨识的光源阈值的调整方法,其中调整该基本阈值的步骤之前,还包括:14. The method for adjusting the light source threshold for face recognition as claimed in claim 1, wherein before the step of adjusting the basic threshold, further comprising: 设定该基本阈值。Set the base threshold. 15.如权利要求1所述的脸部辨识的光源阈值的调整方法,其中该脸部辨识程序,包括:15. The method for adjusting the light source threshold of face recognition as claimed in claim 1, wherein the face recognition program comprises: 检测该输入图像中的一第一脸部区块;detecting a first face block in the input image; 检测该目标图像中的一第二脸部区块;detecting a second face block in the target image; 计算检测得的该第一脸部区块与检测得的该第二脸部区块以得到一图像相似值;以及calculating the detected first face block and the detected second face block to obtain an image similarity value; and 比较该辨识阈值与该图像相似值,以判定该输入图像是否通过脸部辨识程序。The recognition threshold is compared with the image similarity value to determine whether the input image passes the face recognition process.
CN200910003753A 2009-02-01 2009-02-01 Method for adjusting light source threshold value of face identification Pending CN101794371A (en)

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 of face identification

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 of face identification

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 of face identification

Country Status (1)

Country Link
CN (1) CN101794371A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (2)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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
US11055561B2 (en) Similar picture identification method, device, and storage medium
CN110543815A (en) Training method of face recognition model, face recognition method, device, equipment and storage medium
US9311526B2 (en) Image processing system and method of improving human face recognition
US8750573B2 (en) Hand gesture detection
WO2019041519A1 (en) Target tracking device and method, and computer-readable storage medium
US20130243328A1 (en) Registration determination device, control method and control program therefor, and electronic apparatus
WO2019033572A1 (en) Method for detecting whether face is blocked, device and storage medium
US20100158324A1 (en) Method for adjusting light source threshold value for face recognition
US9235779B2 (en) Method and apparatus for recognizing a character based on a photographed image
WO2022100452A1 (en) Ocr system evaluation method, apparatus and device, and readable storage medium
US10592759B2 (en) Object recognition apparatus and control method therefor
US20090169108A1 (en) System and method for recognizing smiling faces captured by a mobile electronic device
CN108269220B (en) Method and device for positioning digital watermark
CN102196153B (en) Image scene brightness difference judgment device and brightness difference judgment method
WO2022252527A1 (en) Neural network training method and apparatus, facial recognition method and apparatus, and device and storage medium
US20090316960A1 (en) Mobile electronic device security protecting system and method
CN101794371A (en) Method for adjusting light source threshold value of face identification
CN105957020A (en) Image generator and image generation method
CN111080665A (en) Image frame identification method, device and equipment and computer storage medium
CN107133603A (en) Method, mobile terminal and the computer-readable recording medium for preventing fingerprint from leaking
CN112150444A (en) Recognition method, device and electronic device for attribute feature of face image
JP2011029710A (en) Image processor, image processing program, and imaging apparatus
CN111861965A (en) Image backlight detection method, image backlight detection device and terminal equipment
WO2021164122A1 (en) Intelligent user recognition method and device, and computer readable storage medium
CN109711328B (en) Face recognition method and device and electronic equipment

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