Method, device and system for automatically mixing and identifying face and two-dimensional code

文档序号:8406 发布日期:2021-09-17 浏览:43次 中文

1. A method for automatically mixing and recognizing a face and a two-dimensional code is characterized by comprising the following steps:

acquiring a picture to be identified provided by a user;

detecting whether the picture to be identified is a two-dimensional code picture or a face picture;

if the picture to be recognized is a two-dimensional code picture, performing two-dimensional code recognition on the picture to be recognized;

and if the picture to be recognized is the face image, carrying out face recognition on the picture to be recognized.

2. The method according to claim 1, wherein before obtaining the picture to be recognized provided by the user, the method further comprises:

the cloud end issues a face image or a face characteristic value of the user to be invited to the intelligent identification equipment;

and the cloud terminal issues the two-dimension code to the terminal equipment held by the invited user.

3. The method of claim 1, wherein the cloud sends the two-dimensional code to the terminal device of the invited user through short message or IM.

4. The method of claim 1, wherein if the picture to be recognized is a face image, performing face recognition on the picture to be recognized comprises:

the intelligent identification equipment matches and compares the picture to be identified with the face picture of the invited user issued by the cloud;

if the matching is successful, determining that the invited user has the right;

and if the matching is unsuccessful, prompting a corresponding error code, and identifying the picture to be identified again.

5. The method of claim 1, wherein if the picture to be recognized is a two-dimensional code picture, performing two-dimensional code recognition on the picture to be recognized comprises:

the intelligent identification equipment detects whether the picture to be identified contains an appointed domain name;

if the picture to be recognized contains the specified domain name, the intelligent recognition equipment verifies the two-dimensional code in the picture to be recognized;

if the verification is successful, determining that the invited user has the right;

and if the verification fails or the picture to be recognized does not contain the specified domain name, respectively prompting the corresponding error codes and recognizing the picture to be recognized again.

6. The method of claim 1, wherein if the picture to be recognized is a two-dimensional code picture, performing two-dimensional code recognition on the picture to be recognized comprises:

updating the cached data to be identified of the two-dimensional code as the data of the picture to be identified;

and acquiring the data of the picture to be identified stored in the cache data of the two-dimensional code to be identified to perform two-dimensional code identification.

7. The device for automatically mixing and recognizing the human face and the two-dimensional code is characterized by comprising the following components:

the acquisition module is used for acquiring a picture to be identified provided by a user;

the detection module is used for detecting whether the picture to be identified is a two-dimensional code picture or a face picture;

the two-dimension code identification module is used for carrying out two-dimension code identification on the picture to be identified if the picture to be identified is a two-dimension code picture;

and the face recognition module is used for carrying out face recognition on the picture to be recognized if the picture to be recognized is a face image.

8. A system for automatic mixed recognition of human faces and two-dimensional codes is characterized by comprising at least one processor and a memory;

the memory to store one or more program instructions;

the processor, configured to execute one or more program instructions to perform the method according to one or more of claims 1 to 6.

9. A chip, characterized in that it is coupled to a memory in a system such that it, when run, invokes program instructions stored in said memory implementing the method according to one or more of claims 1 to 6.

10. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises one or more program instructions that are executable by the system of claim 8 to implement the method of one or more of claims 1 to 6.

Background

This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein may include concepts that could be pursued, but are not necessarily ones that have been previously conceived or pursued. Thus, unless otherwise indicated herein, what is described in this section is not prior art to the description and claims in this application and is not admitted to be prior art by inclusion in this section.

In the modern society, security has become a hot issue of people's attention. Intelligent devices such as access control devices and mobile phone terminals increasingly pay more attention to the safety of the intelligent devices. Traditional district or hotel security mode adopts access control system, and the user opens the door or takes advantage of the ladder through the mode of punching the card, but there is the drawback in the access control card, for example easily loses, easily forgets to carry or easily steals, has the potential safety hazard. In addition, the traditional unit door or the family can be opened by adopting a password mode, the password is required to be preset in security measures based on the password, when the traditional unit door or the family is used, a user needs to input the password for authentication, and if the password is consistent, the authentication is passed; if the passwords are not consistent, authentication fails. However, such a cryptographic scheme has two major drawbacks: firstly, passwords are easy to forget; secondly, the password is easy to leak, so that security measures based on the password also have certain potential safety hazards.

