Human body sensing detection method, human body sensing detection device and face recognition device
By capturing images with a binocular infrared camera and comparing the difference in feature point coordinates with the ratio of area, the problem of high false recognition rate in existing technologies is solved, achieving high accuracy and low cost in human body sensing detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GREE ELECTRIC APPLIANCE INC OF ZHUHAI
- Filing Date
- 2023-05-26
- Publication Date
- 2026-05-05
AI Technical Summary
Existing human body sensing detection methods have a high false recognition rate, especially when the ambient temperature is close to the human body temperature, the sensitivity of pyroelectric sensors decreases, resulting in a high false touch rate and false recognition rate.
Two images are captured using an infrared camera in a binocular camera system. By comparing the differences in coordinate values of multiple target feature points at different times, the system determines whether the facial information is complete and calculates the area ratio of the regions to determine whether the target object is in a moving state. Facial recognition is then performed in conjunction with a visible light camera.
It improves the accuracy of human body detection, reduces the false recognition rate, and maintains low cost and low energy consumption without requiring additional sensing devices.
Smart Images

Figure CN116631032B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of human body sensing detection, and more specifically, to a human body sensing detection method, a human body sensing detection device, a computer-readable storage medium, and a face recognition device. Background Technology
[0002] With the widespread application of facial recognition technology, the scenarios for human body detection are also increasing. For example, processing daily attendance data, access control systems, and motion-activated lights in study rooms and libraries.
[0003] Existing human body sensing technologies typically employ passive detection methods. For example, pyroelectric sensors are used in facial recognition devices. The principle behind pyroelectric sensor-based human body detection is that the sensor emits infrared light to detect the presence and movement of a human body. However, this type of detection is susceptible to interference from various heat sources, especially when the ambient temperature is close to the human body temperature. In such cases, the sensitivity of the pyroelectric sensor decreases, resulting in a high rate of false triggers and false recognitions.
[0004] Therefore, there is an urgent need for a method that can accurately detect human bodies. Summary of the Invention
[0005] The main objective of this application is to provide a human body detection method, a human body detection device, a computer-readable storage medium, and a face recognition device, so as to at least solve the problem of high false recognition rate in existing human body detection methods.
[0006] To achieve the above objectives, according to one aspect of this application, a human body detection method is provided, comprising: determining whether the facial information of a target object in the first image and the second image is complete based on the difference between the coordinate values of multiple target feature points in a first image and the coordinate values in a second image, wherein the second image was captured later than the first image, and both the first image and the second image were captured by an infrared camera in a binocular camera; if the facial information in both the first image and the second image is complete, determining the ratio of the area of a first region in the first image to the area of a second region in the second image, wherein the first region is obtained by sequentially connecting multiple target feature points in the first image, and the second region is obtained by sequentially connecting multiple target feature points in the second image; if the ratio is within a preset range, determining that a target object in a moving state exists in the target region, wherein the target region is a region reachable by the binocular camera.
[0007] Optionally, the plurality of target feature points include a first feature point, a second feature point, and a third feature point, and the coordinate values include horizontal and vertical coordinate values. Based on the differences between the coordinate values of the plurality of target feature points in the first image and the coordinate values in the second image, it is determined whether the facial information of the target object in the first image and the second image is complete, including: determining the absolute value of the difference between the horizontal coordinate value of the first feature point in the first image and the horizontal coordinate value in the second image to obtain a first horizontal coordinate difference; determining the absolute value of the difference between the horizontal coordinate value of the second feature point in the first image and the horizontal coordinate value in the second image to obtain a second horizontal coordinate difference; and determining the absolute value of the difference between the horizontal coordinate value of the third feature point in the first image and the horizontal coordinate value in the second image. The values are compared to obtain the third horizontal coordinate difference; the absolute value of the difference between the vertical coordinate value of the first feature point in the first image and the vertical coordinate value in the second image is determined to obtain the first vertical coordinate difference; the absolute value of the difference between the vertical coordinate value of the second feature point in the first image and the vertical coordinate value in the second image is determined to obtain the second vertical coordinate difference; the absolute value of the difference between the vertical coordinate value of the third feature point in the first image and the vertical coordinate value in the second image is determined to obtain the third vertical coordinate difference; based on the first horizontal coordinate difference, the second horizontal coordinate difference, and the third horizontal coordinate difference, the first vertical coordinate difference, the second vertical coordinate difference, and the third vertical coordinate difference are used to determine whether the facial information of the target object in the first image and the second image is complete.
[0008] Optionally, based on the first horizontal coordinate difference, the second horizontal coordinate difference, and the third horizontal coordinate difference, and the first vertical coordinate difference, the second vertical coordinate difference, and the third vertical coordinate difference, determining whether the facial information of the target object in the first image and the second image is complete includes: determining that the facial information in the first image and the second image is complete when the first horizontal coordinate difference is less than the first horizontal coordinate reference value, the second horizontal coordinate difference is less than the second horizontal coordinate reference value, and the third horizontal coordinate difference is less than the third horizontal coordinate reference value, and the first vertical coordinate difference is less than the first vertical coordinate reference value, the second vertical coordinate difference is less than the second vertical coordinate reference value, and the third vertical coordinate difference is less than the third vertical coordinate reference value.
[0009] Optionally, the plurality of target feature points include a first feature point, a second feature point, and a third feature point. Both the first region and the second region are triangular regions. Determining the ratio of the area of the first region in the first image to the area of the second region in the second image includes: using the formula for calculating the area of a triangle to determine the absolute value of the area of the first region in the first image, thus obtaining a first area; using the formula for calculating the area of a triangle to determine the absolute value of the area of the second region in the second image, thus obtaining a second area; and determining the ratio of the second area to the first area, thus obtaining the ratio.
[0010] Optionally, after determining that the target object is in a moving state in the target area, the human body sensing detection method further includes: turning on the visible light camera in the binocular camera to perform face recognition on the target object based on the real-time color image captured by the visible light camera.
[0011] Optionally, the human body sensing detection method further includes: keeping the visible light camera in the binocular camera off when the ratio is not within the preset range.
[0012] Optionally, before determining whether the facial information of the target object in the first image and the second image is complete based on the difference between the coordinate values of multiple target feature points in the first image and the coordinate values in the second image, the human body sensing detection method further includes: acquiring a real-time target image captured by the infrared camera, and performing human body detection based on the real-time target image to determine whether the target object exists in the target region.
[0013] According to another aspect of this application, a human body sensing detection device is provided, comprising: a first determining unit, configured to determine whether the facial information of a target object in the first image and the second image is complete based on the difference between the coordinate values of multiple target feature points in a first image and the coordinate values in a second image, wherein the second image was captured later than the first image, and both the first image and the second image were captured by an infrared camera in a binocular camera; a second determining unit, configured to determine the ratio of the area of a first region in the first image to the area of a second region in the second image when the facial information in both the first image and the second image is complete, wherein the first region is obtained by sequentially connecting multiple target feature points in the first image, and the second region is obtained by sequentially connecting multiple target feature points in the second image; and a third determining unit, configured to determine that a target object in a moving state exists in the target region when the ratio is within a preset range, wherein the target region is an area reachable by the binocular camera.
[0014] According to another aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform any of the human body sensing detection methods described above.
[0015] According to another aspect of this application, a face recognition device is provided, comprising: a human body detection device, the human body detection device being used to perform any of the human body detection methods described above; and a binocular camera, the binocular camera being used to acquire images in a target area, the target area being an area reachable by the binocular camera.
[0016] Applying the technical solution of this application, firstly, the infrared camera in a binocular camera captures a first image and a second image at two different times. Based on the difference between the coordinate values of multiple target feature points in the first image and the coordinate values in the second image, it is determined whether the facial information in the first image and the facial information in the second image are complete. Then, if the facial information in both the first and second images is complete, the area of the first region composed of multiple target feature points in the first image and the area of the second region composed of multiple target feature points in the second image are determined, and the ratio of the area of the first region to the area of the second region is determined. Finally, if the ratio of the area of the first region to the area of the second region is within a preset range, it is determined that a moving target object exists in the target area. Compared with the prior art that uses a pyroelectric sensor for human body detection, this solution uses the target feature points in the first and second images captured by the infrared camera in a binocular camera for comparative detection. This ensures higher accuracy in detecting human bodies in the target area, thereby solving the problem of high false recognition rate in existing human body detection methods. Attached Figure Description
[0017] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0018] Figure 1 A hardware structure block diagram of a mobile terminal performing a human body sensing detection method according to an embodiment of this application is shown;
[0019] Figure 2 A schematic flowchart of a human body sensing detection method according to an embodiment of this application is shown;
[0020] Figure 3 A schematic flowchart of another human body sensing detection method provided according to an embodiment of this application is shown;
[0021] Figure 4 A schematic flowchart of another human body sensing detection method provided according to an embodiment of this application is shown;
[0022] Figure 5 A schematic diagram of a human body sensing detection device according to an embodiment of this application is shown.
[0023] The above figures include the following reference numerals:
[0024] 102. Processor; 104. Memory; 106. Transmission device; 108. Input / output device. Detailed Implementation
[0025] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0026] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] As described in the background section, the false recognition rate of existing human body detection methods is relatively high. To solve the above problems, embodiments of this application provide a human body detection method, a human body detection device, a computer-readable storage medium, and a face recognition device.
[0029] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0030] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a human body sensing detection method according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0031] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the human body sensing detection method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the aforementioned networks may include wireless networks provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0032] This embodiment provides a human body sensing detection method that runs on a mobile terminal, computer terminal, or similar computing device. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Also, although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than that shown here.
[0033] Figure 2 This is a flowchart of a human body sensing detection method according to an embodiment of this application. For example... Figure 2 As shown, the human body sensing detection method includes the following steps:
[0034] Step S201: Based on the difference between the coordinate values of multiple target feature points in the first image and the coordinate values in the second image, determine whether the facial information of the target object in the first image and the second image is complete. The second image was captured later than the first image. Both the first image and the second image were captured by the infrared camera in the binocular camera.
[0035] In practical applications, multiple target feature points can refer to the center feature points of the left eye, right eye, and nose on a human face. Alternatively, multiple target feature points can also refer to the center feature points of the left eye, right eye, and mouth on a human face.
[0036] Specifically, regarding the human body detection method based on a binocular camera mentioned in this application, the infrared camera (i.e., a black-and-white camera) in the binocular camera can capture the first image, and the coordinates of each target feature point in the first image can be extracted. Taking the center feature point of the left eye, the center feature point of the right eye, and the center feature point of the nose in a face as an example, the coordinates of the center feature point of the left eye in the first image can be extracted as (X1, Y1), the coordinates of the center feature point of the right eye in the first image as (X2, Y2), and the coordinates of the center feature point of the nose in the first image as (X3, Y3). After a certain time interval (e.g., 1 second), the infrared camera in the binocular camera can capture a second image, and the coordinates of the center feature point of the left eye in the second image can be extracted as (X4, Y4), the coordinates of the center feature point of the right eye in the second image as (X5, Y5), and the coordinates of the center feature point of the nose in the second image as (X6, Y6). Therefore, based on the difference between the coordinate values of multiple target feature points in the first image and the coordinate values in the second image, it can be determined whether the facial information of the target object in the first image and the second image is complete.
[0037] Furthermore, (X1, Y1), (X2, Y2), (X3, Y3), (X4, Y4), (X5, Y5), and (X6, Y6) are the coordinate points where the first and second images are displayed on the screen. The setting of the coordinate origin is not limited in this application; any corner point of the screen or the center point of the screen can be used as the coordinate origin.
[0038] Step S202: If the facial information in the first image and the second image is complete, determine the ratio of the area of the first region in the first image to the area of the second region in the second image. The first region is obtained by sequentially connecting multiple target feature points in the first image, and the second region is obtained by sequentially connecting multiple target feature points in the second image.
[0039] Step S203: If the ratio is within a preset range, it is determined that there is a moving target object in the target area, and the target area is the area reachable by the binocular camera.
[0040] Specifically, this application does not limit the size of the aforementioned preset range, which can be flexibly adjusted according to specific circumstances.
[0041] In the human body detection method of this application, during human body detection, the infrared camera in the binocular camera captures the first and second images, while the visible light camera (color camera) in the binocular camera remains off. This further ensures low power consumption of the binocular camera.
[0042] In this embodiment, firstly, the infrared camera in a binocular camera captures two images at different times: a first image and a second image. Based on the difference between the coordinates of multiple target feature points in the first image and the coordinates of multiple target feature points in the second image, the completeness of facial information in both the first and second images is determined. Then, if the facial information in both images is complete, the area of a first region composed of multiple target feature points in the first image and the area of a second region composed of multiple target feature points in the second image are determined, along with the ratio of the areas of the first and second regions. Finally, if the ratio of the areas of the first and second regions is within a preset range, a moving target object is determined to exist in the target area. Compared to existing technologies that use pyroelectric sensors for human detection, this solution uses the infrared camera in a binocular camera to compare and detect target feature points in the first and second images. This ensures higher accuracy in detecting human presence in the target area, thus solving the problem of high false recognition rates in existing human detection methods.
[0043] In addition, since the human body detection method in this application does not require an additional human body sensing device, the cost of the human body detection method in this application is also kept low.
[0044] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0045] In the specific implementation process, the multiple target feature points mentioned above include a first feature point, a second feature point, and a third feature point. The coordinate values mentioned above include horizontal coordinate values and vertical coordinate values. The above step S201 can be implemented through steps S2011, S2012, and S2013. Step S2011: Determine the absolute value of the difference between the horizontal coordinate value of the first feature point in the first image and the horizontal coordinate value in the second image to obtain the first horizontal coordinate difference; determine the absolute value of the difference between the horizontal coordinate value of the second feature point in the first image and the horizontal coordinate value in the second image to obtain the second horizontal coordinate difference; determine the absolute value of the difference between the horizontal coordinate value of the third feature point in the first image and the horizontal coordinate value in the second image to obtain the third horizontal coordinate difference; Step S2012: Determine the absolute value of the difference between the vertical coordinate value of the first feature point in the first image and the vertical coordinate value in the second image. The process involves obtaining a first ordinate difference, determining the absolute value of the difference between the ordinate values of the second feature point in the first image and the second image, obtaining a second ordinate difference, and determining the absolute value of the difference between the ordinate values of the third feature point in the first image and the second image, obtaining a third ordinate difference. Step S2013 involves determining, based on the first, second, and third ordinate differences, whether the facial information of the target object in the first and second images is complete. In this embodiment, by calculating the difference in coordinate values of the same target feature point in the first and second images respectively, the completeness of the facial information in the first and second images is determined, thus achieving a relatively simple determination of whether the facial information in the first and second images is complete.
[0046] In one specific embodiment of this application, when the coordinates of the center feature point of the left eye in the first image are represented as (X1, Y1), the coordinates of the center feature point of the right eye in the first image are represented as (X2, Y2), and the coordinates of the center feature point of the nose in the first image are represented as (X3, Y3), and the coordinates of the center feature point of the left eye in the second image are represented as (X4, Y4), the coordinates of the center feature point of the right eye in the second image are represented as (X5, Y5), and the coordinates of the center feature point of the nose in the second image are represented as (X6, Y6), the first abscissa of the first feature point is... The difference can be the absolute value of the difference between X1 and X4, i.e., |X1-X4|. The difference of the first ordinate of the first feature point can be the absolute value of the difference between Y1 and Y4, i.e., |Y1-Y4|. The difference of the second abscissa of the second feature point can be the absolute value of the difference between X2 and X5, i.e., |X2-X5|. The difference of the second ordinate of the second feature point can be the absolute value of the difference between Y2 and Y5, i.e., |Y2-Y5|. The difference of the third abscissa of the third feature point can be the absolute value of the difference between X3 and X6, i.e., |X3-X6|. The difference of the third ordinate of the third feature point can be the absolute value of the difference between Y3 and Y6, i.e., |Y3-Y6|.
[0047] To further and more easily determine whether the facial information in the first and second images is complete, step S2013 of this application can be achieved through the following steps: If the difference between the first and second horizontal coordinates is less than the first horizontal coordinate reference value, the difference between the second and third horizontal coordinates is less than the third horizontal coordinate reference value, and the difference between the first and second vertical coordinates is less than the first vertical coordinate reference value, the difference between the second and third vertical coordinates is less than the third vertical coordinate reference value, then it is determined that the facial information in both the first and second images is complete. Simultaneously, if the difference between the first and second horizontal coordinates is less than the first horizontal coordinate reference value, the difference between the second and third horizontal coordinates is less than the third horizontal coordinate reference value, and the difference between the first and second vertical coordinates is less than the first vertical coordinate reference value, the difference between the second and third vertical coordinates is less than the second vertical coordinate reference value, and the difference between the third and fourth vertical coordinates is less than the third vertical coordinate reference value, it also indicates that the first and second images captured by the infrared camera of the binocular camera are stable.
[0048] In practical applications, if any of the above conditions are not met—that is, if the difference between the first horizontal coordinate and the second horizontal coordinate is greater than or equal to the first horizontal coordinate reference value, or the difference between the second and third horizontal coordinates is greater than or equal to the third horizontal coordinate reference value, or the difference between the first and second vertical coordinates is greater than or equal to the first vertical coordinate reference value, or the difference between the second and third vertical coordinates is greater than or equal to the third vertical coordinate reference value—it indicates that the first and second images captured by the infrared camera are not stable, meaning that the facial information in the first and / or second images is incomplete.
[0049] In some embodiments, the plurality of target feature points include a first feature point, a second feature point, and a third feature point. Both the first region and the second region are triangular in shape. Step S202 can be implemented specifically through steps S2021, S2022, and S2023. Step S2021: Using the formula for calculating the area of a triangle, the absolute value of the area of the first region in the first image is determined to obtain the first area. Step S2022: Using the formula for calculating the area of a triangle, the absolute value of the area of the second region in the second image is determined to obtain the second area. Step S2023: The ratio of the second area to the first area is determined to obtain the ratio. Subsequently, based on the ratio of the second area to the first area, it can be further and more easily determined whether a moving target object exists in the target region.
[0050] In one specific embodiment of this application, taking multiple target feature points in the first image as an example, and assuming that the multiple target feature points are the coordinates of the center feature point of the left eye in the first image (X1, Y1), the center feature point of the right eye in the first image (X2, Y2), and the center feature point of the nose in the first image (X3, Y3), then based on the three target feature points in the first image, a first region can be obtained that is a triangular region. Therefore, it is possible to use... Calculate the area of the first region. The calculation of the area of the second region in the second image is the same as that of the first region in the first image, and the process of calculating the area of the second region in the second image will not be repeated here.
[0051] In one specific embodiment of this application, the aforementioned preset range can be 0.85 to 1. For example, if the ratio of the second area to the first area is between 0.85 and 1, it indicates that a target object is slowly approaching the binocular camera in the target area. If the ratio of the second area to the first area is not between 0.85 and 1, it indicates that there is no target object slowly approaching the binocular camera in the target area, or that the target object in the target area is moving rapidly.
[0052] In one embodiment of this application, the human body detection method further includes step S204: after determining that a moving target object exists in the target area, the visible light camera in the binocular camera is turned on to perform face recognition on the target object based on the real-time color image captured by the visible light camera. That is, the visible light camera in the binocular camera is turned on only after a moving target object is detected in the target area; otherwise, the visible light camera remains off, thus ensuring low overall power consumption of the binocular camera.
[0053] In practical applications, the human body detection method of this application further includes step S205, in which the visible light camera in the binocular camera remains off when the ratio is not within the preset range. That is, if the ratio of the second area to the first area is not between 0.85 and 1, the visible light camera in the binocular camera remains off, thus further ensuring that the overall energy consumption of the binocular camera is low.
[0054] To ensure a low overall computational load, in some embodiments, the human body detection method of this application further includes step S206, which involves acquiring a real-time target image captured by the infrared camera and performing human body detection based on the difference in coordinate values of multiple target feature points in the first and second images to determine whether the facial information of the target object in the first and second images is complete.
[0055] This application does not limit the specific method for human detection based on real-time target images. Human detection can be performed based on the pixel size in the extracted real-time target image. Of course, specific target detection methods can also be used for human detection. The specific method can be flexibly adjusted according to the computing power of the binocular camera and the actual usage scenario.
[0056] To enable those skilled in the art to better understand the technical solution of this application, the implementation process of the human body sensing detection method of this application will be described in detail below with reference to specific embodiments.
[0057] This embodiment relates to a specific human body sensing detection method, such as... Figure 3 As shown, it includes the following steps:
[0058] Step S1: The infrared camera in the binocular camera takes a first image and a second image, and determines whether the facial information in the first image and the second image is complete.
[0059] Step S2: If the facial information in the first and second images is complete, determine whether the ratio of the second area to the first area is within a preset range. The second area is the absolute value of the area of the second region in the second image, and the first area is the absolute value of the area of the first region in the first image. The second region is obtained by sequentially connecting multiple target feature points in the second image, and the first region is obtained by sequentially connecting multiple target feature points in the first image.
[0060] Step S3: If the ratio of the second area to the first area is within a preset range, it indicates that there is a moving target object in the target area, that is, a target object is slowly approaching the binocular camera. Then, the visible light camera is turned on to perform face recognition on the target object through the real-time color image captured by the visible light camera. If the ratio of the second area to the first area is not within a preset range, the visible light camera is kept off.
[0061] This embodiment relates to another specific human body sensing detection method, such as... Figure 4 As shown, it includes the following steps:
[0062] Step S1: The infrared camera in the dual-target camera system captures a real-time target image and performs human detection based on the image. If a human body is detected in the real-time target image (i.e., a target object exists), the infrared camera captures the first image. If no human body is detected in the real-time target image (i.e., no target object exists), the image is saved, and the visible light camera is turned off.
[0063] Step S2: Extract the coordinate values of three target feature points in the first image, namely, extract the coordinate values of the center feature point of the left eye in the first image, namely (X1, Y1), the coordinate values of the center feature point of the right eye in the first image, namely (X2, Y2), and the coordinate values of the center feature point of the nose in the first image, namely (X3, Y3).
[0064] Step S3: The infrared camera in the binocular camera continues to capture a second image after a 1-second interval.
[0065] Step S4: Extract the coordinate values of three target feature points in the second image, namely, extract the coordinate values of the center feature point of the left eye in the second image, namely (X4, Y4), the coordinate values of the center feature point of the right eye in the second image, namely (X5, Y5), and the coordinate values of the center feature point of the nose in the second image, namely (X6, Y6).
[0066] Step S5: Determine whether the differences between the coordinates of the three target features in the first image and the coordinates in the second image meet preset conditions. Specifically, if the difference in the first horizontal coordinate (|X1-X4|) is less than the first horizontal coordinate reference value, the difference in the second horizontal coordinate (|X2-X5|) is less than the second horizontal coordinate reference value, and the difference in the third horizontal coordinate (|X3-X6|) is less than the third horizontal coordinate reference value, and the difference in the first vertical coordinate (|Y1-Y4|) is less than the first vertical coordinate reference value, the difference in the second vertical coordinate (|Y2-Y5|) is less than the second vertical coordinate reference value, and the difference in the third vertical coordinate (|Y3-Y6|) is less than the third vertical coordinate reference value, then the facial information in both the first and second images is complete. If none of the above conditions are met, the facial information in both the first and second images is determined to be incomplete, and the visible light camera remains off.
[0067] Step S6: If the facial information in both the first and second images is complete, determine whether the ratio of the second area to the first area is within a preset range. If the ratio is within the preset range, it is determined that a moving target object exists in the target area, i.e., someone is slowly approaching the binocular camera. In this case, the visible light camera is activated, and the real-time color image captured by the visible light camera is used for facial recognition of the target object. If the ratio is not within the preset range, it is determined that no moving target object exists in the target area, or that the target object in the target area is moving rapidly; therefore, the visible light camera remains off.
[0068] This application also provides a human body sensing detection device. It should be noted that the human body sensing detection device of this application can be used to execute the human body sensing detection method provided in this application. This device is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0069] The human body sensing detection device provided in the embodiments of this application will be described below.
[0070] Figure 5 This is a schematic diagram of the structure of a human body sensing detection device according to an embodiment of this application. Figure 5 As shown, the human body detection device includes:
[0071] The first determining unit 10 determines whether the facial information of the target object in the first image and the second image is complete based on the difference between the coordinate values of multiple target feature points in the first image and the coordinate values in the second image. The second image was captured later than the first image. Both the first image and the second image were captured by the infrared camera in the binocular camera.
[0072] In practical applications, multiple target feature points can refer to the center feature points of the left eye, right eye, and nose on a human face. Alternatively, multiple target feature points can also refer to the center feature points of the left eye, right eye, and mouth on a human face.
[0073] Specifically, regarding the human body detection method based on a binocular camera mentioned in this application, the infrared camera in the binocular camera can capture a first image, and the coordinates of each target feature point in the first image can be extracted. Taking the center feature point of the left eye, the center feature point of the right eye, and the center feature point of the nose as examples, the coordinates of the center feature point of the left eye in the first image can be extracted as (X1, Y1), the coordinates of the center feature point of the right eye in the first image as (X2, Y2), and the coordinates of the center feature point of the nose in the first image as (X3, Y3). After a certain time interval (e.g., 1 second), the infrared camera in the binocular camera can capture a second image, and the coordinates of the center feature point of the left eye in the second image can be extracted as (X4, Y4), the coordinates of the center feature point of the right eye in the second image as (X5, Y5), and the coordinates of the center feature point of the nose in the second image as (X6, Y6). Therefore, based on the difference between the coordinate values of multiple target feature points in the first image and the coordinate values in the second image, it can be determined whether the facial information of the target object in the first image and the second image is complete.
[0074] Furthermore, (X1, Y1), (X2, Y2), (X3, Y3), (X4, Y4), (X5, Y5), and (X6, Y6) are the coordinate points where the first and second images are displayed on the screen. The setting of the coordinate origin is not limited in this application; any corner point of the screen or the center point of the screen can be used as the coordinate origin.
[0075] The second determining unit 20, when the facial information in the first image and the second image is complete, determines the ratio of the area of the first region in the first image to the area of the second region in the second image, wherein the first region is obtained by sequentially connecting multiple target feature points in the first image, and the second region is obtained by sequentially connecting multiple target feature points in the second image.
[0076] The third determining unit 30 determines that, when the ratio is within a preset range, there is a moving target object in the target area, and the target area is the area reachable by the binocular camera.
[0077] Specifically, this application does not limit the size of the aforementioned preset range, which can be flexibly adjusted according to specific circumstances.
[0078] In the human body detection device of this application, during human body detection, the infrared camera in the binocular camera captures the first and second images, while the visible light camera in the binocular camera remains off. This further ensures low power consumption of the binocular camera.
[0079] In this embodiment, an infrared camera in a binocular camera captures a first image and a second image at two different times. A first determining unit determines whether the facial information in the first image and the second image is complete based on the difference between the coordinates of multiple target feature points in the first image and the coordinates of multiple target feature points in the second image. A second determining unit, if the facial information in both the first and second images is complete, determines the area of a first region composed of multiple target feature points in the first image and the area of a second region composed of multiple target feature points in the second image, and determines the ratio of the area of the first region to the area of the second region. A third determining unit, if the ratio of the area of the first region to the area of the second region is within a preset range, determines that a moving target object exists in the target area. Compared with the prior art using pyroelectric sensors for human body detection, this solution uses the first and second images captured by the infrared camera in a binocular camera for comparative detection of target feature points. This ensures higher accuracy in detecting human bodies in the target area, thus solving the problem of high false recognition rates in existing human body detection methods.
[0080] In addition, since the human body detection device in this application does not require an additional human body sensing device, the cost of the human body detection device in this application is also kept low.
[0081] In the specific implementation process, the multiple target feature points include a first feature point, a second feature point, and a third feature point. The coordinate values include horizontal and vertical coordinate values. The first determining unit includes a first determining module, a second determining module, and a third determining module. Specifically, the first determining module is used to determine the absolute value of the difference between the horizontal coordinate value of the first feature point in the first image and its horizontal coordinate value in the second image, obtaining a first horizontal coordinate difference; determine the absolute value of the difference between the horizontal coordinate value of the second feature point in the first image and its horizontal coordinate value in the second image, obtaining a second horizontal coordinate difference; and determine the absolute value of the difference between the horizontal coordinate value of the third feature point in the first image and its horizontal coordinate value in the second image, obtaining a third horizontal coordinate difference. The second determining module is used to determine the absolute value of the difference between the vertical coordinate value of the first feature point in the first image and its vertical coordinate value in the second image. The first vertical coordinate difference is obtained by calculating the absolute value of the difference between the vertical coordinate values of the second feature point in the first image and the second image, thus obtaining the second vertical coordinate difference. Similarly, the absolute value of the difference between the vertical coordinate values of the third feature point in the first image and the second image is determined, resulting in the third vertical coordinate difference. The third determining module is used to determine, based on the first horizontal coordinate difference, the second horizontal coordinate difference, and the third horizontal coordinate difference, as well as the first vertical coordinate difference, the second vertical coordinate difference, and the third vertical coordinate difference, whether the facial information of the target object in the first image and the second image is complete. In this embodiment, by calculating the difference in coordinate values of the same target feature point in the first image and the second image, the completeness of the facial information in the first image and the second image is determined, thus achieving a relatively simple determination of whether the facial information in the first image and the second image is complete.
[0082] In one specific embodiment of this application, when the coordinates of the center feature point of the left eye in the first image are represented as (X1, Y1), the coordinates of the center feature point of the right eye in the first image are represented as (X2, Y2), and the coordinates of the center feature point of the nose in the first image are represented as (X3, Y3), and the coordinates of the center feature point of the left eye in the second image are represented as (X4, Y4), the coordinates of the center feature point of the right eye in the second image are represented as (X5, Y5), and the coordinates of the center feature point of the nose in the second image are represented as (X6, Y6), the first abscissa of the first feature point is... The difference can be the absolute value of the difference between X1 and X4, i.e., |X1-X4|. The difference of the first ordinate of the first feature point can be the absolute value of the difference between Y1 and Y4, i.e., |Y1-Y4|. The difference of the second abscissa of the second feature point can be the absolute value of the difference between X2 and X5, i.e., |X2-X5|. The difference of the second ordinate of the second feature point can be the absolute value of the difference between Y2 and Y5, i.e., |Y2-Y5|. The difference of the third abscissa of the third feature point can be the absolute value of the difference between X3 and X6, i.e., |X3-X6|. The difference of the third ordinate of the third feature point can be the absolute value of the difference between Y3 and Y6, i.e., |Y3-Y6|.
[0083] To further and more easily determine whether the facial information in the first and second images is complete, the third determining module includes a first determining submodule, used to determine that the facial information in both the first and second images is complete when the difference between the first and second horizontal coordinates is less than the first horizontal coordinate reference value, the difference between the second and third horizontal coordinates is less than the second horizontal coordinate reference value, and the difference between the first and second vertical coordinates is less than the first vertical coordinate reference value, the difference between the second and third vertical coordinates is less than the second vertical coordinate reference value, and the difference between the third and fourth vertical coordinates is less than the third vertical coordinate reference value. Simultaneously, the fact that the difference between the first and second horizontal coordinates is less than the first horizontal coordinate reference value, the difference between the second and third horizontal coordinates is less than the third horizontal coordinate reference value, and the difference between the first and second vertical coordinates is less than the first vertical coordinate reference value, the difference between the second and third vertical coordinates is less than the second vertical coordinate reference value, and the difference between the third and fourth vertical coordinates is less than the third vertical coordinate reference value also indicates that the first and second images captured by the infrared camera of the binocular camera are stable.
[0084] In practical applications, if any of the above conditions are not met—that is, if the difference between the first horizontal coordinate and the second horizontal coordinate is greater than or equal to the first horizontal coordinate reference value, or the difference between the second and third horizontal coordinates is greater than or equal to the third horizontal coordinate reference value, or the difference between the first and second vertical coordinates is greater than or equal to the first vertical coordinate reference value, or the difference between the second and third vertical coordinates is greater than or equal to the third vertical coordinate reference value—it indicates that the first and second images captured by the infrared camera are not stable, meaning that the facial information in the first and / or second images is incomplete.
[0085] In some embodiments, the plurality of target feature points include a first feature point, a second feature point, and a third feature point. Both the first region and the second region are triangular in shape. The second determining unit includes a fourth determining module, a fifth determining module, and a sixth determining module. The fourth determining module is used to determine the absolute value of the area of the first region in the first image using the formula for calculating the area of a triangle, thus obtaining a first area. The fifth determining module is used to determine the absolute value of the area of the second region in the second image using the same formula, thus obtaining a second area. The sixth determining module is used to determine the ratio of the second area to the first area, thus obtaining the ratio. Subsequently, based on the ratio of the second area to the first area, it is further and more easily determined whether a moving target object exists in the target region.
[0086] In one specific embodiment of this application, taking multiple target feature points in the first image as an example, and assuming that the multiple target feature points are the coordinates of the center feature point of the left eye in the first image (X1, Y1), the center feature point of the right eye in the first image (X2, Y2), and the center feature point of the nose in the first image (X3, Y3), then based on the three target feature points in the first image, a first region can be obtained that is a triangular region. Therefore, it is possible to use... Calculate the area of the first region. The calculation of the area of the second region in the second image is the same as that of the first region in the first image, and the process of calculating the area of the second region in the second image will not be repeated here.
[0087] In one specific embodiment of this application, the aforementioned preset range can be 0.85 to 1. For example, if the ratio of the second area to the first area is between 0.85 and 1, it indicates that a target object is slowly approaching the binocular camera in the target area. If the ratio of the second area to the first area is not between 0.85 and 1, it indicates that there is no target object slowly approaching the binocular camera in the target area, or that the target object in the target area is moving rapidly.
[0088] In one embodiment of this application, the human body detection device further includes a recognition unit, configured to activate the visible light camera in the binocular camera after determining that a moving target object exists in the target area, so as to perform face recognition on the target object based on the real-time color image captured by the visible light camera. In other words, the visible light camera in the binocular camera is activated only after a moving target object is detected in the target area; otherwise, it remains off when no moving target object is detected in the target area, thus ensuring low overall power consumption of the binocular camera.
[0089] In practical applications, the human body sensing detection device of this application further includes an execution unit, used to keep the visible light camera in the binocular camera off when the ratio is not within the preset range. That is, when the ratio of the second area to the first area is not between 0.85 and 1, the visible light camera in the binocular camera remains off, thus further ensuring that the overall energy consumption of the binocular camera is low.
[0090] To ensure a low overall computational load, in some embodiments, the human body detection device of this application further includes an acquisition unit, which is used to acquire a real-time target image captured by the infrared camera before determining whether the facial information of the target object in the first image and the second image is complete based on the difference in coordinate values of multiple target feature points in the first image and the second image, and to perform human body detection based on the real-time target image to determine whether the target object exists in the target area.
[0091] The aforementioned human body detection device includes a processor and a memory. The first determining unit, the second determining unit, and the third determining unit are all stored as program units in the memory. The processor executes the program units stored in the memory to achieve the corresponding functions. All of the above modules are located in the same processor; alternatively, the modules may be located in different processors in any combination.
[0092] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and adjusting kernel parameters can address the high false recognition rate of existing human body detection methods.
[0093] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0094] This invention provides a computer-readable storage medium including a stored program, wherein the program, when running, controls the device containing the computer-readable storage medium to execute the human body detection method.
[0095] Specifically, human body sensing detection methods include:
[0096] Step S201: Based on the difference between the coordinate values of multiple target feature points in the first image and the coordinate values in the second image, determine whether the facial information of the target object in the first image and the second image is complete. The second image was captured later than the first image. Both the first image and the second image were captured by the infrared camera in the binocular camera.
[0097] Step S202: If the facial information in the first image and the second image is complete, determine the ratio of the area of the first region in the first image to the area of the second region in the second image. The first region is obtained by sequentially connecting multiple target feature points in the first image, and the second region is obtained by sequentially connecting multiple target feature points in the second image.
[0098] Step S203: If the ratio is within a preset range, it is determined that there is a moving target object in the target area, and the target area is the area reachable by the binocular camera.
[0099] This invention provides an electronic device including a memory and a processor. The memory stores a computer program, and the processor is configured to execute the human body sensing detection method described above through the computer program.
[0100] Specifically, human body sensing detection methods include:
[0101] Step S201: Based on the difference between the coordinate values of multiple target feature points in the first image and the coordinate values in the second image, determine whether the facial information of the target object in the first image and the second image is complete. The second image was captured later than the first image. Both the first image and the second image were captured by the infrared camera in the binocular camera.
[0102] Step S202: If the facial information in the first image and the second image is complete, determine the ratio of the area of the first region in the first image to the area of the second region in the second image. The first region is obtained by sequentially connecting multiple target feature points in the first image, and the second region is obtained by sequentially connecting multiple target feature points in the second image.
[0103] Step S203: If the ratio is within a preset range, it is determined that there is a moving target object in the target area, and the target area is the area reachable by the binocular camera.
[0104] In a typical embodiment of this application, a face recognition device is also provided. The face recognition device includes a human body detection device and a binocular camera. The human body detection device is used to execute any of the aforementioned human body detection methods; the binocular camera is used to acquire images of a target area, where the target area is an area accessible to the binocular camera.
[0105] The aforementioned face recognition device includes a human body detection device and a binocular camera. The human body detection device is used to execute any of the aforementioned human body detection methods. Compared with existing technologies that use pyroelectric sensors for human body detection, this solution uses a binocular camera to compare and detect target feature points in the first and second images captured by infrared light imaging. This ensures higher accuracy in detecting human bodies in the target area, thus solving the problem of high false recognition rates in existing human body detection methods.
[0106] This invention provides a device including a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs at least the following steps:
[0107] Step S201: Based on the difference between the coordinate values of multiple target feature points in the first image and the coordinate values in the second image, determine whether the facial information of the target object in the first image and the second image is complete. The second image was captured later than the first image. Both the first image and the second image were captured by the infrared camera in the binocular camera.
[0108] Step S202: If the facial information in the first image and the second image is complete, determine the ratio of the area of the first region in the first image to the area of the second region in the second image. The first region is obtained by sequentially connecting multiple target feature points in the first image, and the second region is obtained by sequentially connecting multiple target feature points in the second image.
[0109] Step S203: If the ratio is within a preset range, it is determined that there is a moving target object in the target area, and the target area is the area reachable by the binocular camera.
[0110] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.
[0111] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having at least the following method steps:
[0112] Step S201: Based on the difference between the coordinate values of multiple target feature points in the first image and the coordinate values in the second image, determine whether the facial information of the target object in the first image and the second image is complete. The second image was captured later than the first image. Both the first image and the second image were captured by the infrared camera in the binocular camera.
[0113] Step S202: If the facial information in the first image and the second image is complete, determine the ratio of the area of the first region in the first image to the area of the second region in the second image. The first region is obtained by sequentially connecting multiple target feature points in the first image, and the second region is obtained by sequentially connecting multiple target feature points in the second image.
[0114] Step S203: If the ratio is within a preset range, it is determined that there is a moving target object in the target area, and the target area is the area reachable by the binocular camera.
[0115] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0116] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0117] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0118] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0119] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0120] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0121] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0122] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0123] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0124] As can be seen from the above description, the embodiments of this application achieve the following technical effects:
[0125] 1) In the human body detection method of this application, firstly, the infrared camera in a binocular camera captures a first image and a second image at two different times. Based on the difference between the coordinate values of multiple target feature points in the first image and the coordinate values in the second image, it is determined whether the face information in the first image and the face information in the second image are complete. Then, if the face information in both the first and second images is complete, the area of the first region composed of multiple target feature points in the first image and the area of the second region composed of multiple target feature points in the second image are determined, and the ratio of the area of the first region to the area of the second region is determined. Finally, if the ratio of the area of the first region to the area of the second region is within a preset range, it is determined that there is a moving target object in the target area. Compared with the prior art that uses a pyroelectric sensor for human body detection, this solution uses the target feature points in the first and second images captured by the infrared camera in a binocular camera for comparative detection. This ensures higher accuracy in detecting human body in the target area, thereby solving the problem of high false recognition rate in the prior art's human body detection methods.
[0126] 2) In the human body detection device of this application, the infrared camera in the binocular camera captures a first image and a second image at two different times. The first determining unit is used to determine whether the face information in the first image and the face information in the second image are complete based on the difference between the coordinate values of multiple target feature points in the first image and the coordinate values in the second image. The second determining unit is used to determine the area of the first region composed of multiple target feature points in the first image and the area of the second region composed of multiple target feature points in the second image, and to determine the ratio of the area of the first region to the area of the second region, if the face information in both the first and second images is complete. The third determining unit is used to determine that there is a moving target object in the target area if the ratio of the area of the first region to the area of the second region is within a preset range. Compared with the prior art of using pyroelectric sensors for human body detection, this solution uses the target feature points in the first and second images captured by the infrared camera in the binocular camera for comparative detection, which ensures higher accuracy of human body detection in the target area, thereby solving the problem of high false recognition rate of human body detection methods in the prior art.
[0127] 3) The face recognition device of this application includes a human body detection device and a binocular camera. The aforementioned human body detection device is used to execute any of the above-described human body detection methods. Compared with the prior art, which uses a pyroelectric sensor for human body detection, this solution uses the infrared light captured by the binocular camera to compare and detect target feature points in the first and second images. This ensures higher accuracy in detecting human bodies in the target area, thereby solving the problem of high false recognition rates in existing human body detection methods.
[0128] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A human body sensing detection method, characterized in that, include: Based on the difference between the coordinate values of multiple target feature points in the first image and the coordinate values in the second image, it is determined whether the facial information of the target object in the first image and the second image is complete. The second image was captured later than the first image. Both the first image and the second image were captured by the infrared camera in the binocular camera. When the facial information in both the first image and the second image is complete, the ratio of the area of the first region in the first image to the area of the second region in the second image is determined. The first region is obtained by sequentially connecting multiple target feature points in the first image, and the second region is obtained by sequentially connecting multiple target feature points in the second image. If the ratio is within a preset range, it is determined that a moving target object exists in the target area, and the target area is the area reachable by the binocular camera. The multiple target feature points include a first feature point, a second feature point, and a third feature point. The coordinate values include horizontal and vertical coordinate values. Based on the difference between the coordinate values of the multiple target feature points in the first image and the coordinate values in the second image, the completeness of the facial information of the target object in the first and second images is determined, including: The absolute value of the difference between the abscissa value of the first feature point in the first image and the abscissa value in the second image is determined to obtain the first abscissa difference value. The absolute value of the difference between the abscissa value of the second feature point in the first image and the abscissa value in the second image is determined to obtain the second abscissa difference value. The absolute value of the difference between the abscissa value of the third feature point in the first image and the abscissa value in the second image is determined to obtain the third abscissa difference value. The absolute value of the difference between the ordinate value of the first feature point in the first image and the ordinate value in the second image is determined to obtain the first ordinate difference value. The absolute value of the difference between the ordinate value of the second feature point in the first image and the ordinate value in the second image is determined to obtain the second ordinate difference value. The absolute value of the difference between the ordinate value of the third feature point in the first image and the ordinate value in the second image is determined to obtain the third ordinate difference value. Based on the first horizontal coordinate difference, the second horizontal coordinate difference, and the third horizontal coordinate difference, as well as the first vertical coordinate difference, the second vertical coordinate difference, and the third vertical coordinate difference, it is determined whether the facial information of the target object in the first image and the second image is complete.
2. The human body sensing detection method according to claim 1, characterized in that, Based on the first horizontal coordinate difference, the second horizontal coordinate difference, and the third horizontal coordinate difference, and the first vertical coordinate difference, the second vertical coordinate difference, and the third vertical coordinate difference, it is determined whether the facial information of the target object in the first image and the second image is complete, including: If the first horizontal coordinate difference is less than the first horizontal coordinate reference value, the second horizontal coordinate difference is less than the second horizontal coordinate reference value, and the third horizontal coordinate difference is less than the third horizontal coordinate reference value, and the first vertical coordinate difference is less than the first vertical coordinate reference value, the second vertical coordinate difference is less than the second vertical coordinate reference value, and the third vertical coordinate difference is less than the third vertical coordinate reference value, then it is determined that the facial information in the first image and the second image is complete.
3. The human body sensing detection method according to claim 1, characterized in that, The plurality of target feature points include a first feature point, a second feature point, and a third feature point, wherein the first region and the second region are both triangular regions. Determining the ratio of the area of the first region in the first image to the area of the second region in the second image includes: The absolute value of the area of the first region in the first image is determined by using the formula for calculating the area of a triangle, thus obtaining the first area; Using the formula for calculating the area of the triangle, the absolute value of the area of the second region in the second image is determined to obtain the second area; The ratio of the second area to the first area is determined to obtain the ratio.
4. The human body sensing detection method according to any one of claims 1 to 3, characterized in that, After determining that the target object is in a moving state within the target area, the human body sensing detection method further includes: The visible light camera in the binocular camera is activated to perform facial recognition on the target object based on the real-time color image captured by the visible light camera.
5. The human body sensing detection method according to any one of claims 1 to 3, characterized in that, The human body sensing detection method also includes: If the ratio is not within the preset range, the visible light camera in the binocular camera remains off.
6. The human body sensing detection method according to any one of claims 1 to 3, characterized in that, Before determining whether the facial information of the target object in the first image and the second image is complete based on the difference between the coordinate values of multiple target feature points in the first image and the coordinate values in the second image, the human body sensing detection method further includes: The system acquires real-time target images captured by the infrared camera and performs human detection based on the real-time target images to determine whether the target object exists in the target area.
7. A human body sensing detection device, characterized in that, include: The first determining unit is used to determine whether the facial information of the target object in the first image and the second image is complete based on the difference between the coordinate values of multiple target feature points in the first image and the coordinate values in the second image, wherein the second image was captured later than the first image, and both the first image and the second image were captured by the infrared camera in the binocular camera. The second determining unit is used to determine the ratio of the area of the first region in the first image to the area of the second region in the second image when the face information in the first image and the second image are both complete. The first region is obtained by sequentially connecting multiple target feature points in the first image, and the second region is obtained by sequentially connecting multiple target feature points in the second image. The third determining unit is used to determine, when the ratio is within a preset range, that there is a moving target object in the target area, wherein the target area is the area reachable by the binocular camera. The plurality of target feature points include a first feature point, a second feature point, and a third feature point. The coordinate values include abscissa and ordinate. The first determining unit includes a first determining module, a second determining module, and a third determining module. The first determining module is used to determine the absolute value of the difference between the abscissa of the first feature point in the first image and the abscissa in the second image to obtain a first abscissa difference; to determine the absolute value of the difference between the abscissa of the second feature point in the first image and the abscissa in the second image to obtain a second abscissa difference; and to determine the absolute value of the difference between the abscissa of the third feature point in the first image and the abscissa in the second image to obtain a third abscissa difference. The second determining module is used to determine the absolute value of the difference between the ordinate value of the first feature point in the first image and the ordinate value in the second image to obtain a first ordinate difference; to determine the absolute value of the difference between the ordinate value of the second feature point in the first image and the ordinate value in the second image to obtain a second ordinate difference; and to determine the absolute value of the difference between the ordinate value of the third feature point in the first image and the ordinate value in the second image to obtain a third ordinate difference. The third determining module is used to determine whether the facial information of the target object in the first image and the second image is complete based on the first horizontal coordinate difference, the second horizontal coordinate difference, the third horizontal coordinate difference, the first vertical coordinate difference, the second vertical coordinate difference, and the third vertical coordinate difference.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device containing the computer-readable storage medium to perform the human body sensing detection method according to any one of claims 1 to 6.
9. A face recognition device, characterized in that, include: A human body sensing detection device, wherein the human body sensing detection device is used to perform the human body sensing detection method according to any one of claims 1 to 6; A binocular camera, used to capture images of a target area, wherein the target area is the area reachable by the binocular camera.
Citation Information
Patent Citations
Face recognition method and device and electronic equipment
CN111191556A
Living body detection method and system of binocular camera and computer storage medium
CN113609950A