Face recognition preview image adjustment method, intelligent access control system and intelligent door
By collecting and correcting the camera offset in the intelligent access control system and adjusting the face recognition preview image, the problem of face recognition preview image offset in the smart gate is solved, and the recognition success rate is improved.
Patent Information
- Application Number
- CN202211364749.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-02
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2042-11-02
AI Technical Summary
When the 3D structured light face recognition module is integrated with the smart gate, the Android system's support for three cameras is unstable, resulting in the installation error of the Maoyan camera and the IR camera, causing the face recognition preview image to shift, affecting the recognition success rate.
By setting the target board and collecting its images, determining the offset of the camera, correcting the installation position, ensuring the imaging position of the Maoyan camera and the IR camera, using the face recognition preview image adjustment method, and adjusting the Preview images to improve the success rate of face recognition.
The imaging position matching between Maoyan camera and IR camera is achieved, and the face recognition preview image does not shift, which improves the success rate of face recognition.
Smart Images

Figure CN115830759B_ABST
Abstract
Description
Technical Field
[0001] The present invention generally relates to the field of face recognition technology, and in particular to a face recognition preview image adjustment method, an intelligent access control system and a smart door. Background Art
[0002] In recent years, 3D structured light face recognition technology has been widely used in various fields due to its excellent characteristics of accurate recognition. The existing mature 3D structured light face recognition module generally includes two cameras and a projection unit. The two cameras are infrared (IR) camera and RBG camera (reference Figure 1a ), IR cameras are mainly used to collect depth information to achieve face registration and face recognition, and RGB cameras are mainly used to collect face images to facilitate alignment preview during face recognition so that the face falls within the recognition area. Driven by factors such as convenience and security, 3D structured light face recognition technology is also gradually being used in home smart doors. Existing smart doors are equipped with electronic cat-eye systems. Cat-eye cameras capture images of the environment outside the door and visitors, which are displayed on the display screen inside the door, or pushed to the user's mobile terminal through the network to achieve clear and real-time cat-eye monitoring.
[0003] When integrating the 3D structured light face recognition module with the smart door to realize face recognition door opening, the following problems will be faced: ① Since the Android system's support for three cameras is unstable, abnormal situations will occur when the cat's eye camera, IR camera and RGB camera are used at the same time; ② To solve this problem, simply remove the RGB camera (refer to Figure 1b ), using a cat's eye camera instead of an RGB camera for alignment preview, which can not only solve the problem of unstable support of the operating system for three cameras, but also reduce costs. However, the cat's eye camera and the IR camera need to be installed on the mid-vertical line of the display screen. Due to installation errors during the production process, the cat's eye camera and the IR camera produce imaging deviations. When the user adjusts the position or adjusts the face orientation according to the alignment preview image during face recognition, the imaging deviation will make it difficult for the user's face to fall into the appropriate face recognition area, thereby affecting the success rate of face recognition. Therefore, a face recognition preview image adjustment method is needed to match the imaging positions of the cat's eye camera and the IR camera, and the face recognition preview image will not be offset, thereby improving the success rate of face recognition.
[0004] The contents of the background technology section are merely the technologies known to the inventors and do not necessarily represent the prior art in the field. Summary of the invention
[0005] In view of one or more problems existing in the prior art, the present invention provides a face recognition preview image adjustment method, which is used in an intelligent access control system. By adopting the technical solution of the present invention, the imaging position matching of a cat's eye camera and an IR camera can be achieved, and the face recognition preview image will not be offset, which is conducive to improving the success rate of face recognition.
[0006] The smart access control system comprises a 3D structured light module, a first camera, a storage unit and a first display screen, wherein the 3D structured light module comprises a projection unit and a second camera, wherein the first camera and the second camera are installed on or near a preset straight line and have substantially parallel main optical axes, wherein the first camera is located outside the 3D structured light module, and the first display screen is installed on the outside side of the smart access control system, and is used to provide a preview image when the smart access control system performs a face recognition operation; the face recognition preview image adjustment method comprises:
[0007] S101: Setting a target board at a first distance in front of the first camera and the second camera;
[0008] S102: Capturing a first image of the target board through the first camera;
[0009] S103: Projecting a preset pattern on the target board by the projection unit, and acquiring a second image of the target board by the second camera;
[0010] S104: Determine a first offset of the first image relative to the second image, and write the first offset into the storage unit;
[0011] S105: Start to perform face recognition operation, collect face images through the first camera, display the face recognition preview image on the first display screen based on the first offset and the face image, collect face depth information through the second camera, and the smart access control system performs face recognition according to the face depth information.
[0012] According to one aspect of the present invention, the first camera is an RGB camera, and the second camera is an infrared camera.
[0013] According to one aspect of the present invention, step S104 comprises:
[0014] Determining whether the first offset is within a preset range;
[0015] When the first offset is within the preset interval, writing the first offset into the storage unit;
[0016] When the first offset exceeds the preset interval, the installation posture of the first camera is corrected based on the first offset, and steps S102-S104 are repeated until the first offset is within the preset interval, and the first offset is written into the storage unit.
[0017] According to one aspect of the present invention, before step S105, the method further includes the following steps:
[0018] The target plate is set at a second distance in front of the first camera; the second distance is preset according to a face distance suitable for performing face recognition in the intelligent access control system, and the second distance is greater than the first distance;
[0019] Acquire a third image of the target board through the second camera;
[0020] determining a second offset of the third image relative to the second image;
[0021] The second offset is written into the storage unit.
[0022] According to one aspect of the present invention, displaying the face recognition preview image on the first display screen based on the first offset and the face image comprises any one or more of the following steps:
[0023] According to the first offset and the second offset, an offset adjustment is performed on the expected display image to be output to the first display screen;
[0024] Performing mirror-image flipping on the expected display image;
[0025] The expected display image is resized according to a resolution of the first camera and a resolution of the first display screen.
[0026] According to one aspect of the present invention, before step S105, the method further includes the following steps:
[0027] The target plate is set at a second distance in front of the first camera; the second distance is preset according to a face distance suitable for performing face recognition in the intelligent access control system, and the second distance is greater than the first distance;
[0028] Acquire a third image of the target board through the second camera;
[0029] determining a second offset of the third image relative to the second image;
[0030] Adjust the values of multiple second distances, and repeat the above steps to obtain multiple second offsets;
[0031] The corresponding relationship between the values of the plurality of second distances and the plurality of second offsets is written into the storage unit.
[0032] According to one aspect of the present invention, displaying the face recognition preview image on the first display screen based on the first offset and the face image comprises any one or more of the following steps:
[0033] Acquire a face distance between a face to be recognized and the first camera, acquire a third offset corresponding to the face distance according to a correspondence between the values of the plurality of second distances and the plurality of second offsets, and perform an offset adjustment on an expected display image to be output to the first display screen according to the first offset and the second offset;
[0034] Performing mirror-image flipping on the expected display image;
[0035] The expected display image is resized according to a resolution of the first camera and a resolution of the first display screen.
[0036] According to one aspect of the present invention, step S105 comprises the steps of:
[0037] According to the relative position of the face recognition preview image and the first display screen, the first display screen is controlled to output prompt information to prompt the user to adjust the face position.
[0038] According to one aspect of the present invention, the target plate includes three target points, wherein the axis of symmetry of a triangle formed by the three target points is parallel to the preset straight line and intersects with the main optical axis of the second camera, wherein the axis of symmetry includes an axis of symmetry in the vertical direction.
[0039] According to one aspect of the present invention, step S104 comprises:
[0040] Determining the position and posture of the target board in the first image and the second image respectively;
[0041] According to the position and posture of the target board in the first image and the second image, an offset of the first image relative to the second image is determined, wherein the offset includes a position offset and / or an angle offset.
[0042] According to one aspect of the present invention, step S104 comprises:
[0043] Determine a first position of the same target point of the target plate in the first image and a second position in the second image, and determine a position offset of the offset according to the first position and the second position;
[0044] Determine a third position of the symmetry axis of the three target points of the target plate in the first image and a fourth position in the second image, and determine a position offset of the offset according to the third position and the fourth position;
[0045] Determine the angle between the target plate and the horizontal / vertical direction in the first image and the angle between the target plate and the horizontal / vertical direction in the second image, and determine the angular offset of the offset according to the angle between the target plate and the horizontal / vertical direction in the first image and the second image.
[0046] The present invention also relates to a storage medium, comprising computer executable instructions stored thereon, wherein the executable instructions implement the above-mentioned face recognition preview image adjustment method when executed by a processor.
[0047] The present invention also relates to an intelligent access control system, comprising:
[0048] 3D structured light module, including a projection unit and a second camera;
[0049] A first camera, located outside the 3D structured light module;
[0050] A first display screen is installed on the outside of the door of the intelligent access control system;
[0051] The first display screen provides a preview image when the smart access control system performs a face recognition operation, wherein the preview image is adjusted by the face recognition preview image adjustment method as described above.
[0052] According to one aspect of the present invention, it further comprises: a second display screen installed on one side of the door inside the intelligent access control system;
[0053] The smart access control system is configured to turn on the first camera when receiving the cat's eye image request information, and display the cat's eye image on the first display screen based on the image obtained by the first camera.
[0054] The present invention also relates to an intelligent door, comprising the intelligent access control system as described above.
[0055] By adopting the technical solution of the present invention, by determining the offset at different distances, the expected display image for output to the display screen can be offset adjusted so that the image positions captured by the first camera and the second camera match, and the face recognition preview image is not offset, thereby improving the success rate of face recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0057] Figure 1a A schematic diagram showing a 3D structured light module having an RGB camera;
[0058] Figure 1b A schematic diagram showing a 3D structured light module with the RGB camera removed;
[0059] Figure 2 A schematic diagram of an intelligent access control system according to an embodiment of the present invention is shown;
[0060] Figure 3 A flowchart of a method for adjusting a face recognition preview image according to an embodiment of the present invention is shown;
[0061] Figure 4a A schematic diagram of a target board according to an embodiment of the present invention is shown;
[0062] Figure 4b and Figure 4c A schematic diagram of determining a first offset by a position offset according to a preferred embodiment of the present invention is shown respectively;
[0063] Figure 4d A flow chart of determining a first offset of a first image relative to a second image according to a preferred embodiment of the present invention is shown;
[0064] Figure 5a A flow chart of determining a second offset of a third image relative to a second image according to an embodiment of the present invention is shown;
[0065] Figure 5b and Figure 5c Schematic diagrams of displaying a face recognition preview image on a first display screen based on a first offset and a face image according to an embodiment of the present invention are respectively shown;
[0066] Figure 6 A schematic diagram showing an intelligent access control system according to a preferred embodiment of the present invention; and
[0067] Figure 7a and Figure 7b A schematic diagram of a smart door according to a preferred embodiment of the present invention is shown. DETAILED DESCRIPTION
[0068] In the following, only some exemplary embodiments are briefly described. As those skilled in the art will appreciate, the described embodiments may be modified in various ways without departing from the spirit or scope of the present invention. Therefore, the drawings and descriptions are considered to be exemplary and non-restrictive in nature.
[0069] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, "multiple" means two or more, unless otherwise clearly and specifically defined.
[0070] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, an electrical connection, or can communicate with each other; it can be directly connected, or indirectly connected through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0071] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may include that the first and second features are in direct contact, or may include that the first and second features are not in direct contact but are in contact through another feature between them. Moreover, a first feature being "above", "above" and "above" a second feature includes that the first feature is directly above and obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" and "below" a second feature includes that the first feature is directly above and obliquely above the second feature, or simply means that the first feature is lower in level than the second feature.
[0072] The disclosure below provides many different embodiments or examples to realize different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or reference letters in different examples, and this repetition is for the purpose of simplicity and clarity, which itself does not indicate the relationship between the various embodiments and / or settings discussed. In addition, the present invention provides various specific examples of processes and materials, but those of ordinary skill in the art can be aware of the application of other processes and / or the use of other materials.
[0073] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0074] The present invention provides a face recognition preview image adjustment method, which is used in an intelligent access control system and can achieve imaging position matching between a first camera and a second camera, so that the face recognition preview image does not shift, which is beneficial to improving the success rate of face recognition. The method is specifically introduced below.
[0075] Figure 2 A schematic diagram of an intelligent access control system 200 according to an embodiment of the present invention is shown. As shown in FIG1 , the intelligent access control system 200 includes a first camera 10, a 3D structured light module 20, a first display screen 30 and a storage unit (not shown in the figure). The 3D structured light module 20 includes a second camera 21 and a projection unit 22. The first camera 10 is located outside the 3D structured light module 20; the first camera 10 and the second camera 21 are installed on or near a preset straight line and have substantially parallel main optical axes, and the main optical axes of the first camera 10 and the second camera 21 are, for example, perpendicular to the drawing. In some preferred embodiments, the first camera 10 and the second camera 21 are installed on the mid-perpendicular line of the first display screen 30, but due to the existence of installation deviation, the two may not be accurately set on the mid-perpendicular line of the first display screen 30, but are located near it, with a slight position deviation. The first display screen 30 is installed on the outside side of the intelligent access control system 200, and is used to provide a preview image when the intelligent access control system 200 performs a face recognition operation. The preview image is adjusted by a face recognition preview image adjustment method, which is described in detail below.
[0076] Figure 3 FIG. 1 is a flowchart of a method 100 for adjusting a face recognition preview image according to an embodiment of the present invention. Figure 3 As shown, the face recognition preview image adjustment method 100 includes steps S101 to S105, and the steps S101 to S105 are described in detail below.
[0077] In step S101: a target plate is set at a first distance in front of the first camera 10 and the second camera 21. The target plate has a preset shape and size, and is used to assist the first camera 10 and the second camera 21 in offset detection and calibration. In some preferred embodiments, the target plate can be a square of 40cmx 40cm. In addition, the present invention does not limit the material and color of the target plate. Preferably, the color of the target plate can be 18% standard gray (#808080), that is, a plate with a reflectivity of 18% and a color of standard gray (#808080).
[0078] Figure 4a FIG. 2 shows a schematic diagram of a target board according to a preferred embodiment of the present invention. Figure 4a As shown, the target plate includes three target points, namely target points A, B, and C (as shown in FIG. Figure 4a The black dots shown in the figure), wherein two target points (reference target points B and C) are located in the middle and lower part of the target plate and are horizontally aligned, and another target point (reference target point A) is located in the middle and upper part of the target plate and is located on the perpendicular bisector of the line connecting the two target points (reference target points B and C) below. The symmetry axis of the triangle formed by the three target points is parallel to the preset straight line and intersects with the main optical axis of the second camera 21, wherein the symmetry axis includes the symmetry axis in the vertical direction (reference Figure 4a In some preferred embodiments, the triangle formed by connecting the three target points may be an isosceles triangle, preferably an equilateral triangle, in which case the symmetry axis of the triangle is parallel to the preset straight line and perpendicular to the main optical axis of the second camera 21.
[0079] According to a preferred embodiment of the present invention, the target board is placed at a first distance in front of the first camera 10 and the second camera 21, so that the three target points on the target board are located within the field of view of the first camera 10 and the second camera 21, wherein the first distance may be 20 cm, so that the images captured by the first camera 10 and the second camera 21 are clearer, which is conducive to improving the success rate in determining the first offset (which will be described in detail later).
[0080] In step S102: the first image of the target board is captured by the first camera 10. In some preferred embodiments, the first camera 10 may be an RGB camera. By capturing the first image of the target board by the first camera 10, a color 2D image may be obtained, which is denoted as P1 (reference Figure 4b ).
[0081] In step S103: a preset pattern is projected onto the target board by the projection unit 22, and a second image of the target board is collected by the second camera 21. In some preferred embodiments, the second camera 21 may be an infrared camera, and the preset pattern with a specific code may be projected onto the target board by the projection unit 22, and the preset pattern projected onto the target board may be collected by the second camera 21 to obtain a second image, wherein the second image is an infrared image, denoted as P2 (reference Figure 4b ), according to the distortion of the preset pattern, the distance between the target plate and the camera plane can be obtained. The present invention does not limit the specific form of the preset pattern. Optionally, the preset pattern can be a discrete light spot, a strip light or a coded structured light.
[0082] In step S104: determine the first offset of the first image relative to the second image, and write the first offset into the storage unit. Specifically, the first offset of the first image P1 can be determined based on the second image P2, and the first offset can be written into the storage unit. The present invention does not limit the specific type of the storage unit. Preferably, the storage unit can be a non-volatile random access memory (NVRAM) so that data can be retained in abnormal situations such as power failure and flashing.
[0083] In some preferred embodiments, the position and posture of the target plate in the first image P1 and the second image P2 can be determined respectively; according to the position and posture of the target plate in the first image P1 and the second image P2, a first offset of the first image P1 relative to the second image P2 is determined, wherein the first offset includes a position offset and / or an angle offset. The situation regarding the position offset is first introduced below.
[0084] Figure 4b and Figure 4c Schematic diagrams of determining the first offset by position offset according to a preferred embodiment of the present invention are respectively shown. Figure 4b As shown, the first position (x1, y1) of the same target point (such as target point B) of the target plate in the first image P1 and the second position (x2, y2) in the second image P2 can be determined. According to the first position (x1, y1) and the second position (x2, y2), the position offset (Δx, Δy) of the same target point can be determined, thereby determining the first offset. In some preferred embodiments, the first offset can only consider the position offset of the same target point in the horizontal direction, that is, Δx, where Δx = x1-x2. Of course, the offset Δy in the vertical direction can also be considered, depending on the specific situation, and the present invention is not limited.
[0085] The above embodiments introduce the situation of determining the position offset based on the same target point. In other preferred embodiments, the position offset can also be determined by the symmetry axis of the triangle formed by the target points on the target plate. Specifically, Figure 4c As shown, the horizontal coordinate x3 of the symmetry axis of the triangle formed by the three target points of the target plate (for example, the symmetry axis in the vertical direction, i.e., the perpendicular bisector) at the third position in the first image P1 and the horizontal coordinate x4 at the fourth position in the second image P2 can be determined. According to the horizontal coordinate x3 at the third position and the horizontal coordinate x4 at the fourth position, the position offset Δx' of the symmetry axis can be determined, thereby determining the first offset, wherein Δx'=x3-x4.
[0086] It should be noted that the present invention does not limit the specific form of the position offset. In some preferred embodiments, the position offset can be represented by the number of pixels. In addition, alternatively, the position offset can also be represented by a coordinate offset or a distance, which can be determined according to the actual situation and can be selected as needed. It should be understood that the offset direction of the first image relative to the second image can be determined according to the positive and negative values of the first offset. Specifically, for example, when the first offset Δx is a negative number, it can be determined that the first image is offset to the left relative to the second image. Conversely, when the first offset Δx is a positive number, it can be determined that the first image is offset to the right relative to the second image. In addition, it should be understood that the upper and lower offsets can also be determined according to the position offset, which will not be repeated here.
[0087] The above embodiment describes a specific situation of how to determine the first offset through the position offset. According to another preferred embodiment of the present invention, the first offset may also be determined through the angle offset, which is described in detail below.
[0088] In some preferred embodiments, the angle θ1 between the target plate and the horizontal direction in the first image P1 and the angle θ2 between the target plate and the horizontal direction in the second image P2 can be determined, and the angle offset Δθ in the first offset can be determined according to the difference between the angles θ1 and θ2 between the target plate and the horizontal direction in the first image P1 and the second image P2. It should be noted that, in addition to determining the first offset by the horizontal angle offset, in other embodiments, the angle offset Δθ' in the first offset can also be determined according to the difference between the angles θ3 and θ4 between the target plate and the vertical direction in the first image P1 and the second image P2, which will not be described in detail here.
[0089] It should be noted that, in actual application, only the position offset can be used as the first offset, or only the angle offset can be used as the first offset. Of course, in order to obtain more accurate results, the first offset can also be calculated based on the weights of the position offset and the angle offset (for example, 50% each). The specific method can be determined according to actual conditions, and the present invention is not limited thereto.
[0090] Figure 4d A flow chart for determining a first offset of a first image relative to a second image according to a preferred embodiment of the present invention is shown. In some preferred embodiments, when the first offset is determined according to the aforementioned steps S101 to S104, it is also necessary to determine whether the first offset is within a preset interval. When the first offset is within the preset interval, the first offset is written into the storage unit. When the first offset exceeds the preset interval, the installation posture of the first camera can be corrected based on the first offset. Steps S102-S104 are repeated until the first offset is within the preset interval, and the first offset is written into the storage unit.
[0091] According to a preferred embodiment of the present invention, when the first offset is only a position offset, the preset interval is, for example, (-50, 50), (-180, -80), etc. When the first offset is only an angle offset, the preset interval is, for example, (-5°, 5°). It should be understood that the above embodiments are merely exemplary and do not constitute a limitation to the present invention, and can be adaptively adjusted according to actual conditions in actual applications.
[0092] The above specifically introduces the step S104 , and the method 100 will be described next.
[0093] In step S105: start to perform face recognition operation, collect face images through the first camera 10, display the face recognition preview image on the first display screen 30 based on the first offset and the face image, collect face depth information through the second camera 21, and the smart access control system performs face recognition according to the face depth information.
[0094] According to a preferred embodiment of the present invention, step S105 further includes: according to the relative position of the face recognition preview image and the first display screen 30, controlling the first display screen 30 to output prompt information, prompting the user to adjust the face position, specifically, guiding the user to adjust, for example, the face distance, direction, height, etc., so that the face falls within the recognition area, so as to further improve the position matching of the images captured by the first camera and the second camera, and the face recognition preview image does not shift, which is conducive to improving the success rate of face recognition.
[0095] According to a preferred embodiment of the present invention, before step S105, the following steps are also included: Figure 5a As shown: the target board is set at a second distance in front of the first camera 10; wherein the second distance can be preset according to the face distance suitable for performing face recognition in the intelligent access control system, wherein the second distance is greater than the first distance, and preferably, the second distance can be 1m. The third image P3 of the target board is collected by the second camera 21; the second offset of the third image P3 relative to the second image P2 is determined (similar to the method for determining the first offset in the previous text); the second offset is written into the storage unit, and the storage unit is preferably a non-volatile random access memory (NVRAM). Preferably, it can also be determined whether the second offset is less than a threshold value (for example, 85 pixels). If the second offset is less than the threshold value, the second offset can be stored in the storage unit. Otherwise, corresponding adjustments can be continued until the second offset is less than the threshold value.
[0096] In some preferred embodiments, in step S105, displaying the face recognition preview image on the first display screen based on the first offset and the face image includes any one or more of the following steps (see Figure 5b ): According to the first offset and the second offset, the expected display image for output to the first display screen is offset-adjusted. The expected display image is mirror-flipped. The expected display image is resized according to the resolution of the first camera and the resolution of the first display screen. According to a preferred embodiment of the present invention, the first camera is an RGB camera with a resolution of 1920x1080, the first display screen can be an IPS touch screen with a resolution of 720x1280, and when the first display screen needs to be displayed in full screen, the preview height pixel of the first camera needs to be 1280, so the preview of the first camera needs to be magnified 1280 / 1080 times. In some preferred embodiments, the first camera can be used as a cat's eye camera to monitor the situation outside the door. In some preferred embodiments, the second camera can be an infrared camera with a resolution of 800x1280, and the resolution of the first display screen is 720x1280, so when the image captured by the second camera is previewed and displayed in full screen on the first display screen, it does not need to be scaled.
[0097] In some preferred embodiments, before step S105, the following steps are further included:
[0098] The target board is set at a second distance in front of the first camera 10; the second distance is preset according to the face distance suitable for performing face recognition in the intelligent access control system, and the second distance is greater than the first distance; the third image P3 of the target board is collected by the second camera 21; the second offset of the third image P3 relative to the second image P2 is determined; the values of multiple second distances are adjusted, and the above steps are repeated to obtain multiple second offsets; the corresponding relationship between the values of the multiple second distances and the multiple second offsets is written into the storage unit. In order to obtain the distance between the face and the access control system in real time during subsequent use, the corresponding second offset value is adapted according to the distance to perform face recognition, thereby improving the success rate of face recognition.
[0099] According to a preferred embodiment of the present invention, displaying the face recognition preview image on the first display screen based on the first offset and the face image comprises any one or more of the following steps (refer to Figure 5c ):
[0100] The face distance between the face to be identified and the first camera 10 is obtained, and a third offset corresponding to the face distance is obtained according to the correspondence between the values of the multiple second distances and the multiple second offsets, and the expected display image for output to the first display screen is offset adjusted according to the first offset and the second offset. Specifically, for example, it can be a curve fitting based on the values of the multiple second distances and the multiple second offsets, or it can be a second distance closest to the face distance to obtain the second offset corresponding to the second distance. In addition, the expected display image can also be mirror-flipped. In addition, the expected display image can also be resized according to the resolution of the first camera and the resolution of the first display screen.
[0101] The method 100 is described in detail above. In addition, the present invention also provides an intelligent access control system 200, such as Figure 2 As shown, it includes a 3D structured light module 20, including a projection unit 21 and a second camera 22; a first camera 10, located outside the 3D structured light module 20; a first display screen 30, installed on the outside side of the door of the smart access control system 200; the first display screen 30 provides a preview image when the smart access control system 200 performs a face recognition operation, wherein the preview image is adjusted by a face recognition preview image adjustment method 100.
[0102] Figure 6 A schematic diagram of an intelligent access control system 300 according to a preferred embodiment of the present invention is shown. Figure 6 As shown, the intelligent access control system 300 also includes a second display screen 31 (refer to Figure 7b), installed on the inner side of the door of the smart access control system 200, the second display screen 31 can communicate with the first display screen 30, and the smart access control system 200 is configured to, upon receiving the cat's eye picture request information, specifically, for example, when the smart access control system senses that a user touches the first / second display screen, lights up, senses that the distance between the human body inside and outside the door and the second / first display screen is less than a preset distance, senses that an abnormal situation occurs outside the door, etc., turn on the first camera 10, and display the image captured by the first camera 10 on the first display screen 30 and the second display screen 31 based on the picture obtained by the first camera 10.
[0103] In some preferred embodiments, the resolution of the second display screen is 2275x1280, and the resolution of the first camera is 1920x1080, so the preview display on the second display screen 31 needs to be magnified by 1280 / 1080 times.
[0104] Continue to refer Figure 6 In some preferred embodiments, the smart access control system 300 further includes a microphone 40, a PIR sensor (Passive Infra-Red sensor) 50, a doorbell button 60, a lock button 70, an NFC 80, and a speaker 90, wherein the microphone 40 and the speaker 90 are used for voice intercom and prompt sound. The PIR sensor 50 is used for liveness detection to further improve the success rate of face recognition.
[0105] In some preferred embodiments, the smart access control system may have multiple versions, such as a factory version and a customer version, and the software running in the two versions of the smart access control system is at least partially different. For the factory version, when the offset between the first camera and the second camera is determined, the calculation result can be displayed on the first display screen / the second display screen. For the official version, the preview of the first camera can be replaced with the preview of the second camera according to the calculated offset. It should be understood that this embodiment is only an exemplary description and does not constitute a limitation of the present invention.
[0106] In addition, the present invention also relates to a smart door 400, referring to Figure 7a and Figure 7b , including the intelligent access control system 200 / 300 as described above.
[0107] The present invention further relates to a storage medium, comprising computer executable instructions stored thereon, wherein the executable instructions, when executed by a processor, implement the face recognition preview image adjustment method 100 as described above.
[0108] In some preferred embodiments, the computer-readable storage medium may be any combination of one or more computer-readable media. The computer-readable storage medium may be, for example, but not limited to, electrical, magnetic, optical, or semiconductor forms or devices, and more specific examples (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer hard disk, a hard disk, a random access memory (RAM), a non-volatile random access memory (NVRAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0109] In this article, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by an instruction execution system, apparatus, or device or used in combination therewith. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The present invention is not limited and depends on the specific circumstances.
[0110] By adopting the technical solution of the present invention, by determining the offset at different distances, the expected display image to be output to the display screen can be offset adjusted so that the image positions captured by the first camera and the second camera match, and the face recognition preview image is not offset, which is beneficial to improving the success rate of face recognition.
[0111] It should be noted that this specification provides method operation steps as described in the embodiments or schematic diagrams, but more or fewer operation steps may be included based on conventional or non-creative labor. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the actual system or device product is executed, it can be executed in the order or in parallel according to the method shown in the embodiments or flowcharts.
[0112] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A face recognition preview image adjustment method, the face recognition preview image adjustment method is used in an intelligent access control system, the intelligent access control system includes a 3D structured light module, a first camera, a storage unit and a first display screen, the 3D structured light module includes a projection unit and a second camera, the first camera and the second camera are installed on or near a preset straight line and have substantially parallel main optical axes, wherein the first camera is located outside the 3D structured light module, and the first display screen is installed on the outside side of the intelligent access control system for providing a preview image when the intelligent access control system performs a face recognition operation ; The face recognition preview image adjustment method comprises: S101: Setting a target board at a first distance in front of the first camera and the second camera; S102: Capturing a first image of the target board through the first camera; S103: Projecting a preset pattern on the target board by the projection unit, and acquiring a second image of the target board by the second camera; S104: Determine a first offset of the first image relative to the second image, and write the first offset into the storage unit; S105: Start to perform a face recognition operation, collect a face image through the first camera, display the face recognition preview image on the first display screen based on the first offset and the face image, collect face depth information through the second camera, and the smart access control system performs face recognition according to the face depth information; Wherein the step S104 comprises: determining whether the first offset is within a preset interval; when the first offset is within the preset interval, writing the first offset into the storage unit; when the first offset exceeds the preset interval, correcting the installation posture of the first camera based on the first offset, and repeating the steps S102-S104 until the first offset is within the preset interval, and writing the first offset into the storage unit; Wherein, before step S105, the following steps are further included: setting the target board at a second distance in front of the first camera; the second distance is preset according to a face distance suitable for performing face recognition in the intelligent access control system, and the second distance is greater than the first distance; collecting a third image of the target board through the second camera; determining a second offset of the third image relative to the second image; and writing the second offset into the storage unit; The step of displaying the face recognition preview image on the first display screen based on the first offset and the face image comprises any one or more of the following steps: performing an offset adjustment on the expected display image to be output to the first display screen according to the first offset and the second offset; performing a mirror flip on the expected display image; and adjusting the size of the expected display image according to the resolution of the first camera and the resolution of the first display screen. Wherein, before step S105, the method also includes the following steps: setting the target board at a second distance in front of the first camera; the second distance is preset according to a face distance suitable for performing face recognition in an intelligent access control system, and the second distance is greater than the first distance; acquiring a third image of the target board through the second camera; determining a second offset of the third image relative to the second image; adjusting the values of multiple second distances, and repeating the above steps to obtain multiple second offsets; and writing the corresponding relationship between the values of the multiple second distances and the multiple second offsets into the storage unit.
2. The face recognition preview image adjustment method according to claim 1, wherein the first camera is an RGB camera and the second camera is an infrared camera.
3. The face recognition preview image adjustment method according to claim 1 or 2, wherein displaying the face recognition preview image on the first display screen based on the first offset and the face image comprises any one or more of the following steps: Acquire a face distance between a face to be recognized and the first camera, acquire a third offset corresponding to the face distance according to a correspondence between the values of the plurality of second distances and the plurality of second offsets, and perform an offset adjustment on an expected display image to be output to the first display screen according to the first offset and the second offset; Performing mirror-image flipping on the expected display image; The expected display image is resized according to a resolution of the first camera and a resolution of the first display screen.
4. The face recognition preview image adjustment method according to claim 1 or 2, wherein the step S105 comprises the steps of: According to the relative position of the face recognition preview image and the first display screen, the first display screen is controlled to output prompt information to prompt the user to adjust the face position.
5. The face recognition preview image adjustment method according to claim 1 or 2, wherein the target plate includes three target points, wherein the axis of symmetry of a triangle formed by the three target points is parallel to the preset straight line and intersects with the main optical axis of the second camera, wherein the axis of symmetry includes an axis of symmetry in the vertical direction.
6. The face recognition preview image adjustment method according to claim 1 or 2, wherein the step S104 include: Determining the position and posture of the target board in the first image and the second image respectively; According to the position and posture of the target board in the first image and the second image, a first offset of the first image relative to the second image is determined, wherein the first offset includes a position offset and / or an angle offset.
7. The face recognition preview image adjustment method according to claim 6, wherein the step S104 include: Determine a first position of the same target point of the target plate in the first image and a second position in the second image, and determine a position offset of the offset according to the first position and the second position; Determine a third position of the symmetry axis of the three target points of the target plate in the first image and a fourth position in the second image, and determine a position offset of the offset according to the third position and the fourth position; Determine the angle between the target plate and the horizontal / vertical direction in the first image and the angle between the target plate and the horizontal / vertical direction in the second image, and determine the angular offset of the offset according to the angle between the target plate and the horizontal / vertical direction in the first image and the second image.
8. A storage medium, comprising computer executable instructions stored thereon, wherein the executable instructions, when executed by a processor, implement the face recognition preview image adjustment method according to any one of claims 1 to 7.
9. An intelligent access control system, include: 3D structured light module, including a projection unit and a second camera; A first camera, located outside the 3D structured light module; A first display screen is installed on the outside of the door of the intelligent access control system; The first display screen provides a preview image when the smart access control system performs a face recognition operation, wherein the preview image is adjusted by the face recognition preview image adjustment method according to any one of claims 1-7.
10. The intelligent access control system according to claim 9, further comprising: include: A second display screen is installed on one side of the door inside the intelligent access control system; The smart access control system is configured to turn on the first camera when receiving the cat's eye image request information, and display the cat's eye image on the first display screen based on the image obtained by the first camera.
11. A smart door, comprising the smart access control system according to claim 9 or 10.