With the continuous development of science and technology, at present, a face recognition technology and a two-dimensional code recognition technology are mature continuously, and are applied more and more widely based on the characteristic that the safety of the face recognition technology and the two-dimensional code recognition technology is high, more and more intelligent devices support two modes of face recognition and two-dimensional code recognition, but in the using process, a user needs to manually select a recognition mode, and then different recognition algorithms are called to start recognition according to the recognition mode selected by the user. Therefore, the intelligent identification device has the defects that:

1. because the user is required to distinguish the face recognition from the two-dimensional code recognition, the user needs to press and contact with equipment for multiple operations, and the use is not convenient enough and is not sanitary and safe enough;

2. manual selection is needed, and non-contact use cannot be achieved.

In view of the above, a new image processing technology is needed to solve the problem of inconvenient use caused by the fact that a user needs to manually select an identification model for face and two-dimensional code identification at present.

Disclosure of Invention

One or more embodiments of the present specification describe a method, an apparatus, and a system for automatic hybrid recognition of a face and a two-dimensional code, which solve the problem of inconvenient use caused by the fact that a user needs to manually select a recognition model for face and two-dimensional code recognition at present.

The technical scheme provided by one or more embodiments of the specification is as follows:

in a first aspect, the present invention provides a method for automatically mixing and recognizing a face and a two-dimensional code, including:

acquiring a picture to be identified provided by a user;

detecting whether the picture to be identified is a two-dimensional code picture or a face picture;

if the picture to be recognized is a two-dimensional code picture, performing two-dimensional code recognition on the picture to be recognized;

and if the picture to be recognized is the face image, carrying out face recognition on the picture to be recognized.

In a possible implementation manner, before obtaining the picture to be recognized provided by the user, the method further includes:

the cloud end issues a face image or a face characteristic value of the user to be invited to the intelligent identification equipment;

and the cloud terminal issues the two-dimension code to the terminal equipment held by the invited user.

In a possible implementation manner, the cloud sends the two-dimensional code to the terminal device held by the invited user through a short message or an IM.

In a possible implementation manner, if the picture to be recognized is a face image, performing face recognition on the picture to be recognized includes:

the intelligent identification equipment matches and compares the picture to be identified with the face picture of the invited user issued by the cloud;

if the matching is successful, determining that the invited user has the right;

and if the matching is unsuccessful, prompting a corresponding error code, and identifying the picture to be identified again.

In a possible implementation manner, if the picture to be recognized is a two-dimensional code picture, performing two-dimensional code recognition on the picture to be recognized includes:

the intelligent identification equipment detects whether the picture to be identified contains an appointed domain name;

if the picture to be recognized contains the specified domain name, the intelligent recognition equipment verifies the two-dimensional code in the picture to be recognized;

if the verification is successful, determining that the invited user has the right;

and if the verification fails or the picture to be recognized does not contain the specified domain name, respectively prompting the corresponding error codes and recognizing the picture to be recognized again.

In a possible implementation manner, if the picture to be recognized is a two-dimensional code picture, performing two-dimensional code recognition on the picture to be recognized includes:

updating the cached data to be identified of the two-dimensional code as the data of the picture to be identified;

and acquiring the data of the picture to be identified stored in the cache data of the two-dimensional code to be identified to perform two-dimensional code identification.

In a second aspect, the present invention provides an apparatus for automatically recognizing a face and a two-dimensional code in a mixed manner, the apparatus comprising:

the acquisition module is used for acquiring a picture to be identified provided by a user;

the detection module is used for detecting whether the picture to be identified is a two-dimensional code picture or a face picture;

the two-dimension code identification module is used for carrying out two-dimension code identification on the picture to be identified if the picture to be identified is a two-dimension code picture;

and the face recognition module is used for carrying out face recognition on the picture to be recognized if the picture to be recognized is a face image.

In a third aspect, the invention provides a system for automatic mixed recognition of a human face and a two-dimensional code, which comprises at least one processor and a memory;

the memory to store one or more program instructions;

