Gate control method and device, gate system and electronic equipment
By acquiring and processing images in the gate system and determining the image area for verification, the problem of gate door opening in the side-by-side gate system is solved, and the accuracy of pass verification is improved.
Patent Information
- Application Number
- CN202310796160.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2024-12-31
AI Technical Summary
In the gate system installed side by side, the acquisition range of the image acquisition device may cover the area where people walking in adjacent channels may behave, resulting in the problem of the gate door being opened by mistake.
By acquiring the image to be processed, the image area for verification is determined based on the channel width corresponding to the gate and the installation position of the image acquisition device, and the area where people in adjacent channels are walking are filtered out, thereby avoiding the gate door accidentally opening. The specific method includes cropping the original image and determining the image area to be verified based on the preset aspect ratio or target ratio.
Effectively eliminate facial interference from people in adjacent channels, improve the accuracy of opening the gate, and avoid the situation of mistaken opening.
Smart Images

Figure CN119229560A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a gate control method, device, gate system and electronic equipment. Background Art
[0002] Gates are generally installed at the entrances and exits of some places to control the passage of people in the passage. For example, an image acquisition device may be set in the gate. When a person moves near the passage corresponding to the gate, the image acquisition device of the gate can obtain an image containing the face of the person, and then the face in the image can be verified to determine whether to open the gate.
[0003] However, in some scenarios, multiple gates may be installed side by side. For some of the gates, since the acquisition range of the image acquisition device of the gate may cover the area where people passing through its adjacent channels walk, the image captured by the image acquisition device of the gate may contain the faces of people passing through its adjacent channels. Furthermore, due to the influence of the faces of these people, the gate door of the gate may be mistakenly opened. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a gate control method, device, gate system and electronic equipment to avoid the problem of gate door opening by mistake. The specific technical solution is as follows:
[0005] In a first aspect of an embodiment of the present application, a gate control method is first provided, the method comprising:
[0006] Acquire an image to be processed; wherein the image to be processed is obtained based on an image containing a face acquired by an image acquisition device of the first gate;
[0007] Based on the channel width of the first channel corresponding to the first gate and / or the installation position of the image acquisition device, determine the image area for verification in the image to be processed to obtain the image to be verified; wherein the image area in the image to be processed other than the image to be verified includes: an area where people walk through the second channel corresponding to the gate adjacent to the first gate;
[0008] Based on a verification result of the image to be verified, it is determined whether to open the gate door of the first gate.
[0009] In some embodiments, the aspect ratio of the image to be verified is consistent with a preset aspect ratio of a display interface of the display device;
[0010] The step of obtaining the image to be processed comprises:
[0011] Acquire an image containing a human face captured by the image acquisition device as an original image;
[0012] Cropping the original image according to the preset aspect ratio to obtain an image to be processed;
[0013] After determining the image area for verification in the image to be processed based on the channel width of the first channel corresponding to the first gate and / or the installation position of the image acquisition device, and obtaining the image to be verified, the method further includes:
[0014] The image to be verified is displayed in a display interface of the display device.
[0015] In some embodiments, the cropping of the original image according to the preset aspect ratio to obtain the image to be processed includes:
[0016] If the aspect ratio of the original image is greater than the preset aspect ratio, and, according to the direction in which the image acquisition device acquires images, the image acquisition device is located on the right side of the first channel, and the adjacent gate is located on the left side of the first channel, then according to the preset aspect ratio, an image in the left area of the original image is acquired to obtain an image to be processed;
[0017] If the aspect ratio of the original image is greater than the preset aspect ratio, and, according to the direction in which the image acquisition device acquires images, the image acquisition device is located on the left side of the first channel, and the adjacent gate is located on the right side of the first channel, then according to the preset aspect ratio, an image in the right area of the original image is acquired to obtain an image to be processed;
[0018] If the aspect ratio of the original image is smaller than the preset aspect ratio, the image in the upper area of the original image is acquired according to the preset aspect ratio to obtain the image to be processed.
[0019] In some embodiments, determining the image area for verification in the image to be processed based on the channel width of the first channel corresponding to the first gate and / or the installation position of the image acquisition device to obtain the image to be verified includes:
[0020] According to the target ratio, the image area for verification in the image to be processed is determined to obtain the image to be verified; wherein, in the correspondence between the preset ratio set and the channel width set, the channel width of the first channel corresponds to the target ratio; and the preset channel width in the correspondence is positively correlated with the ratio.
[0021] In some embodiments, the image acquisition device is installed at the same position as the gate;
[0022] The corresponding relationship is obtained by following the steps:
[0023] For each preset channel width in the channel width set, the angle corresponding to the preset channel width is determined according to the ratio of the preset channel width to the preset minimum distance for contactless passage; wherein the tangent value of the angle corresponding to the preset channel width represents the ratio of the preset channel width to the preset minimum distance for contactless passage; the minimum distance for contactless passage represents: the distance traveled by a person from the time when the image verification is successful to the time when the gate is fully opened;
[0024] If the angle corresponding to the preset channel width is not greater than the field of view angle of the image acquisition device, then calculating the ratio of the angle corresponding to the preset channel width to the field of view angle as the ratio corresponding to the preset channel width;
[0025] If the angle corresponding to the preset channel width is greater than the field of view of the image acquisition device, the ratio corresponding to the preset channel width is determined to be 1.
[0026] In some embodiments, determining the image area for verification in the image to be processed according to the target ratio to obtain the image to be verified includes:
[0027] According to the direction in which the image acquisition device acquires images, if the image acquisition device is located on the right side of the first channel and the adjacent gate is located on the left side of the first channel, then according to the target ratio, the image in the upper left area of the image to be processed is acquired to obtain the image to be verified;
[0028] According to the direction in which the image acquisition device captures images, if the image acquisition device is located on the left side of the first channel and the adjacent gate is located on the right side of the first channel, the image in the upper right area of the image to be processed is acquired according to the target ratio to obtain the image to be verified.
[0029] According to a second aspect of the embodiments of the present application, a gate system is provided, the gate system comprising a processor and an image acquisition device;
[0030] The image acquisition device is used to acquire an image containing a face of a person in the channel corresponding to the first gate;
[0031] The processor is used to execute the gate control method described in the first aspect above.
[0032] In some embodiments, the gate system further includes a display device;
[0033] The display device is used to display the image to be verified obtained by the processor.
[0034] According to a third aspect of the present application, a gate control device is provided, the device comprising:
[0035] The module for acquiring the image to be processed is used to acquire the image to be processed; wherein the image to be processed is obtained based on the image containing the face acquired by the image acquisition device of the first gate;
[0036] The module for acquiring the image to be verified is used to determine the image area for verification in the image to be processed based on the channel width of the first channel corresponding to the first gate and / or the installation position of the image acquisition device, so as to obtain the image to be verified; wherein the image area in the image to be processed other than the image to be verified includes: the area where people walk through the second channel corresponding to the gate adjacent to the first gate;
[0037] A verification module is used to determine whether to open the gate door of the first gate based on a verification result of verifying the image to be verified.
[0038] In some embodiments, the aspect ratio of the image to be verified is consistent with a preset aspect ratio of a display interface of the display device;
[0039] The to-be-processed image acquisition module comprises:
[0040] An original image acquisition module, used to acquire the image containing the face acquired by the image acquisition device as the original image;
[0041] A cropping module, used for cropping the original image according to the preset aspect ratio to obtain an image to be processed;
[0042] The device also includes:
[0043] The display module is used to determine the image area for verification in the image to be processed based on the channel width of the first channel corresponding to the first gate and / or the installation position of the image acquisition device, and after obtaining the image to be verified, display the image to be verified in the display interface of the display device.
[0044] In some embodiments, the cropping module is specifically used to:
[0045] If the aspect ratio of the original image is greater than the preset aspect ratio, and, according to the direction in which the image acquisition device acquires images, the image acquisition device is located on the right side of the first channel, and the adjacent gate is located on the left side of the first channel, then according to the preset aspect ratio, an image in the left area of the original image is acquired to obtain an image to be processed;
[0046] If the aspect ratio of the original image is greater than the preset aspect ratio, and, according to the direction in which the image acquisition device acquires images, the image acquisition device is located on the left side of the first channel, and the adjacent gate is located on the right side of the first channel, then according to the preset aspect ratio, an image in the right area of the original image is acquired to obtain an image to be processed;
[0047] If the aspect ratio of the original image is smaller than the preset aspect ratio, the image in the upper area of the original image is acquired according to the preset aspect ratio to obtain the image to be processed.
[0048] In some embodiments, the module for acquiring the image to be verified includes:
[0049] The submodule for acquiring the image to be verified is used to determine the image area for verification in the image to be processed according to the target ratio, so as to obtain the image to be verified; wherein, in the correspondence between the preset ratio set and the channel width set, the channel width of the first channel corresponds to the target ratio; and the preset channel width in the correspondence is positively correlated with the ratio.
[0050] In some embodiments, the image acquisition device is installed at the same position as the gate;
[0051] The device also includes:
[0052] A corresponding relationship generation module is used to determine, for each preset channel width in the channel width set, an angle corresponding to the preset channel width according to the ratio of the preset channel width to the preset minimum distance for contactless passage; wherein the tangent value of the angle corresponding to the preset channel width represents the ratio of the preset channel width to the preset minimum distance for contactless passage; the minimum distance for contactless passage represents: the distance walked by a person from the time when the image verification is successful to the time when the gate is fully opened;
[0053] If the angle corresponding to the preset channel width is not greater than the field of view angle of the image acquisition device, then calculating the ratio of the angle corresponding to the preset channel width to the field of view angle as the ratio corresponding to the preset channel width;
[0054] If the angle corresponding to the preset channel width is greater than the field of view of the image acquisition device, the ratio corresponding to the preset channel width is determined to be 1.
[0055] In some embodiments, the to-be-verified image acquisition submodule is specifically used to:
[0056] According to the direction in which the image acquisition device acquires images, if the image acquisition device is located on the right side of the first channel and the adjacent gate is located on the left side of the first channel, then according to the target ratio, the image in the upper left area of the image to be processed is acquired to obtain the image to be verified;
[0057] According to the direction in which the image acquisition device captures images, if the image acquisition device is located on the left side of the first channel and the adjacent gate is located on the right side of the first channel, the image in the upper right area of the image to be processed is acquired according to the target ratio to obtain the image to be verified.
[0058] According to a fourth aspect of the embodiments of the present application, an electronic device is provided, including:
[0059] Memory, used to store computer programs;
[0060] The processor is used to implement any of the gate control methods described above when executing the program stored in the memory.
[0061] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the gate control methods described above is implemented.
[0062] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the gate control methods described above.
[0063] Beneficial effects of the embodiments of the present application:
[0064] An embodiment of the present application provides a gate control method, the method comprising: acquiring an image to be processed; wherein the image to be processed is obtained based on an image containing a face acquired by an image acquisition device of a first gate; based on the channel width of a first channel corresponding to the first gate and / or the installation position of the image acquisition device, determining an image area for verification in the image to be processed to obtain an image to be verified; wherein the image area in the image to be processed other than the image to be verified includes: an area where people walk through a second channel corresponding to an adjacent gate of the first gate; based on a verification result of the image to be verified, determining whether to open the gate door of the first gate.
[0065] Based on the above processing, the image to be processed can be processed according to the channel width of the first channel corresponding to the first gate, and / or the installation position of the image acquisition device of the gate to obtain the image to be verified. The image area corresponding to the area in the image to be processed where people walk through the second channel corresponding to the adjacent gate of the first gate can be filtered, thereby eliminating the interference of the faces of people in the adjacent channels on the verification result of the image to be verified, thereby avoiding the problem of the gate door being opened by mistake.
[0066] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0068] Figure 1 A top view of a scene where two gates are installed side by side;
[0069] Figure 2 A schematic diagram of a first flow chart of a gate control method provided in an embodiment of the present application;
[0070] Figure 3 A second flow chart of the gate control method provided in the embodiment of the present application;
[0071] FIG4( a ) is a first schematic diagram of determining the angle corresponding to the channel width provided in an embodiment of the present application;
[0072] FIG4( b ) is a second schematic diagram of determining the angle corresponding to the channel width provided in an embodiment of the present application;
[0073] FIG4( c ) is a third schematic diagram of determining the angle corresponding to the channel width provided in an embodiment of the present application;
[0074] Figure 5 A third flow chart of the gate control method provided in the embodiment of the present application;
[0075] Figure 6 A schematic diagram of a process for processing an original image provided in an embodiment of the present application;
[0076] Figure 7 A system architecture diagram of a gate system provided in an embodiment of the present application;
[0077] Figure 8 A structural diagram of a gate control device provided in an embodiment of the present application;
[0078] Fig. 9 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0079] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.
[0080] Gates are generally installed at the entrances and exits of some places to control the passage of people in the passage. For example, an image acquisition device may be set in the gate. When a person moves near the passage corresponding to the gate, the image acquisition device of the gate can obtain an image containing the face of the person, and then the face in the image can be verified to determine whether to open the gate.
[0081] However, in some scenarios, multiple gates may be installed side by side. For some of the gates, since the acquisition range of the image acquisition device of the gate may cover the area where people passing through its adjacent channels walk, the image captured by the image acquisition device of the gate may contain the faces of people passing through its adjacent channels. Furthermore, due to the influence of the faces of these people, the gate door of the gate may be mistakenly opened.
[0082] A gate machine consists of two gate machine bodies. The channel width of the channel corresponding to the gate machine is the width of the gate machine opening; the channel length of the channel corresponding to the gate machine is: the distance from one gate machine opening of the gate machine to the other gate machine opening of the gate machine. For a certain type of gate machine, the length of the gate machine body (that is, the channel length of the channel corresponding to the gate machine) is usually fixed, and the channel width of the channel corresponding to the gate machine can be determined according to the actual needs of the user during installation.
[0083] See also Figure 1 , Figure 1 This is a top view of a scene where two gates are installed side by side. Figure 1There are two gates included. For the convenience of description, the gate composed of gate body 1 and gate body 2 can be called gate 1, and the gate composed of gate body 2 and gate body 3 can be called gate 2. Channel 1 is the channel corresponding to gate 1, and channel 2 is the channel corresponding to gate 2. Channel 2 is the adjacent channel of gate 1. For example, the channel widths of channel 1 and channel 2 are both 650mm (millimeters), and the channel lengths of channel 1 and channel 2 are both 1650mm. The black-filled circle in the figure represents the image acquisition device, and the installation position of the gate door is consistent with that of the image acquisition device, that is, the image acquisition device of gate 1 (that is, camera 1) and the gate door are both installed in the middle position of gate body 1. The angle β formed by the dotted line a and the dotted line b represents: the maximum angle that camera 1 can capture (that is, the field of view angle). The shortest distance from straight line c to camera 1 is the minimum distance for senseless passage, and the minimum distance for senseless passage represents the distance a person walks from the time when the image verification is successful to the time when the gate door is fully opened. For example, according to Figure 1 In the installation position of the image acquisition device, when the distance between the person and the gate is the minimum distance for senseless passage (such as 1325mm), and the image acquired by the image acquisition device passes the verification, the gate can be controlled to open. Correspondingly, when the person walks to the gate, the gate is fully opened. The direction shown in direction E is perpendicular to the direction shown in direction N. Since the actual walking direction of the person can be approximated to the direction shown in direction N, the position where the distance from camera 1 is the minimum distance for senseless passage can be represented by straight line c. The distance between straight line c and gates 1 and 2 is determined according to the minimum distance for senseless passage and the installation position of camera 1.
[0084] Figure 1 The white filled circles in the middle represent people at different positions. Person A is entering channel 2, person B is in channel 2, and person C is entering channel 1. It can be seen that even if person A and person B do not need to enter channel 1, camera 1 can still capture images containing the faces of person A and person B. In other words, if the images containing the faces of person A and person B captured by camera 1 are verified, the gate of gate 1 may be opened by mistake.
[0085] In order to solve the above technical problems, the embodiment of the present application provides a gate control method. The method can be applied to a gate system, and the gate system includes a first gate. Figure 2 , Figure 2 A first flow chart of a gate control method provided in an embodiment of the present application, the method may include the following steps:
[0086] S201: Acquire an image to be processed.
[0087] The image to be processed is obtained based on an image containing a face acquired by an image acquisition device of the first gate.
[0088] S202: Based on the channel width of the first channel corresponding to the first gate and / or the installation position of the image acquisition device, determine the image area for verification in the image to be processed to obtain the image to be verified.
[0089] The image area other than the image to be verified in the image to be processed includes: an area where people walk through the second channel corresponding to the adjacent gate of the first gate.
[0090] S203: Determine whether to open the gate door of the first gate based on the verification result of the image to be verified.
[0091] Based on the above processing, the image to be processed can be processed according to the channel width of the first channel corresponding to the first gate, and / or the installation position of the image acquisition device of the gate to obtain the image to be verified. The image area corresponding to the area in the image to be processed where people walk through the second channel corresponding to the adjacent gate of the first gate can be filtered, thereby eliminating the interference of the faces of people in the adjacent channels on the verification result of the image to be verified, thereby avoiding the problem of the gate door being opened by mistake.
[0092] For step S201, the first gate is the gate that needs to be controlled by the current gate system, and can be any gate in the gate system. The image acquisition device of the first gate can be installed on the gate body on either side of the first gate. Among them, the image acquisition device can be: RGB (Red, Green, and Blue) camera, or near infrared (NIR, Near Infrared) camera, etc. It can be understood that after the gate is installed, since the installation position of the image acquisition device is fixed, the shooting angle, direction and shooting range of the image acquisition device are also fixed.
[0093] The processor of the gate system can communicate with the image acquisition device. For example, the image acquisition device can send each frame of the acquired image to the processor. For each frame of the image, a face detection algorithm can be used to determine whether the frame of the image contains a face. If the frame of the image contains a face, the image to be processed can be obtained based on the frame of the image.
[0094] In one implementation, the frame image may be directly determined as the image to be processed. Alternatively, the frame image may be cropped to obtain the image to be processed, and the specific cropping method will be described in subsequent embodiments.
[0095] With respect to step S202, after the gate is installed, the channel width of the first channel and the installation position of the image acquisition device are fixed. The channel corresponding to the gate adjacent to the first gate can be called the second channel. In other words, the area where people walk through the second channel corresponds to a fixed position in each frame of the image. Furthermore, the image area outside the position in the image to be processed can be used as the image area for verification, which can avoid the interference of the faces of people passing through the second channel on the detection results of the image to be processed.
[0096] It is understandable that when the installation position of the image acquisition device is fixed (for example, the image acquisition device is installed in the middle of the gate body on one side of the first gate), since the field of view of the image acquisition device is fixed, the area in the real world that can be represented by the image captured by the image acquisition device is also fixed. At this time, the larger the channel width of the first channel corresponding to the first gate, the larger the proportion of the image area captured by the image acquisition device for verification. On the contrary, the smaller the channel width of the first channel corresponding to the first gate, the smaller the proportion of the image area captured by the image acquisition device for verification.
[0097] Therefore, based on the channel width of the first channel, it can be determined how to obtain the image area for verification (i.e., the image to be verified) from the image to be processed. For example, the larger the channel width of the first channel, the larger the proportion of the image area for verification obtained from the image to be processed; the smaller the channel width of the first channel, the smaller the proportion of the image area for verification obtained from the image to be processed.
[0098] In this application, the installation location of the image acquisition device can be determined by the following two dimensions:
[0099] Dimension one: the first installation position of the image acquisition device can be represented by: according to the direction in which the image acquisition device acquires images, the image acquisition device is located on the left side or the right side of the first channel.
[0100] The direction in which the image acquisition device acquires images is opposite to the direction in which the current person enters the first channel.
[0101] If the first channel is a bidirectional channel, there is an image acquisition device to acquire images for each direction in which a person walks, and the direction in which the image acquisition device acquires images is opposite to the direction in which another image acquisition device acquires images.
[0102] According to the direction in which the image acquisition device acquires images, if the image acquisition device is located on the left side of the first channel, that is, the first channel is located on the right side of the image acquisition device. At this time, when the image acquisition device captures the area of the first channel, it may also capture the area on the right side of the first channel (that is, the area where people walking through the second channel are walking).
[0103] On the contrary, according to the direction in which the image acquisition device acquires images, if the image acquisition device is located on the right side of the first channel, that is, the first channel is located on the left side of the image acquisition device. At this time, when the image acquisition device captures the area of the first channel, it may also capture the area on the left side of the first channel (that is, the area where people walking through the second channel are walking).
[0104] It is understandable that after the installation position of the image acquisition device is fixed, the position of the area where the person walking through the second channel is fixed in each frame of the image acquired by the image acquisition device. Therefore, it is possible to determine how to obtain the image area for verification (i.e., the image to be verified) from the image to be processed based on the first installation position of the image acquisition device.
[0105] Dimension 2: The second installation position of the image acquisition device can represent: the distance between the gate (which can be called the gate entrance) when the current person enters the first channel and the image acquisition device.
[0106] For example, Figure 1 As shown, when a person enters passage 1 in the direction indicated by direction N, the gate entrance is the gate closer to person C among the two gate openings of gate 1.
[0107] When the width of the first channel is fixed, the greater the distance between the image acquisition device and the gate entrance, the greater the proportion of the area of the person walking through the second channel captured by the image acquisition device, and the smaller the image area used for verification in the image to be processed. On the contrary, the smaller the distance between the image acquisition device and the gate entrance, the smaller the proportion of the area of the person walking through the second channel captured by the image acquisition device, and the larger the image area used for verification in the image to be processed.
[0108] For example, the smaller the distance between the image acquisition device and the gate entrance, the larger the image area obtained from the image to be processed for verification; the larger the distance between the image acquisition device and the gate entrance, the smaller the image area obtained from the image to be processed for verification.
[0109] Therefore, it is also possible to determine how to obtain the image area for verification (ie, the image to be verified) from the image to be processed based on the second installation position of the image acquisition device.
[0110] Based on the above analysis, in the present application, the image area for verification in the image to be processed can be determined based on at least one of the channel width of the first channel, the first installation position of the image acquisition device, and the second installation position of the image acquisition device.
[0111] In some embodiments, the image acquisition device may acquire images in a mirroring manner. The image region for verification in the image to be processed may be determined according to the installation position of the image acquisition device.
[0112] In the embodiment of the present application, according to the direction in which the image acquisition device acquires images, if the image acquisition device is located on the right side of the first channel and the adjacent gate is located on the left side of the first channel, the area where the people walking through the second channel are acquired corresponds to the right side of the image to be processed. Then, the image in the upper left area of the image to be processed can be acquired. That is, the upper boundary of the image to be verified coincides with the upper boundary of the image to be processed, and the left boundary of the image to be verified coincides with the left boundary of the image to be processed.
[0113] The width of the image to be processed and the preset value may be multiplied as the width of the image area for verification, and the height of the image to be processed and the preset value may be multiplied as the height of the image area for verification. The preset value may range from (0, 1).
[0114] In one implementation, the preset value may be a fixed value pre-set by a technician.
[0115] In another implementation, the preset value may also be determined according to the second installation position of the image acquisition device. For example, the greater the distance between the gate entrance and the image acquisition device, the closer the preset value is to 0; the smaller the distance between the gate entrance and the image acquisition device, the closer the preset value is to 1.
[0116] For another example, according to the direction in which the image acquisition device acquires images, if the image acquisition device is located on the left side of the first channel, and the adjacent gate is located on the right side of the first channel, the area where the people walking through the second channel are acquired corresponds to the left side of the image to be processed. Then, the image in the upper left area of the image to be processed can be acquired. That is, the upper boundary of the image to be verified coincides with the upper boundary of the image to be processed, and the right boundary of the image to be verified coincides with the right boundary of the image to be processed.
[0117] The manner of determining the size (height and width) of the image area used for verification may refer to the manner of determining the size of the image area used for verification described above.
[0118] Based on the above processing, the position of the image area for verification in the image to be processed can be determined according to the first installation position of the image acquisition device. In addition, the size of the image area for verification in the image to be processed can also be determined according to the second installation position of the image acquisition device, so that the accuracy of image verification can be improved.
[0119] In some embodiments, see Figure 3 ,exist Figure 2On the basis of Figure 3 The second flow chart of the gate control method provided in the embodiment of the present application, correspondingly, step S202 includes:
[0120] S2021: Determine an image area for verification in the image to be processed according to the target ratio, and obtain the image to be verified.
[0121] Among them, in the corresponding relationship between the preset ratio set and the channel width set, the channel width of the first channel corresponds to the target ratio; and the preset channel width in the corresponding relationship is positively correlated with the ratio.
[0122] In the embodiment of the present application, in the correspondence between the preset ratio set and the channel width set, the channel width set records at least one preset channel width, and for each preset channel width, the ratio set records the ratio corresponding to the preset channel width. The specific process of determining the ratio corresponding to a preset channel width will be described in subsequent embodiments.
[0123] In actual scenarios, the channel width of the first channel may be inconsistent with a plurality of preset channel widths recorded in the channel width set. In order to improve the efficiency of determining the target ratio corresponding to the channel width of the first channel, for the channel width, if the channel width is less than a preset channel width, and the absolute value of the difference with the preset channel width is less than the error threshold, it can be considered that the ratio corresponding to the channel width of the first channel is consistent with the ratio corresponding to the preset channel width. In other words, each preset channel width corresponds to a channel width range, and the channel widths within a channel width range all correspond to the same ratio.
[0124] Furthermore, after obtaining the target ratio, the size of the image area in the image to be processed for verification (i.e., the size of the image to be verified) can be determined according to the target ratio. For example, the product of the width of the image to be processed and the target ratio can be calculated as the width of the image to be verified, and the product of the height of the image to be processed and the target ratio can be calculated as the height of the image to be verified, so that the size of the image to be verified can be determined.
[0125] In some embodiments, the image area for verification in the image to be processed may also be determined in combination with the first installation position of the image acquisition device. Accordingly, step S2021 includes:
[0126] Step 1: According to the direction in which the image acquisition device acquires images, if the image acquisition device is located on the right side of the first channel and the adjacent gate is located on the left side of the first channel, then according to the target ratio, the image in the upper left area of the image to be processed is acquired to obtain the image to be verified.
[0127] Step 2: According to the direction in which the image acquisition device acquires images, if the image acquisition device is located on the left side of the first channel and the adjacent gate is located on the right side of the first channel, then according to the target ratio, the image in the upper right area of the image to be processed is acquired to obtain the image to be verified.
[0128] In the embodiment of the present application, according to the direction in which the image acquisition device acquires images, if the image acquisition device is located on the right side of the first channel and the adjacent gate is located on the left side of the first channel, the area where the people walking through the second channel are acquired at this time corresponds to the right side of the image to be processed. Accordingly, the image in the upper left area of the image to be processed can be acquired to obtain the image to be verified. That is, the upper boundary of the image to be verified coincides with the upper boundary of the image to be processed, and the left boundary of the image to be verified coincides with the left boundary of the image to be processed.
[0129] On the contrary, according to the direction in which the image acquisition device acquires images, if the image acquisition device is located on the left side of the first channel and the adjacent gate is located on the right side of the first channel, the image in the upper right area of the image to be processed can be acquired to obtain the image to be verified. That is, the upper boundary of the image to be verified coincides with the upper boundary of the image to be processed, and the right boundary of the image to be verified coincides with the right boundary of the image to be processed.
[0130] Based on the above processing, after the gate system is installed, the corresponding ratio can be selected according to the channel width of the first channel to determine the size of the image area for verification in the image to be processed. In addition, the position of the image area for verification in the image to be processed can also be determined according to the first installation position of the image acquisition device. It is also possible to determine the image area for verification in the image to be processed in combination with the channel width of the first channel and the installation position of the image acquisition device to obtain the image to be verified. In addition, since in actual scenes, the face is usually located in the upper half of the image captured by the image acquisition device, obtaining the image to be verified based on the above method can avoid mistakenly filtering out the face that needs to be verified, and thus can improve the accuracy of the verification result.
[0131] In some embodiments, the image acquisition device is installed at the same position as the gate. The correspondence between the ratio set and the channel width set can be obtained by the following steps:
[0132] Step 1: For each preset channel width in the channel width set, determine the angle corresponding to the preset channel width according to the ratio of the preset channel width to the preset minimum distance for senseless passage.
[0133] Among them, the tangent value of the angle corresponding to the preset channel width represents the ratio of the preset channel width to the preset minimum distance for contactless passage; the minimum distance for contactless passage represents: the distance a person walks from the time when the image verification is successful to the time when the gate door is fully opened.
[0134] Step 2: If the angle corresponding to the preset channel width is not greater than the field of view of the image acquisition device, then calculate the ratio of the angle corresponding to the preset channel width to the field of view as the ratio corresponding to the preset channel width.
[0135] Step 3: If the angle corresponding to the preset channel width is greater than the field of view of the image acquisition device, determine that the ratio corresponding to the preset channel width is 1.
[0136] In actual scenarios, it is possible to detect whether a person passes through the passage within the delay time after the image verification is successful. If a person is detected passing through, the gate door can be closed after the person passes through the passage; if no person is detected passing through, the gate door can be closed when the delay time is reached. For example, the delay time can be 8 seconds. It is understandable that if the gate door is opened too late, people may need to stand and wait for the gate door to open. Therefore, a minimum distance for senseless passage can be set in advance, so that when the distance between the person and the gate door is the minimum distance for senseless passage, and the image captured by the image acquisition device passes the verification, the gate door can be controlled to open, and accordingly, when the person walks to the gate door, the gate door is fully opened.
[0137] For each preset channel width in the channel width set, the ratio of the preset channel width to the minimum distance for insensitive passage (which can be called the first ratio) can be calculated, and the angle corresponding to the first ratio can be calculated using the inverse tangent function as the angle corresponding to the preset channel width.
[0138] If the angle corresponding to the preset channel width is equal to the field of view angle of the image acquisition device, it means that for a channel, if the channel width of the channel is the preset channel width, at the position corresponding to the minimum distance for senseless passage, the area captured by the image acquisition device is consistent with the preset channel width. At this time, the image captured by the image acquisition device does not include the area where people walk through its adjacent channels. Subsequently, the image can be directly verified.
[0139] As shown in Figure 4(a), Figure 4(a) is the first schematic diagram for determining the angle corresponding to the channel width provided by an embodiment of the present application. In Figure 4(a), the camera and the gate are both installed at a position half the length of the channel, W1 is the channel width of the channel, and D is the minimum distance for non-contact passage. The shortest distance from straight line c to the camera is D. The field of view of the camera is the angle β formed by the dotted line a and the dotted line b. Moreover, the angle β formed by the dotted line a and the dotted line b also represents the angle α corresponding to the channel width W1. At this time, the angle α corresponding to the channel width W1 is equal to the field of view angle β of the image acquisition device, and the ratio corresponding to the channel width is α / β=1.
[0140] If the angle corresponding to the preset channel width is greater than the field of view of the image acquisition device, it means that for a channel, if the channel width of the channel is the preset channel width, the image acquired by the image acquisition device does not include the area where people walk through its adjacent channels, that is, the image acquired by the image acquisition device only includes the area where people walk through the channel. Subsequently, the image can be directly verified.
[0141] As shown in Figure 4(b), Figure 4(b) is a second schematic diagram for determining the angle corresponding to the channel width provided in an embodiment of the present application. In Figure 4(b), the camera and the gate are both installed at a position half the length of the channel, W2 is the channel width of the channel, and D is the minimum distance for non-contact passage. The shortest distance from straight line c to the camera is D. The angle β formed by the dotted line a and the dotted line b represents: the field of view of the camera. The angle α formed by the dotted line d and the dotted line b represents: the angle corresponding to the channel width W2. At this time, the angle α corresponding to the channel width W2 is greater than the field of view angle β of the image acquisition device, and the ratio corresponding to the channel width is 1.
[0142] If the angle corresponding to the preset channel width is not greater than the field of view of the image acquisition device, it means that for a channel, if the channel width of the channel is the preset channel width, the image acquired by the image acquisition device contains the area where people walk through its adjacent channels. Then, the image area used for verification can be determined from the image, and accordingly, the ratio of the angle corresponding to the preset channel width to the field of view can be calculated as the ratio corresponding to the preset channel width.
[0143] As shown in Figure 4(c), Figure 4(c) is a third schematic diagram for determining the angle corresponding to the channel width provided in an embodiment of the present application. In Figure 4(c), the camera and the gate are both installed at a position half the length of the channel, W3 is the channel width of the channel, and D is the minimum distance for non-contact passage. The shortest distance from straight line c to the camera is D. The angle β formed by the dotted line a and the dotted line b represents: the field of view of the camera. The angle α formed by the dotted line d and the dotted line b represents: the angle corresponding to the channel width W3. At this time, the angle α corresponding to the channel width W3 is smaller than the field of view angle β of the image acquisition device, and the ratio corresponding to the channel width W3 is α / β.
[0144] For example, when the channel length is 1650 mm, the minimum distance for non-contact passage is 1352 mm, the field of view of the camera is 44.08°, and the camera and the gate are both installed at a position half the channel length, for different preset channel widths, the proportions corresponding to each preset channel width are determined. See Table 1, which is a correspondence table between a ratio set and a channel width set adopted in the embodiment of the present application.
[0145] Table 1 Correspondence between ratio set and channel width set
[0146]
[0147] In Table 1, when the preset channel width is 650mm, the corresponding channel width range is [550,650]mm, the angle corresponding to the preset channel width is 31.8°, and the ratio corresponding to the preset channel width is 0.72. When the preset channel width is 750mm, the corresponding channel width range is (650,750]mm, the angle corresponding to the preset channel width is 34.9°, and the ratio corresponding to the preset channel width is 0.79. When the preset channel width is 900mm, the corresponding channel width range is (750,900]mm, the angle corresponding to the preset channel width is 39.13°, and the ratio corresponding to the preset channel width is 0.89. When the preset channel width is 1100mm, the corresponding channel width range is (900,1100]mm, the angle corresponding to the preset channel width is 44.08°, and the ratio corresponding to the preset channel width is 1.
[0148] Based on the above processing, the ratios corresponding to different preset channel widths can be calculated in advance. After the gate system is installed, the corresponding target ratio is selected according to the channel width corresponding to the gate. According to the target ratio, the image area for verification in the image to be processed is determined to obtain the image to be verified. In this way, the efficiency of obtaining the image to be verified can be improved, and the accuracy of image verification can be improved.
[0149] With respect to step S103 , the image to be verified may be verified to obtain a verification result of the image to be verified.
[0150] For example, the face included in the image to be verified can be feature extracted to obtain the face features to be verified. It is determined whether there is a template face feature that matches the face features to be verified among the pre-recorded template face features that have the authority to pass through the first gate. If so, it means that the person has the authority to pass through the first gate, and the gate door of the first gate is opened; otherwise, the gate door of the first gate is not opened.
[0151] In some embodiments, the gate system may further include a display device, and the display device may display the image to be verified.
[0152] In some embodiments, in order to improve the filling effect of the image to be verified on the display interface of the display device, it is necessary to make the aspect ratio of the image to be verified consistent with the preset aspect ratio of the display interface of the display device. Therefore, the image to be processed can be cropped. Figure 5 ,exist Figure 2 On the basis of Figure 5 The third flow chart of the gate control method provided in the embodiment of the present application, correspondingly, step S201 includes:
[0153] S2011: Acquire an image containing a human face captured by an image acquisition device as an original image.
[0154] S2012: Cropping the original image according to a preset aspect ratio to obtain an image to be processed.
[0155] After step S202, the method further includes:
[0156] S204: Displaying the image to be verified in the display interface of the display device.
[0157] In the embodiment of the present application, for each frame of image captured by the image acquisition device, a face detection algorithm can be used to determine whether the frame of image contains a face. If the frame of image contains a face, the frame of image (i.e., the original image) is cropped according to the preset aspect ratio of the display interface of the display device to obtain an image to be processed.
[0158] In one implementation, a DSP (Digital Signal Processor) may be used to crop the original image.
[0159] In some embodiments, the method of cropping the original image according to the aspect ratio of the display interface of the display device can be determined according to the installation position of the image acquisition device. Accordingly, the above step S2011 includes:
[0160] Step (1): If the aspect ratio of the original image is greater than the preset aspect ratio, and, according to the direction in which the image acquisition device acquires the image, the image acquisition device is located on the right side of the first channel and the adjacent gate is located on the left side of the first channel, then the image in the left area of the original image is acquired according to the preset aspect ratio to obtain the image to be processed.
[0161] Step (2): If the aspect ratio of the original image is greater than the preset aspect ratio, and, according to the direction in which the image acquisition device acquires the image, the image acquisition device is located on the left side of the first channel and the adjacent gate is located on the right side of the first channel, then the image in the right area of the original image is acquired according to the preset aspect ratio to obtain the image to be processed.
[0162] In an embodiment of the present application, if the aspect ratio of the original image is greater than the preset aspect ratio of the display device, it means that the original image is wide, and therefore, the area on the left or right side of the original image needs to be cropped. Furthermore, according to the first installation position of the image acquisition device, the image in the left or right area of the original image can be obtained according to the preset aspect ratio to obtain the image to be processed. Among them, the method of determining the image area corresponding to the image to be processed from the original image according to the first installation position of the image acquisition device can refer to the method of determining the image area corresponding to the image to be verified from the image to be processed according to the first installation position of the image acquisition device in the above embodiment.
[0163] Step (3): If the aspect ratio of the original image is smaller than the preset aspect ratio, the image in the upper area of the original image is obtained according to the preset aspect ratio to obtain the image to be processed.
[0164] In the embodiment of the present application, if the aspect ratio of the original image is smaller than the aspect ratio of the display interface of the display device, it means that the original image is wider. In actual scenes, since the face of the person captured by the image acquisition device is usually located in the upper area of the original image, the image in the upper area of the image to be processed can be obtained according to the aspect ratio of the display interface of the display device to obtain the image to be processed.
[0165] Based on the above processing, the image to be processed can be cropped according to the installation position of the image acquisition device, so as to avoid cropping out the image area corresponding to the area where people walking through the first channel in the image to be processed during the cropping process. In this way, the accuracy of the detection results of the image to be verified can be avoided while ensuring the display effect.
[0166] In addition, since in actual scenarios, faces are usually located in the upper half of the image captured by the image acquisition device, obtaining the image to be processed based on the above method can avoid mistakenly filtering out faces that need to be verified, thereby improving the accuracy of the verification results.
[0167] Subsequently, when the image to be verified is obtained from the image area for verification in the image to be processed, the aspect ratio of the image area for verification is consistent with the aspect ratio of the image to be processed, that is, the aspect ratio of the image to be verified is also consistent with the aspect ratio of the image to be processed, and the aspect ratio of the image to be verified is also consistent with the preset aspect ratio. Furthermore, the size of the image to be verified can be scaled proportionally so that the size of the image to be verified is consistent with the size of the display interface of the display device. In other words, the image to be verified can be displayed in the display interface of the display device.
[0168] It can be understood that, in the embodiment of the present application, displaying the image to be verified and verifying the image to be verified are two independent steps.
[0169] In one implementation, the image to be processed may be displayed and the image to be verified may be verified. However, since the image to be processed includes the area where people who pass through the second channel corresponding to the adjacent gate of the first gate walk, that is, the image to be processed may include the faces of people who need to pass through the adjacent gate, if the image to be processed is displayed, the image area other than the image to be verified in the image to be processed that is not to be verified may be displayed.
[0170] In order to avoid the appearance of image areas that are displayed but not verified, thereby reducing the user experience, the embodiment of the present application can display the image to be verified, that is, to ensure that the displayed image is the image that needs to be verified.
[0171] like Figure 6 As shown, Figure 6 A schematic diagram of a process for processing an original image provided in an embodiment of the present application.
[0172] Figure 6 In the example, the width of the original image is 1080 and the height is 1920. If the width of the display interface of the display device is 1024 and the height of the display interface of the display device is 600, the preset aspect ratio may be approximately 1.7 (1024:600).
[0173] Furthermore, the original image can be cropped according to a preset aspect ratio to obtain an image to be processed. The width of the image to be processed is 1080, and the height of the image to be processed is 1840, that is, the aspect ratio of the image to be processed can be approximately 1.7 (1840:1080). If the determined target ratio is 0.8, the image area for verification in the image to be processed is determined according to the target ratio to obtain the image to be verified. The width of the image to be verified is 864, and the height is 1472, that is, the aspect ratio of the image to be verified can be approximately 1.7 (1472:864). Subsequently, when the image to be verified is displayed, the image to be verified can be proportionally reduced by 0.69 times to display the reduced image to be verified in the display interface of the display device.
[0174] Based on the above processing, the image containing the face captured by the image acquisition device can be cropped according to the aspect ratio of the display interface of the display device to obtain an image to be verified whose aspect ratio is consistent with the aspect ratio of the display interface of the display device. In this way, the image to be verified can be filled and displayed in the display interface of the display device, which can improve the user's viewing experience.
[0175] In the technical solution of this application, the operations involved in obtaining, storing, using, processing, transmitting, providing and disclosing user personal information are all carried out with the user's authorization.
[0176] It should be noted that the face in this embodiment is not the face of a specific user and cannot reflect the personal information of a specific user.
[0177] It should be noted that the face images in this embodiment are from a public dataset.
[0178] Based on the same inventive concept, the present application embodiment provides a gate system. Figure 7 , Figure 7 A system architecture diagram of a gate system provided in an embodiment of the present application.
[0179] The gate system 700 includes: a processor 701 and an image acquisition device 702 .
[0180] The image acquisition device 702 is used to acquire images containing faces of people in the channel corresponding to the first gate.
[0181] Processor 701 is used to execute the gate control method provided in this application.
[0182] The gate system provided in the embodiment of the present application can process the image to be processed according to the channel width of the first channel corresponding to the first gate, and / or the installation position of the image acquisition device of the gate to obtain the image to be verified, and can filter the image area corresponding to the area where people walk through the second channel corresponding to the adjacent gate of the first gate in the image to be processed, thereby eliminating the interference of the faces of people in the adjacent channels on the verification result of the image to be verified, and avoiding the problem of the gate door being opened by mistake.
[0183] In some embodiments, the gate system 700 further includes a display device, which is used to display the image to be verified obtained by the processor 701 .
[0184] Based on the same inventive concept, the embodiment of the present application also provides a gate control device. Figure 8 , Figure 8 A structural diagram of a gate control device provided in an embodiment of the present application, the device comprising:
[0185] The module 801 for acquiring an image to be processed is used to acquire an image to be processed; wherein the image to be processed is obtained based on an image containing a face acquired by an image acquisition device of the first gate;
[0186] The module 802 for acquiring the image to be verified is used to determine the image area for verification in the image to be processed based on the channel width of the first channel corresponding to the first gate and / or the installation position of the image acquisition device, and obtain the image to be verified; wherein the image area in the image to be processed other than the image to be verified includes: the area where people walk through the second channel corresponding to the gate adjacent to the first gate;
[0187] The verification module 803 is used to determine whether to open the gate door of the first gate based on the verification result of the image to be verified.
[0188] In some embodiments, the aspect ratio of the image to be verified is consistent with a preset aspect ratio of a display interface of the display device;
[0189] The to-be-processed image acquisition module 801 comprises:
[0190] An original image acquisition module, used to acquire the image containing the face acquired by the image acquisition device as the original image;
[0191] A cropping module, used for cropping the original image according to the preset aspect ratio to obtain an image to be processed;
[0192] The device also includes:
[0193] The display module is used to determine the image area for verification in the image to be processed based on the channel width of the first channel corresponding to the first gate and / or the installation position of the image acquisition device, and after obtaining the image to be verified, display the image to be verified in the display interface of the display device.
[0194] In some embodiments, the cropping module is specifically used to:
[0195] If the aspect ratio of the original image is greater than the preset aspect ratio, and, according to the direction in which the image acquisition device acquires images, the image acquisition device is located on the right side of the first channel, and the adjacent gate is located on the left side of the first channel, then according to the preset aspect ratio, an image in the left area of the original image is acquired to obtain an image to be processed;
[0196] If the aspect ratio of the original image is greater than the preset aspect ratio, and, according to the direction in which the image acquisition device acquires images, the image acquisition device is located on the left side of the first channel, and the adjacent gate is located on the right side of the first channel, then according to the preset aspect ratio, an image in the right area of the original image is acquired to obtain an image to be processed;
[0197] If the aspect ratio of the original image is smaller than the preset aspect ratio, the image in the upper area of the original image is acquired according to the preset aspect ratio to obtain the image to be processed.
[0198] In some embodiments, the to-be-verified image acquisition module 802 includes:
[0199] The submodule for acquiring the image to be verified is used to determine the image area for verification in the image to be processed according to the target ratio, so as to obtain the image to be verified; wherein, in the correspondence between the preset ratio set and the channel width set, the channel width of the first channel corresponds to the target ratio; and the preset channel width in the correspondence is positively correlated with the ratio.
[0200] In some embodiments, the image acquisition device is installed at the same position as the gate;
[0201] The device also includes:
[0202] A corresponding relationship generation module is used to determine, for each preset channel width in the channel width set, an angle corresponding to the preset channel width according to the ratio of the preset channel width to the preset minimum distance for contactless passage; wherein the tangent value of the angle corresponding to the preset channel width represents the ratio of the preset channel width to the preset minimum distance for contactless passage; the minimum distance for contactless passage represents: the distance walked by a person from the time when the image verification is successful to the time when the gate is fully opened;
[0203] If the angle corresponding to the preset channel width is not greater than the field of view angle of the image acquisition device, then calculating the ratio of the angle corresponding to the preset channel width to the field of view angle as the ratio corresponding to the preset channel width;
[0204] If the angle corresponding to the preset channel width is greater than the field of view of the image acquisition device, the ratio corresponding to the preset channel width is determined to be 1.
[0205] In some embodiments, the to-be-verified image acquisition submodule is specifically used to:
[0206] According to the direction in which the image acquisition device acquires images, if the image acquisition device is located on the right side of the first channel and the adjacent gate is located on the left side of the first channel, then according to the target ratio, the image in the upper left area of the image to be processed is acquired to obtain the image to be verified;
[0207] According to the direction in which the image acquisition device captures images, if the image acquisition device is located on the left side of the first channel and the adjacent gate is located on the right side of the first channel, the image in the upper right area of the image to be processed is acquired according to the target ratio to obtain the image to be verified.
[0208] The present application also provides an electronic device, such as Fig. 9 As shown, including:
[0209] Memory 901, used for storing computer programs;
[0210] The processor 902 is used to implement the steps of any gate control method in the above embodiments when executing the program stored in the memory 901.
[0211] Furthermore, the electronic device may further include a communication bus and / or a communication interface, and the processor 902, the communication interface, and the memory 901 communicate with each other via the communication bus.
[0212] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0213] The communication interface is used for communication between the above electronic device and other devices.
[0214] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0215] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0216] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned gate control methods are implemented.
[0217] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any gate control method in the above embodiments.
[0218] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a storage medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0219] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0220] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system, device, electronic device, and computer-readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0221] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. A gate control method, characterized in that: The method comprises: Acquire an image to be processed; wherein the image to be processed is obtained based on an image containing a face acquired by an image acquisition device of the first gate; Based on the channel width of the first channel corresponding to the first gate and / or the installation position of the image acquisition device, determine the image area for verification in the image to be processed to obtain the image to be verified; wherein the image area in the image to be processed other than the image to be verified includes: an area where people walk through the second channel corresponding to the gate adjacent to the first gate; Based on a verification result of the image to be verified, it is determined whether to open the gate door of the first gate.
2. The method according to claim 1, characterized in that The aspect ratio of the image to be verified is consistent with a preset aspect ratio of the display interface of the display device; The step of obtaining the image to be processed comprises: Acquire an image containing a human face captured by the image acquisition device as an original image; Cropping the original image according to the preset aspect ratio to obtain an image to be processed; After determining the image area for verification in the image to be processed based on the channel width of the first channel corresponding to the first gate and / or the installation position of the image acquisition device, and obtaining the image to be verified, the method further includes: The image to be verified is displayed in a display interface of the display device.
3. The method according to claim 2, characterized in that The step of cropping the original image according to the preset aspect ratio to obtain the image to be processed includes: If the aspect ratio of the original image is greater than the preset aspect ratio, and, according to the direction in which the image acquisition device acquires images, the image acquisition device is located on the right side of the first channel, and the adjacent gate is located on the left side of the first channel, then according to the preset aspect ratio, an image in the left area of the original image is acquired to obtain an image to be processed; If the aspect ratio of the original image is greater than the preset aspect ratio, and, according to the direction in which the image acquisition device acquires images, the image acquisition device is located on the left side of the first channel, and the adjacent gate is located on the right side of the first channel, then according to the preset aspect ratio, an image in the right area of the original image is acquired to obtain an image to be processed; If the aspect ratio of the original image is smaller than the preset aspect ratio, the image in the upper area of the original image is acquired according to the preset aspect ratio to obtain the image to be processed.
4. The method according to claim 1 or 2, characterized in that: The determining, based on the channel width of the first channel corresponding to the first gate and / or the installation position of the image acquisition device, an image area for verification in the image to be processed to obtain the image to be verified includes: According to the target ratio, the image area for verification in the image to be processed is determined to obtain the image to be verified; wherein, in the correspondence between the preset ratio set and the channel width set, the channel width of the first channel corresponds to the target ratio; and the preset channel width in the correspondence is positively correlated with the ratio.
5. The method according to claim 4, characterized in that The image acquisition device is installed at the same position as the gate; The corresponding relationship is obtained by following the steps: For each preset channel width in the channel width set, the angle corresponding to the preset channel width is determined according to the ratio of the preset channel width to the preset minimum distance for contactless passage; wherein the tangent value of the angle corresponding to the preset channel width represents the ratio of the preset channel width to the minimum distance for contactless passage; the minimum distance for contactless passage represents: the distance walked by a person from the time when the image verification is successful to the time when the gate is fully opened; If the angle corresponding to the preset channel width is not greater than the field of view angle of the image acquisition device, then calculating the ratio of the angle corresponding to the preset channel width to the field of view angle as the ratio corresponding to the preset channel width; If the angle corresponding to the preset channel width is greater than the field of view of the image acquisition device, the ratio corresponding to the preset channel width is determined to be 1.
6. The method according to claim 4, characterized in that The step of determining an image area for verification in the image to be processed according to the target ratio to obtain the image to be verified includes: According to the direction in which the image acquisition device acquires images, if the image acquisition device is located on the right side of the first channel and the adjacent gate is located on the left side of the first channel, then according to the target ratio, the image in the upper left area of the image to be processed is acquired to obtain the image to be verified; According to the direction in which the image acquisition device captures images, if the image acquisition device is located on the left side of the first channel and the adjacent gate is located on the right side of the first channel, the image in the upper right area of the image to be processed is acquired according to the target ratio to obtain the image to be verified.
7. A gate system, characterized in that: The gate system includes a processor and an image acquisition device; The image acquisition device is used to acquire an image containing a face of a person in the channel corresponding to the first gate; The processor is used to execute the method according to any one of claims 1-6.
8. The gate system according to claim 7, characterized in that: The gate system also includes a display device; The display device is used to display the image to be verified obtained by the processor.
9. A gate control device, characterized in that: The device comprises: The module for acquiring the image to be processed is used to acquire the image to be processed; wherein the image to be processed is obtained based on the image containing the face acquired by the image acquisition device of the first gate; The module for acquiring the image to be verified is used to determine the image area for verification in the image to be processed based on the channel width of the first channel corresponding to the first gate and / or the installation position of the image acquisition device, so as to obtain the image to be verified; wherein the image area in the image to be processed other than the image to be verified includes: the area where people walk through the second channel corresponding to the gate adjacent to the first gate; A verification module is used to determine whether to open the gate door of the first gate based on a verification result of the image to be verified.
10. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-6 when executing a program stored in a memory.
