Face recognition method and face recognition device
Through distance detection and light source intensity adjustment, face recognition is only started when a face is present, which solves the problem of continuous high load and high energy consumption of face recognition devices, achieving more efficient recognition and lower energy consumption.
Patent Information
- Application Number
- CN202010176398.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-03-06
- Filing Date
- 2020-03-13
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2040-03-13
AI Technical Summary
The central processing unit of existing facial recognition devices is constantly under high load, resulting in slow system operation, high energy consumption and high temperature, which in turn affects system performance.
Using a distance detector and an infrared emitter, the light source intensity is set according to the distance detection value, and the face recognition operation is only started when a face is present, reducing continuous computing and lighting, and reducing system load and energy consumption.
It effectively reduces the average load and energy consumption of the face recognition device, avoids excessive system temperature, and improves the efficiency and speed of face recognition.
Smart Images

Figure CN113361308B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to face recognition, and in particular to a face recognition method and a face recognition device. Background Art
[0002] Face recognition technology is to analyze the face in the image, and then compare the found face with the database content to determine whether the captured face matches an identity data in the database. The captured image can be a visible light image or an invisible light image. The common method is to digitize the features of different parts of the face to generate a combination of facial feature values, which are then stored in the database as identity data or compared with the database record.
[0003] The current face recognition device is an image capture lens that continuously captures visible light or invisible light streaming images. The central processing unit or other computing core continuously executes the recognition program code to analyze whether there is a face in the streaming image, and further generates a combination of facial feature values when a face appears. In other words, regardless of whether there is a user in front of the face recognition device, the face recognition mechanism continues to perform the recognition operation.
[0004] In the above situation, the CPU of the face recognition device is continuously in a high-load state. If a CPU with lower computing performance is used, the high-load state will cause the overall system to run slowly, affecting the operation of other operations. Using a high-performance CPU is too costly, and the continuous high load also brings high energy consumption. The high heat caused by high energy consumption will often cause the system to enter a frequency reduction operation to cool down, and the frequency reduction operation further causes the system to lag in operation. Summary of the invention
[0005] In view of the above technical problems, the present invention provides a face recognition method and a face recognition device, which can start the face recognition operation in a timely manner to reduce the average system load and hardware energy consumption.
[0006] The present invention proposes a face recognition method, comprising: performing distance detection to obtain a distance detection value; comparing whether the distance detection value is less than a threshold distance value; when the distance detection value is less than the threshold distance value, setting a corresponding light source intensity according to the distance detection value, and projecting infrared light with the light source intensity; capturing an infrared image, performing face recognition on the infrared image; and when face recognition is successful, executing a corresponding event.
[0007] In at least one embodiment, the range of the threshold distance value is divided into a plurality of distance intervals, the light source intensity has a plurality of setting values, and each distance interval corresponds to one of the plurality of setting values.
[0008] In at least one embodiment, face recognition includes: analyzing whether a face exists in an infrared image and correcting the image of the face; capturing a facial feature value combination of the face; and comparing the facial feature value combination with one of a plurality of preset feature value combinations in a feature value database to see whether they match.
[0009] In at least one embodiment, the face recognition method further includes: when the distance detection value is less than the threshold distance value, capturing a visible light image, and displaying the visible light image.
[0010] In at least one embodiment, the face recognition method further includes: when the face recognition is successful, displaying a recognition success prompt, and the recognition success prompt includes a user identity data.
[0011] The present invention also provides a face recognition device, comprising a distance detector, an infrared transmitter and an infrared capture lens. The distance detector is used to obtain a distance detection value. The infrared transmitter is used to project an infrared ray. The infrared image capture lens is used to capture an infrared image. The data processing circuit is used to determine whether the distance detection value is less than a threshold distance value.
[0012] When the distance detection value is less than the threshold distance value, the data processing circuit sets a corresponding light source intensity according to the distance detection value, and drives the infrared transmitter to project infrared light with this light source intensity; and the data processing circuit performs face recognition on the infrared image, and when the face recognition is successful, the data processing circuit executes a corresponding event.
[0013] In at least one embodiment, the face recognition device further includes a visible light image capturing lens for capturing a visible light image and transmitting it to the data processing circuit; and a display panel for being driven by the data processing circuit to display the visible light image.
[0014] In at least one embodiment, the face recognition device further includes a shell having an internal space inside the shell, and the shell has a front side; wherein the distance detector is arranged on the front side to obtain the distance detection value in front of the front side; the data processing circuit is arranged in the internal space; the infrared transmitter, the infrared image capture lens, the visible light image capture lens and the display panel are arranged on the front side.
[0015] In at least one embodiment, when the face recognition is successful, the data processing circuit drives the display panel to display a recognition success prompt, and the recognition success prompt includes a user identity data.
[0016] In at least one embodiment, the range of the threshold distance value is divided into a plurality of distance intervals, the light source intensity has a plurality of setting values, and each distance interval corresponds to one of the plurality of setting values.
[0017] In at least one embodiment, the data processing circuit includes a computing core electrically connected to the infrared image capture lens; a driving circuit connected to the computing core and the distance detector; the distance detection value is encoded by the driving circuit and transmitted to the computing core; and a voltage regulator connected to the driving circuit and the infrared transmitter, and a reference voltage is received by the driving circuit; wherein the computing core controls the driving circuit to switch the reference voltage according to the distance detection value to adjust the size of a driving voltage output by the voltage regulator to the infrared transmitter so that the intensity of the light source corresponds to the distance detection value.
[0018] In one or more embodiments of the present invention, the face recognition device switches the face recognition program to an idle state that can be awakened and started at any time. The face recognition device decides whether to wake up and start the face recognition program based on the distance detection value. Therefore, the face recognition device will not normally continue to perform face recognition operations, avoiding the continuous consumption of hardware computing resources in face recognition operations. Therefore, the present invention can effectively reduce the average load of the face recognition device and avoid unnecessary power consumption. At the same time, reducing the system load can avoid excessive system temperature, so as to avoid the system from entering a frequency reduction operation, so that the face recognition program can be completed quickly.
[0019] Furthermore, in at least one embodiment, the present invention utilizes the distance detection value to determine the setting value of the light source intensity used for illumination, so as to ensure that the best image exposure and image capture effect can be obtained for faces from far to near, so as to facilitate the execution of face recognition operations.
[0020] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments, but is not intended to limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 is a front view of the first embodiment of the present invention.
[0022] Figure 2 is a circuit block diagram of the first embodiment of the present invention.
[0023] Figure 3 4 is a diagram showing the corresponding relationship between the distance detection value and the light source intensity in the first embodiment of the present invention.
[0024] Figure 4 is a method flow chart of the first embodiment of the present invention.
[0025] Figure 5 is another method flow chart of the first embodiment of the present invention.
[0026] Figure 6 , Figure 7 It is a schematic diagram of switching between distance detection value and light source intensity.
[0027] Figure 8is a circuit block diagram of the second embodiment of the present invention.
[0028] Wherein, the reference numerals are:
[0029] 100: Face recognition device
[0030] 110: Shell
[0031] 112: Front
[0032] 120: Distance detector
[0033] 130: Data processing circuit
[0034] 132: Computing Core
[0035] 134: Driving circuit
[0036] 136: Voltage Regulator
[0037] 140: Infrared transmitter
[0038] 150: Infrared image capture lens
[0039] 160: Visible light image capture lens
[0040] 170: Display panel
[0041] D: Distance detection value
[0042] D1,D2,D3,D4: distance interval
[0043] I1, I2, I3, I4: set value
[0044] T: threshold distance value
[0045] Pir: Infrared imaging
[0046] Pv: Visible light imaging
[0047] CPU: Central Processing Unit
[0048] Vref: reference voltage
[0049] Vout: output voltage
[0050] Vdd: power supply
[0051] V: reference voltage
[0052] V-LED: driving voltage
[0053] GPIO-1, GPIO-2: general purpose input and output pins
[0054] Step 110~Step 160: Steps DETAILED DESCRIPTION
[0055] The structural principle and working principle of the present invention are described in detail below in conjunction with the accompanying drawings:
[0056] See also Figure 1 as well as Figure 2 FIG. 1 is a face recognition device 100 according to a first embodiment of the present invention, which is used to execute a face recognition method.
[0057] like Figure 1 as well as Figure 2 As shown, the face recognition device 100 includes a housing 110 , a distance detector 120 , a data processing circuit 130 , one or more infrared transmitters 140 , an infrared image capturing lens 150 , a visible light image capturing lens 160 , and a display panel 170 .
[0058] like Figure 1 as well as Figure 2 As shown, the housing 110 has an internal space inside and a front surface 112. The distance detector 120 is disposed on the front surface 112 to obtain a distance detection value D in front of the front surface 112. The housing 110 is usually fixed to a wall or a bracket with the front surface 112 facing a sensing area.
[0059] like Figure 2 as well as Figure 3 As shown, the data processing circuit 130 is disposed in the internal space of the housing 110. The distance detector 120 is electrically connected to the data processing circuit 130, and transmits the distance detection value D to the data processing circuit 130. The data processing circuit 130 sets a threshold distance value T, and determines whether the distance detection value D is less than the threshold distance value T. When there is no object approaching the sensing area, for example, no human body or face enters the sensing area, the distance detection value D will be a fixed value greater than the threshold distance value T, for example, the distance of the background object that the distance detector 120 can sense, or the distance of the background object exceeds the maximum detection range of the distance detector 120, and the effective distance detection value D cannot be obtained.
[0060] like Figure 1 , Figure 2 as well as Figure 3As shown, the infrared emitter 140 is disposed on the front side 112 and is electrically connected to the data processing circuit 130. The infrared emitter 140 is used to project infrared rays toward the front of the front side 112. When the distance detection value D is less than the threshold distance value T, the data processing circuit 130 sets a corresponding light source intensity according to the distance detection value D, and drives the infrared emitter 140 to project infrared rays with the corresponding light source intensity. In a specific embodiment, the light source intensity may be the power intensity (watt) of the infrared emitter 140, for example, the infrared emitter 140 projects infrared rays with a specified power; or, the light source intensity may be the driving voltage (voltage) for driving the infrared emitter 140. The data processing circuit 130 may set the driving voltage value to correspond to different distance detection values D within the driving voltage range of the infrared emitter 140. In a specific embodiment, the infrared emitter 140 is driven by a pulse current, and the light source intensity can be the width of the pulse current or the length of the duty cycle; the data processing circuit 130 can set the width of the pulse current or the duty cycle to correspond to different distance detection values D within the operating frequency range of the infrared emitter 140. The larger the distance detection value D, the greater the corresponding light source intensity; conversely, the smaller the distance detection value D, the smaller the corresponding light source intensity.
[0061] like Figure 3 As shown, in a specific embodiment, the data processing circuit 130 further divides the range of the threshold distance value T into two or more distance intervals D1, D2, D3, and sets the light source intensity to have multiple setting values I1, I2, I3. The data processing circuit 130 sets a corresponding setting value I1, I2, I3 for each distance interval D1, D2, D3 to drive the infrared emitter 140 to project infrared light. Above the threshold distance value T, the distance detector 120 can still obtain the distance detection value D in a distance interval D4 that is not greater than the maximum detection distance, and the data processing circuit 130 can also set a corresponding setting value I4 for the distance interval D4. The setting value I4 can be the maximum intensity within the specification range of the infrared emitter 140.
[0062] Therefore, in the above specific embodiment, the larger the average distance of the distance interval D1, D2, D3, the larger the corresponding setting value I1, I2, I3; conversely, the smaller the average distance of the distance interval D1, D2, D3, the smaller the corresponding setting value I1, I2, I3. Therefore, when the distance detection value D falls into one of the multiple distance intervals D1, D2, D3, the data processing circuit 130 will drive the infrared transmitter 140 to project infrared rays with the corresponding setting value I1, I2, I3. According to the corresponding switching of the setting value I1, I2, I3 and the distance interval D1, D2, D3, the infrared radiation (W / m2) of the surface of the object can be maintained within an appropriate value range when it is in each distance interval D1, D2, D3.
[0063] like Figure 1 as well as Figure 2 As shown, the infrared image capture lens 150 is disposed on the front surface 112 and is electrically connected to the data processing circuit 130. The infrared image capture lens 150 is used to capture an infrared image Pir in front of the front surface 112 of the housing 110 and transmit the infrared image Pir to the data processing circuit 130. The infrared image Pir is mainly formed by the infrared rays projected by the infrared transmitter 140 being reflected by an object.
[0064] The data processing circuit 130 continuously determines whether the distance detection value D is less than the threshold distance value T. When the distance detection value D is less than the threshold distance value T, the data processing circuit 130 sets a corresponding light source intensity according to the distance detection value D, and drives the infrared emitter 140 to project infrared light with the light source intensity. The data processing circuit 130 simultaneously activates the infrared image capture lens 150 to capture the infrared image Pir. According to the infrared image Pir, the data processing circuit 130 performs a face recognition operation. The data processing circuit 130 analyzes whether there is a face in the infrared image Pir, corrects the image of the face, and captures the face feature value combination of the face. The face feature value combination uses the feature points (such as the facial features) of the face as anchor points, and extracts the feature values respectively to generate the face feature value combination. After the data processing circuit 130 captures the face feature value combination, it compares the face feature value combination with a plurality of preset feature value combinations in a feature value database to see if they match. When the facial feature value combination matches one of the plurality of preset feature value combinations, that is, the face recognition is successful, the data processing circuit 130 executes a corresponding event.
[0065] like Figure 1 as well as Figure 2 As shown, the visible light image capturing lens 160 and the display panel 170 are electrically connected to the data processing circuit 130 , and the visible light image capturing lens 160 and the display panel 170 are disposed on the front side 112 of the housing 110 .
[0066] The visible light image capture lens 160 is used to capture a visible light image Pv in front of the front surface 112 of the housing 110, and transmit it to the data processing circuit 130, so that the data processing circuit 130 drives the display panel 170 to display the visible light image Pv. Therefore, the user can confirm and adjust his position through the display of the display panel 170 to ensure that his position and posture allow the infrared image capture lens 150 to capture the face.
[0067] The aforementioned corresponding events may be, but are not limited to, unlocking a door, attendance records, entry and exit records, book borrowing records, etc. For example, a gate is set up in a workplace and controlled by the data processing circuit 130; when face recognition is successful, the data processing circuit 130 may perform operations such as recording the user's working hours and opening the gate as corresponding events. The aforementioned corresponding events executed by the data processing circuit 130 may further include the data processing circuit 130 driving the display panel 170 to display a recognition success prompt; the recognition success prompt may include displaying the user's identity data.
[0068] like Figure 4 As shown, based on the above-mentioned face recognition device 100, the present invention further proposes a face recognition method.
[0069] like Figure 4 As shown, after the face recognition device 100 is activated, the data processing circuit 130 enables the distance detector 120 and performs distance detection to obtain a distance detection value D, as shown in step 110. The data processing circuit 130 will load the face recognition program, but switch the face recognition program to an idle state, that is, the face recognition program is not enabled, and the face recognition program is only in a state where it can be activated at any time. At this time, the face recognition device 100 will not perform face recognition to avoid the data processing circuit 130 from continuously performing high-load calculations and consuming hardware resources.
[0070] like Figure 4 As shown, the distance detector 120 continues to detect and continuously transmits the distance detection value D back to the data processing circuit 130, as shown in step 120. A threshold distance value T is set in the data processing circuit 130, and the data processing circuit 130 compares whether the distance detection value D is less than the threshold distance value T, as shown in step 130. When the distance detection value D is greater than the threshold distance value T, the process returns to step 120, and the data processing circuit 130 receives the transmitted distance detection value D again.
[0071] When the user moves to the front of the front face 112 and enters the sensing area, the distance detector 120 detects the user and obtains a corresponding distance detection value D according to the distance between the user and the distance detector 120. When the distance detection value D is less than the threshold distance value T, the data processing circuit 130 enables the face recognition procedure, as shown in step 140.
[0072] like Figure 5 As shown, the face recognition program includes the data processing circuit 130 setting a corresponding light source intensity according to the distance detection value D, and driving the infrared emitter 140 to project infrared light with the corresponding light source intensity, as shown in Step 141 and Step 142. Then, the data processing circuit 130 activates the infrared image capture lens 150 to start capturing the infrared image Pir and transmitting it back, as shown in Step 143.
[0073] According to the different distance detection values D, the corresponding light source intensity is determined to project infrared light, so as to ensure that the infrared image Pir can have a better image exposure and a clearer image capture effect. Figure 3 As shown, the range of the threshold distance value T is divided into two or more distance intervals D1, D2, D3, and the light source intensity has a plurality of setting values I1, I2, I3, and each of the plurality of distance intervals D1, D2, D3 corresponds to one of the plurality of setting values I1, I2, I3.
[0074] When the distance detection value D is greater than the threshold distance value T, but is still within the distance interval D4 where the infrared emitter 140 can obtain the distance detection value D, the data processing circuit 130 does not perform face recognition, but can still drive the infrared emitter 140 to project infrared light by setting the value I4, so that the infrared emitter 140 maintains the maximum intensity setting value I4 within the specification range as the light source intensity to project infrared light, thereby illuminating the environment with infrared light.
[0075] like Figure 6 As shown, when the face enters the image capture range of the infrared image capture lens 150, and the distance detection value D is less than the threshold distance value T and falls within the range of the distance interval D3, the infrared emitter 140 will first project infrared light with the maximum setting value I3 as the light source intensity, so that the face can still be fully illuminated at a farther distance, and ensure that the infrared image Pir is fully exposed and clear enough. At this time, if the user continues to approach the face recognition device 100 and the distance detection value D falls within the distance interval D2 or the distance interval D1, the light source intensity of the setting value I3 will be too high, causing the infrared image Pir to be too bright, resulting in unclear contours. At this time, the data processing circuit 130 will set the corresponding light source intensity to the setting value I2 according to the distance interval D2, so that the infrared image Pir can be appropriately exposed and presented clearly.
[0076] like Figure 7 As shown, if the face enters a smaller distance interval at the beginning, such as the distance interval D1, the infrared emitter 140 will project infrared light with a smaller setting value I1 as the light source intensity, so that the infrared image Pir is appropriately exposed and clear enough. However, if the user adjusts the distance and extends the distance detection value D to the distance interval D3 or the distance interval D2, the light source intensity of the setting value I1 will be insufficient, causing the infrared image Pir to be underexposed and too dark, and unable to show the outline. At this time, the data processing circuit 130 will set the corresponding light source intensity to be increased to the setting value I3 according to the distance interval D3, so that the infrared image Pir can be presented clearly.
[0077] like Figure 5 At the same time, the data processing circuit 130 activates the visible light image capture lens 160 to capture the visible light image Pv, and drives the display panel 170 to display the visible light image Pv, as shown in step 144. At this time, the user can adjust his position and posture according to the display of the display panel 170 to ensure that his face can be captured by the infrared image capture lens 150.
[0078] The aforementioned infrared emitter 140 can normally project infrared light at the maximum light intensity within the specification, such as the setting value I4, to perform infrared illumination on the surroundings, and the infrared image capture lens 150 continuously captures the infrared image Pir stream and stores it in the data processing circuit 130. However, at this time, the data processing circuit 130 does not perform the face recognition operation, but simply records the video. Similarly, the visible light image capture lens 160 can also normally capture the visible light image Pv stream, and the data processing circuit 130 records the video, but does not drive the display panel 170 for display.
[0079] Next, based on the infrared image Pir, the data processing circuit 130 performs face recognition to determine whether the facial feature value combination of a face in the infrared image Pir matches one of a plurality of preset feature value combinations in a feature value database, wherein the plurality mentioned above means including two or more, such as step 150.
[0080] When the facial feature value combination matches one of the plurality of preset feature value combinations, that is, the facial recognition is successful, the data processing circuit 130 executes a corresponding event, as shown in step 160. The aforementioned corresponding event may be, but is not limited to, unlocking a door, attendance record, entry and exit record, book borrowing record, etc.
[0081] Therefore, by means of the above-mentioned face recognition device 100 and face recognition method, the face recognition program is normally in an idle state, so that the hardware of the face recognition device 100 will not continuously maintain a high load due to the continuous execution of the face recognition program. Therefore, the normal load of the face recognition device 100 can be reduced and energy consumption can be saved.
[0082] In the present invention, the data processing circuit 130 can be hardware, or a combination of hardware and software. For example, the data processing circuit 130 can further include a system chipset, a central processing unit, a non-volatile storage module, a volatile storage module, and a graphics chip. The non-volatile storage module is used to store program codes, and the central processing unit can load the program codes from the non-volatile storage body to the volatile storage body for execution to start the face recognition program and switch the face recognition program to an idle state.
[0083] The above description is only an example of the data processing circuit 130 , and does not exclude the possibility that some or all of the components are integrated into a single integrated circuit component, nor does it exclude the possibility that other circuit designs replace the above components as the data processing circuit 130 .
[0084] like Figure 8 FIG. 1 is a face recognition device 100 according to a second embodiment of the present invention, which is used to provide another example of a data processing circuit 130 . The data processing circuit 130 can be divided into three parts, including a computing core 132 , a driving circuit 134 of the distance detector 120 , and a voltage regulator 136 .
[0085] The computing core 132 includes components such as a central processing unit (CPU) and a system chipset for performing face recognition operations. The computing core 132 can be connected to the infrared image capture lens 150 and the visible light image capture lens 160 via a USB bus (or other interfaces, such as MIPI-CSI). The computing core 132 is connected to the driving circuit 134 of the distance detector 120 via an I2C interface (or other interfaces, such as SMBus, USB). At the same time, the driving circuit 134 can be connected to the voltage regulator 136 via two output pins, such as general purpose input and output pins GPIO-1 and GPIO-2. The general purpose input and output pins GPIO-1 and GPIO-2 are respectively connected in parallel to the voltage regulator 136 through resistors, so as to adjust and output the reference voltage Vref to the voltage regulator 136 through the general purpose input and output pins GPIO-1 and GPIO-2. The voltage regulator 136 is connected to a power source Vdd, such as +5V, and outputs an output voltage Vout according to the reference voltage Vref to adjust the driving voltage V-LED of the infrared emitter 140 to change the light source intensity between the setting values I1, I2, I3, and I4.
[0086] The distance detector 120 may be an infrared distance measuring device, a laser distance measuring device, or a time of flight distance measuring device (ToF). The distance detection value D detected by the distance detector 120 is encoded by the driving circuit 134 and continuously transmitted back to the central processing unit CPU of the computing core 132.
[0087] When the distance detection value D is greater than the threshold distance value T, and the distance detection value D is relatively maximum, for example, it falls within the distance interval D4 among the distance intervals D1, D2, D3, and D4, the data processing circuit 130 does not perform face recognition, nor does it switch the setting values I1, I2, I3, and I4 of the light source intensity of the infrared transmitter 140. At this time, the computing core 132 controls the driving circuit 134 of the distance detector 120 so that the two general input and output pins GPIO-1 and GPIO-2 are both maintained in the Open Drain state. At this time, the reference voltage Vref can be maintained at the maximum voltage (for example, Vref = 2.5V), so that the driving voltage V_LED output is also the highest voltage preset value (for example, 2.5V), and the infrared transmitter 140 maintains the maximum intensity setting value I4 within the specification range as the light source intensity to project infrared rays, and illuminate the environment with infrared rays.
[0088] When the distance detection value D is less than the threshold distance value T, and the distance detection value D is relatively small, for example, it falls within the distance interval D1 of the distance intervals D1, D2, and D3, the computing core 132 controls the driving circuit 134 of the distance detector 120, so that the two general input and output pins GPIO-1 and GPIO-2 are both maintained in a low potential state. At this time, the reference voltage Vref drops to the minimum value (for example, Vref = 1.5V) so that the driving voltage V_LED drops to the lowest voltage preset value (for example, 1.5V), so that the infrared emitter 140 is maintained at the minimum setting value I1 as the light source intensity to project infrared rays, thereby preventing the infrared image Pir from being too bright.
[0089] When the distance detection value D is less than the threshold distance value T, and the distance detection value D is in the middle value, for example, it falls within the distance interval D2, the computing core 132 controls the driving circuit 134 of the distance detector 120 through I2C, so that the general input and output pin GPIO-1 is switched to a low potential, and the general input and output pin GPIO-2 is switched to an Open Drain state. At this time, the reference voltage Vref also falls to an intermediate value between the maximum value and the minimum value (for example, Vref = 1.833V), so that the driving voltage V_LED is adjusted to the intermediate voltage preset value 1.833V, so that the infrared transmitter 140 maintains the intermediate setting value I2 as the light source intensity to project infrared rays, so that the infrared image Pir has a moderate brightness, which is sufficient for the computing core 132 to perform face recognition.
[0090] When the distance detection value D is less than the threshold distance value T, and the distance detection value D is relatively large, for example, falling within the distance interval D3, the computing core 132 controls the driving circuit 134 of the distance detector 120 through I2C, so that the general input and output pin GPIO-1 is switched to the Open Drain state, and the general input and output pin GPIO-2 is switched to a low potential. At this time, the reference voltage Vref increases to a value higher than the intermediate value (for example, Vref = 2.167V), so that the driving voltage V_LED increases (for example, increases to 2.167V), so that the infrared transmitter 140 maintains the maximum setting value I3 as the light source intensity to project infrared rays, so that the face of a person at a long distance can also be captured with infrared images Pir brightness of sufficient brightness, which is sufficient for the computing core 132 to perform face recognition.
[0091] In the above one or more embodiments, the three distance intervals D1, D2, D3 corresponding to the three light source intensity setting values I1, I2, I3 are only examples, and the number is not limited to three, and can be two or more than four. At the same time, at least one distance interval (such as distance interval D4) can still be set above the threshold distance value T, and this distance interval D4 also corresponds to a setting value I4.
[0092] In one or more embodiments of the present invention, the face recognition device 100 switches the face recognition program to an idle state that can be awakened and started at any time. The face recognition device 100 decides whether to wake up and start the face recognition program based on the distance detection value D. Therefore, the face recognition device 100 will not normally continue to perform face recognition operations, avoiding the continuous consumption of hardware computing resources in face recognition operations. Therefore, the present invention can effectively reduce the average load of the face recognition device 100 and avoid unnecessary power consumption. At the same time, reducing the system load can avoid excessive system temperature, so as to avoid the system from entering a frequency reduction operation, so that the face recognition program can be completed quickly.
[0093] In addition, in at least one embodiment, the present invention uses the distance detection value D to determine the setting values I1, I2, and I3 of the light source intensity used for illumination, so as to ensure that the best image exposure and image capture effect can be obtained for faces from far to near, so as to facilitate the execution of face recognition operations.
[0094] Of course, the present invention may have many other embodiments. Without departing from the spirit and essence of the present invention, those skilled in the art may make various corresponding changes and modifications based on the present invention, but these corresponding changes and modifications should all fall within the scope of protection of the claims attached to the present invention.
Claims
1. A face recognition method, characterized in that: Include: Load the face recognition program, switch the face recognition program to an idle state that can be started at any time, and decide whether to wake up and start the face recognition program based on the distance detection value; Performing distance detection to obtain the distance detection value; Comparing whether the distance detection value is less than a threshold distance value; When the distance detection value is less than the threshold distance value, the face recognition program is started, a corresponding light source intensity is set according to the distance detection value, and infrared rays are projected at the light source intensity; Capturing an infrared image, and performing face recognition on the infrared image; as well as When the face recognition is successful, a corresponding event is executed; The threshold distance value is divided into a plurality of distance intervals, the light source intensity has a plurality of setting values, and each of the plurality of distance intervals corresponds to one of the plurality of setting values, and the distance detection value is used to determine the corresponding setting value of the light source intensity used for illumination, so as to ensure that the best image exposure and image capture effect are obtained for the human face from far to near; When the distance detection value is greater than the threshold distance value T and is within the distance interval in which the distance detection value can be obtained, face recognition is not performed, and the maximum intensity setting value within the specification range is used as the light source intensity to project infrared light to illuminate the environment, and infrared image streams are continuously captured and stored; When the distance detection value is less than the threshold distance value T and the distance detection value is relatively small, the computing core controls the driving circuit to reduce the driving voltage to the lowest voltage preset value, so that the infrared transmitter is maintained at the minimum setting value as the light source intensity to project infrared rays; When the distance detection value is less than the threshold distance value T and the distance detection value is at an intermediate value, the computing core controls the driving circuit to adjust the driving voltage to an intermediate voltage preset value, so that the infrared emitter is maintained at an intermediate setting value as a light source intensity to project infrared rays; When the distance detection value is less than the threshold distance value T and the distance detection value is relatively large, the computing core controls the driving circuit to increase the driving voltage until the infrared emitter is maintained at the maximum setting value as the light source intensity to project infrared rays.
2. The face recognition method according to claim 1, characterized in that: The face recognition includes: Analyze whether there is a human face in the infrared image, and correct the image of the human face; Retrieving a facial feature value combination of the face; and The facial feature value combination is compared with one of a plurality of preset feature value combinations in a feature value database to determine whether they match.
3. The face recognition method according to claim 1, characterized in that: The method further includes: when the distance detection value is less than the threshold distance value, capturing a visible light image, and displaying the visible light image.
4. The face recognition method according to claim 1, characterized in that: It further includes: when the face recognition is successful, a recognition success prompt is displayed, and the recognition success prompt includes a user identity data.
5. A face recognition device, characterized in that: Include: a distance detector, used to obtain a distance detection value; An infrared transmitter, used for projecting infrared light; An infrared image capturing lens, used for capturing an infrared image; A data processing circuit is used to load a face recognition program and switch the face recognition program to an idle state that can be started at any time; determine whether the distance detection value is less than a threshold distance value, and decide whether to wake up and start the face recognition program according to the distance detection value; the data processing circuit includes: A computing core electrically connected to the infrared image capturing lens; a driving circuit connected to the computing core and the distance detector; the distance detection value is encoded by the driving circuit and transmitted to the computing core; and a voltage regulator connected to the driving circuit and the infrared transmitter and receiving a reference voltage from the driving circuit; The computing core controls the driving circuit to switch the reference voltage according to the distance detection value, so as to adjust the magnitude of a driving voltage output by the voltage regulator to the infrared emitter, so that the light source intensity corresponds to the distance detection value; When the distance detection value is less than the threshold distance value, the data processing circuit sets a corresponding light source intensity according to the distance detection value, and drives the infrared emitter to project the infrared light with the light source intensity; and the data processing circuit performs a face recognition on the infrared image, and when the face recognition is successful, the data processing circuit executes a corresponding event; The threshold distance value is divided into a plurality of distance intervals, the light source intensity has a plurality of setting values, and each of the plurality of distance intervals corresponds to one of the plurality of setting values, and the distance detection value is used to determine the corresponding setting value of the light source intensity used for illumination, so as to ensure that the best image exposure and image capture effect are obtained for the human face from far to near; When the distance detection value is greater than the threshold distance value T and is within the distance interval in which the distance detection value can be obtained, the data processing circuit does not perform face recognition, drives the infrared emitter to project infrared light to illuminate the environment with the maximum intensity setting value within the specification range as the light source intensity, and the infrared image capture lens continuously captures and stores the infrared image stream; When the distance detection value is less than the threshold distance value T and the distance detection value is relatively small, the computing core controls the driving circuit to reduce the driving voltage to the lowest voltage preset value, so that the infrared emitter is maintained at the minimum setting value as the light source intensity to project infrared rays; When the distance detection value is less than the threshold distance value T and the distance detection value is at an intermediate value, the computing core controls the driving circuit to adjust the driving voltage to an intermediate voltage preset value, so that the infrared emitter is maintained at an intermediate setting value as a light source intensity to project infrared rays; When the distance detection value is less than the threshold distance value T and the distance detection value is relatively large, the computing core controls the driving circuit to increase the driving voltage until the infrared emitter is maintained at the maximum setting value as the light source intensity to project infrared rays.
6. The face recognition device according to claim 5, characterized in that: Also includes: a visible light image capturing lens, used to capture a visible light image and transmit it to the data processing circuit; and A display panel is used to be driven by the data processing circuit to display the visible light image.
7. The face recognition device according to claim 6, characterized in that: The invention further comprises a shell, wherein the shell has an internal space inside and a front side; wherein the distance detector is arranged on the front side for obtaining the distance detection value in front of the front side; the data processing circuit is arranged in the internal space; the infrared transmitter, the infrared image capture lens, the visible light image capture lens and the display panel are arranged on the front side.
8. The face recognition device according to claim 6, characterized in that: When the face recognition is successful, the data processing circuit drives the display panel to display a recognition success prompt, and the recognition success prompt includes a user identity data.