the processor, configured to execute one or more program instructions to perform the method according to one or more of claims 1 to 7.

In a fourth aspect, the present invention provides a chip, which is coupled to a memory in a system, so that the chip calls program instructions stored in the memory when running to implement the method according to the first aspect.

In a fifth aspect, the present invention provides a computer readable storage medium comprising one or more program instructions executable by the system of the third aspect to implement the method of the first aspect.

The method provided by the embodiment of the invention solves the problem of inconvenient use caused by the fact that a user needs to manually select the recognition model to recognize the face and the two-dimensional code at present, improves the recognition efficiency and improves the user experience.

Drawings

Fig. 1 is a schematic flow chart of a method for automatically mixing and recognizing a face and a two-dimensional code according to an embodiment of the present invention;

fig. 2 is a schematic diagram illustrating automatic mixed recognition of a face and a two-dimensional code by the access control device according to the embodiment of the present invention;

fig. 3 is a schematic structural diagram of an apparatus for automatically mixing and recognizing a face and a two-dimensional code according to an embodiment of the present invention;

fig. 4 is a schematic structural diagram of a system for automatically mixing and recognizing a face and a two-dimensional code according to an embodiment of the present invention.

Detailed Description

The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be further noted that, for the convenience of description, only the portions related to the related invention are shown in the drawings.

It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.

In order to improve the automatic hybrid recognition of the face and the two-dimensional code by the intelligent recognition device, the embodiment provides a method for automatic hybrid recognition of the face and the two-dimensional code, and specifically, the intelligent recognition device may include but is not limited to: entrance guard's equipment, elevator etc. wherein entrance guard's equipment can be district gate access, has to be the entrance guard of district unit. Mobile terminals may include, but are not limited to: mobile phones, tablet computers, and the like. Fig. 1 is a schematic flow chart illustrating a method for automatically mixing and recognizing a face and a two-dimensional code according to an embodiment of the present invention, and fig. 2 is a schematic flow chart illustrating a process of automatically mixing and recognizing a face and a two-dimensional code when an intelligent recognition device is an access control device, and the flow chart includes the following steps, in combination with fig. 1 and fig. 2:

and step 10, acquiring the picture to be identified provided by the user.

Before a picture to be recognized provided by a user is acquired, the cloud terminal issues a face image or a face characteristic value of the user to be invited to the intelligent recognition device, meanwhile, the cloud terminal issues a two-dimensional code to the terminal device held by the user to be invited, and specifically, the cloud terminal issues the two-dimensional code to the terminal device held by the user to be invited through a short message or an IM.

In addition, the "advertisement page" shown in fig. 2 is a display interface of the notification or the advertisement pushed by the cloud, and since the identification state can be triggered only when the two-dimensional code or the face image is needed, the notification or the advertisement issued by the cloud can be displayed under the condition that the face image or the two-dimensional code is not acquiescent. The benefits of this setup are: people can obtain various activity notices of the community in time, or the property income of the community is increased through advertisement putting, and more expenses are paid to improve the environment for residents of the community.

And 20, detecting whether the picture to be identified is a two-dimensional code picture or a face image.

Specifically, the access control equipment captures a picture in real time through a camera, and the captured picture can be a face image of an invited user or a two-dimensional code picture in a mobile phone.

The snapshot picture is firstly detected and analyzed through a two-dimension code detection engine, and if the snapshot picture is not a two-dimension code, the snapshot picture can be sent to a face engine again for detection and analysis. It should be noted that, here, the captured picture may also be detected and analyzed by the face detection engine, and if the captured picture is not a face image, the captured picture may be sent to the two-dimensional code detection engine again for detection and analysis.

And identifying based on the detection and analysis result, then determining the authority of the invited user based on the identification result, performing corresponding control operation based on the authority of the invited user, and uploading the record of the control operation based on the authority of the invited user to a cloud.

The process of identification based on the results of the detection analysis is detailed in steps 30 and 40.

And step 30, if the picture to be recognized is a two-dimensional code picture, performing two-dimensional code recognition on the picture to be recognized.

And if the picture to be identified is detected to be a two-dimensional code picture, updating the cache data to be identified of the two-dimensional code to be current picture data, acquiring the cache data by the two-dimensional code identification thread, identifying if the data is not empty, emptying the cache data, and skipping identification and sleeping for 100ms if the data is empty.

The specific process of identifying the two-dimensional code of the picture to be identified comprises the following steps:

and acquiring the data of the picture to be identified stored in the cache data of the two-dimensional code to be identified to perform two-dimensional code identification. The intelligent identification equipment detects corresponding content of the picture to be identified, and whether the corresponding content contains a specified domain name, for example, whether the picture to be identified contains the domain name of the cloud-metallocene cell; if the picture to be recognized contains a specified domain name, such as the above-mentioned cloud domain name, the intelligent recognition device verifies the two-dimensional code in the picture to be recognized; if the verification is successful, determining that the invited user has the right, successfully opening the door and reporting a door opening record; and if the verification fails or the picture to be recognized does not contain the specified domain name, respectively prompting the corresponding error codes and recognizing the picture to be recognized again.

And step 40, if the picture to be recognized is a face image, carrying out face recognition on the picture to be recognized.

If the picture to be recognized is detected to be a face image, the face detection engine can compare the picture with pictures in a bottom library of the entrance guard equipment, namely the intelligent recognition equipment matches and compares the picture to be recognized with the face picture of the invited user issued by the cloud end; if the matching is successful, determining that the invited user has the authority, successfully opening the door and reporting a door opening record; and if the matching is unsuccessful, prompting a corresponding error code, and identifying the picture to be identified again.

And the invited user opens the two-dimension code issued by the cloud end to perform two-dimension code or face recognition passing.

According to the method provided by the invention, the intelligent recognition equipment is used for automatically recognizing the type of the captured image and automatically selecting the recognition model, so that the problem of inconvenience in use caused by the fact that the user needs to manually select the recognition model for recognizing the face and the two-dimensional code at present is solved, the recognition efficiency is improved, and the user experience is improved.

Corresponding to the method of the above embodiment, the present invention further provides a device for automatically mixing and recognizing a human face and a two-dimensional code, fig. 3 is a schematic structural diagram of the device, and as shown in fig. 3, the device includes:

the acquiring module 31 is configured to acquire a picture to be identified provided by a user.

And the detection module 32 is configured to detect whether the picture to be identified is a two-dimensional code picture or a face image.

And the two-dimension code identification module 33 is configured to perform two-dimension code identification on the picture to be identified if the picture to be identified is a two-dimension code picture.

And the face recognition module 34 is configured to perform face recognition on the picture to be recognized if the picture to be recognized is a face image.

The functions executed by each component in the apparatus provided in the embodiment of the present invention have been described in detail in the above-mentioned method, and therefore, redundant description is not repeated here.

Corresponding to the above embodiments, the embodiment of the present invention further provides a system for automatic hybrid recognition of a human face and a two-dimensional code, specifically as shown in fig. 4, the system includes at least one processor 41 and a memory 42;

a memory 41 for storing one or more program instructions;

and a processor 42 for executing one or more program instructions to execute any method step of the method for automatic hybrid recognition of a human face and a two-dimensional code as described in the above embodiments.

Corresponding to the above embodiment, an embodiment of the present invention further provides a chip, where the chip is coupled with a memory in the system, so that when the chip runs, the chip calls a program instruction stored in the memory, and the method for automatically mixing and recognizing a human face and a two-dimensional code as described in the above embodiment is implemented.

Corresponding to the above embodiments, the embodiment of the present invention further provides a computer storage medium, where the computer storage medium includes one or more programs, where the one or more program instructions are used by a system for automatic hybrid recognition of a human face and a two-dimensional code to perform the above-described method for automatic hybrid recognition of a human face and a two-dimensional code.

According to the technical scheme provided by the embodiment of the invention, the two-dimension code and the face can be identified in a mixed manner, the face and the two-dimension code are intelligently distinguished, manual selection and distinguishing are not needed, the use is convenient and quick, and the user experience is improved.

Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

The above embodiments are provided to further explain the objects, technical solutions and advantages of the present invention in detail, it should be understood that the above embodiments are merely exemplary embodiments of the present invention and are not intended to limit the scope of the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:一种安检方法、装置、计算机设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!