CN112446922A - Pedestrian reverse judgment method and device for channel gate - Google Patents

Pedestrian reverse judgment method and device for channel gate Download PDF

Info

Publication number
CN112446922A
CN112446922A CN202011329105.3A CN202011329105A CN112446922A CN 112446922 A CN112446922 A CN 112446922A CN 202011329105 A CN202011329105 A CN 202011329105A CN 112446922 A CN112446922 A CN 112446922A
Authority
CN
China
Prior art keywords
pedestrian
frame image
determining
current frame
current
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011329105.3A
Other languages
Chinese (zh)
Inventor
杨奇
李治农
陈书楷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Entropy Technology Co Ltd
ZKTeco Co Ltd
Original Assignee
Xiamen Entropy Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Entropy Technology Co Ltd filed Critical Xiamen Entropy Technology Co Ltd
Priority to CN202011329105.3A priority Critical patent/CN112446922A/en
Publication of CN112446922A publication Critical patent/CN112446922A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention discloses a pedestrian reverse judgment method and device for a channel gate, wherein the method comprises the following steps: acquiring a current frame image of the light-emitting structure through an image acquisition device; determining the position coordinates of the current pedestrian in the current frame image; acquiring historical pedestrian position coordinates; the historical pedestrian position coordinates are the pedestrian position coordinates in the previous frame image of the current frame image; calculating a first difference value between the current pedestrian position coordinate and the historical pedestrian position coordinate; judging the pedestrian direction in the gateway gate by adopting the first difference value; if the pedestrian direction is the same as the preset direction, the direction is not reversed, otherwise, the direction is reversed. According to the invention, the current pedestrian position coordinate in the current frame image of the light-emitting structure and the historical pedestrian position coordinate in the previous frame image are obtained, and the difference value between the current pedestrian position coordinate and the historical pedestrian position coordinate is calculated, so that the walking direction of the pedestrian in the current frame image is judged according to the difference value, and whether the pedestrian is in the reverse direction is judged according to the walking direction; therefore, whether the pedestrian reverses in the channel gate can be known in real time.

Description

Pedestrian reverse judgment method and device for channel gate
Technical Field
The invention relates to the technical field of channel gate control, in particular to a pedestrian reverse judgment method and device for a channel gate.
Background
At present, the channel gate has been widely applied to our daily life, such as airports, subway stations, docks, scenic spots, parks, student dormitories, unit pedestrian passageways, and the like, and the channel gate is mainly used for managing pedestrian flow, has the characteristics of quick opening, safety, convenience, and the like, and is an ideal management and evacuation device for high-frequency pedestrian access.
The prior art is through installing two parallel laser scanners in the top of passageway floodgate, detects pedestrian's time difference through the detection face of comparing two laser scanners under the same condition, judges which scanner that the pedestrian passes through earlier to judge pedestrian's walking direction. However, this method can only determine from which port of the gateway gate the pedestrian leaves, and cannot determine whether the pedestrian travels in the gateway gate in the reverse direction.
Disclosure of Invention
The invention provides a pedestrian reverse judging method for a channel gate, which is used for solving the technical problem that whether pedestrians in the channel gate are reversed cannot be judged in the prior art.
The invention provides a pedestrian reverse judgment method for a channel gate, wherein light-emitting structures and image acquisition devices are symmetrically arranged on two sides of the channel gate; the light emitting structure is composed of a light emitting material or a light emitting device; the method comprises the following steps:
acquiring a current frame image of the light-emitting structure through the image acquisition device;
determining the position coordinates of the current pedestrian in the current frame image;
acquiring historical pedestrian position coordinates; the historical pedestrian position coordinates are pedestrian position coordinates in a previous frame image of the current frame image;
calculating a first difference value between the current pedestrian position coordinate and the historical pedestrian position coordinate;
judging the direction of the pedestrian in the channel gate by adopting the first difference value;
if the pedestrian direction is the same as the preset direction, the direction is not reversed, otherwise, the direction is reversed.
Optionally, the step of determining the current pedestrian position coordinate in the current frame image includes:
performing edge detection on the current frame image to generate an edge detection image;
detecting an occlusion area in the edge detection image, and determining the occlusion length of the occlusion area;
and when the shielding length meets a first preset threshold value, determining the coordinate of the central point of the shielding area as the coordinate of the current pedestrian position.
Optionally, the step of detecting an occlusion region in the edge detection image and determining an occlusion length of the occlusion region includes:
acquiring a maximum bright point pixel row of the edge detection image;
detecting pixel black points on the pixel rows with the maximum bright points to obtain a shielding area;
and counting the number of the pixel black points, and determining the shielding length of the shielding area.
Optionally, the method further comprises:
when the historical pedestrian position coordinate does not exist, determining a starting point coordinate of the shielding area;
and calculating a second difference value between the starting point coordinate and a second preset threshold value, and judging the direction of the pedestrian in the channel gate by adopting the second difference value.
Optionally, the step of determining the direction of the pedestrian in the current frame image by using the first difference includes:
determining a first direction of the pedestrian in the current frame image by using the first difference value;
acquiring a global state variable, and if the first direction is the same as the global state variable, determining that the first direction is a pedestrian direction in the gateway gate;
and if the first direction is different from the global state variable, obtaining a marking parameter, and when the marking parameter is greater than a third preset threshold value, determining that the first direction is the pedestrian direction in the channel gate.
The invention provides a pedestrian reverse judging device of a channel gate, which comprises:
the current frame image acquisition module is used for acquiring a current frame image of the light-emitting structure through the image acquisition device;
the current pedestrian position coordinate determination module is used for determining the current pedestrian position coordinate in the current frame image;
the historical pedestrian position coordinate acquisition module is used for acquiring historical pedestrian position coordinates; the historical pedestrian position coordinates are pedestrian position coordinates in a previous frame image of the current frame image;
the first difference value calculation module is used for calculating a first difference value between the current pedestrian position coordinate and the historical pedestrian position coordinate;
the first pedestrian direction judging module is used for judging the pedestrian direction in the channel gate by adopting the first difference value;
and the reverse judging module is used for judging that the pedestrian direction is in the same direction as the preset direction, and otherwise, judging that the pedestrian direction is not reverse.
Optionally, the current pedestrian position coordinate determining module includes:
the edge detection submodule is used for carrying out edge detection on the current frame image to generate an edge detection image;
the occlusion length determining submodule is used for detecting an occlusion area in the edge detection image and determining the occlusion length of the occlusion area;
and the current pedestrian position coordinate determination submodule is used for determining the central point coordinate of the shielding area as the current pedestrian position coordinate when the shielding length meets a first preset threshold value.
Optionally, the occlusion length determination sub-module includes:
a maximum bright point pixel row acquisition unit, configured to acquire a maximum bright point pixel row of the edge detection image;
the pixel black point detection unit is used for detecting pixel black points on the pixel row with the largest bright point to obtain a shielding area;
and the shielding length determining unit is used for counting the number of the pixel black points and determining the shielding length of the shielding area.
Optionally, the apparatus further comprises:
a starting point coordinate determination module, configured to determine a starting point coordinate of the occlusion region when there is no historical pedestrian position coordinate;
and the second pedestrian direction judging module is used for calculating a second difference value between the starting point coordinate and a second preset threshold value, and judging the pedestrian direction in the current frame image by adopting the second difference value.
Optionally, the first pedestrian direction determining module includes:
the first direction determining submodule is used for determining the first direction of the pedestrian in the current frame image by adopting the first difference value;
the first pedestrian direction judgment submodule is used for acquiring a global state variable, and if the first direction is the same as the global state variable, the first direction is determined to be the pedestrian direction in the gateway gate;
and the second pedestrian direction judgment submodule is used for acquiring a marking parameter if the first direction is different from the global state variable, and determining that the first direction is the pedestrian direction in the gateway when the marking parameter is greater than a third preset threshold value.
According to the technical scheme, the invention has the following advantages: according to the invention, the current pedestrian position coordinate in the current frame image of the light-emitting structure and the historical pedestrian position coordinate in the previous frame image are obtained, and the difference value between the current pedestrian position coordinate and the historical pedestrian position coordinate is calculated, so that the walking direction of the pedestrian in the current frame image is judged according to the difference value, and whether the pedestrian is in the reverse direction is judged according to the walking direction; therefore, whether the pedestrian is in the reverse direction in the passage gate or not can be known in real time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a flowchart illustrating steps of a pedestrian reverse direction determination method for a gateway according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating steps of a pedestrian reversal determination method for a gateway according to another embodiment of the present invention;
FIG. 3 is a flowchart illustrating a step of determining coordinates of a current pedestrian position in a current frame image according to an embodiment of the present invention;
fig. 4 is a flowchart of a pedestrian direction determination method for a gateway according to an embodiment of the present invention;
fig. 5 is a block diagram of a pedestrian reverse direction determination device for a gateway gate according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a pedestrian reverse judging method and device for a channel gate, which are used for solving the technical problem that whether pedestrians in the channel gate are reverse cannot be judged in the prior art.
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating steps of a pedestrian reverse direction determination method for a gateway according to an embodiment of the present invention.
The invention provides a pedestrian reverse judgment method for a channel gate, which comprises the following steps:
step 101, acquiring a current frame image of the light-emitting structure through the image acquisition device;
step 102, determining the position coordinates of the current pedestrian in the current frame image;
in the embodiment of the present invention, a light emitting structure is disposed on one side of the channel gate, the light emitting structure is formed by arranging a plurality of light source emitting devices or light emitting materials at certain intervals, and in an option, the light emitting structure may be a lamp strip. The light strip is so named because it is shaped like a light strip when it is lighted. In one example, the light emitting structure may be disposed at a position as high as the waistline of the pedestrian in consideration of the height of the tunnel gate and the shape of the pedestrian.
And an image acquisition device is arranged at the other side of the channel gate and at the same height position with the light-emitting structure, and is used for shooting the light-emitting structure and acquiring the current frame image of the light-emitting structure. In practical applications, the image capturing device may be any device that can be used for image capturing, such as a camera, and the present invention is not limited thereto.
When having the pedestrian to pass through in the passageway floodgate, the pedestrian can shelter from light emitting structure production, leads to the light emitting structure's that image acquisition device gathered to have in the current frame image shelter from the region, and according to the length of sheltering from in the region, the general thickness of contrast pedestrian waist position can judge that should shelter from the region whether pedestrian shelters from produced. Meanwhile, the relative position of the pedestrian in the channel gate can be determined according to the relative position of the occlusion area in the current frame image.
In one example, to reduce misjudgment on pedestrians, two rows of light emitting structures, including an upper light strip and a lower light strip, may be installed at different height positions on the same side of the aisle gate, and are respectively used for detecting pedestrians and luggage. When the lamp belt detects the shielding region meeting the pedestrian judgment condition, if the lamp belt detects the shielding region meeting the trunk judgment condition, and the distance between the shielding regions of the lamp belt and the lamp belt meets the distance threshold value of the pedestrian carrying the trunk, the shielding region meeting the pedestrian judgment condition and detected by the lamp belt can be determined to be the shielding region generated by pedestrian passing.
103, acquiring historical pedestrian position coordinates; the historical pedestrian position coordinates are pedestrian position coordinates in a previous frame image of the current frame image;
104, calculating a first difference value of the current pedestrian position coordinate and the historical pedestrian position coordinate;
in the embodiment of the invention, the image acquisition of the light-emitting structure by the image acquisition device is continuously performed at certain time intervals. Therefore, the walking direction of the pedestrian can be judged according to the change situation of the position of the pedestrian in the two adjacent images.
In practical application, a coordinate system can be established by taking the left side of the lamp strip in the image collected by the image collecting device as a coordinate origin, the horizontal coordinates of the current frame image and the previous frame image are respectively obtained, and the moving condition of the pedestrian of the current frame image relative to the previous frame image is judged by calculating a first difference value between the horizontal coordinates of the current frame image and the previous frame image; therefore, the relative walking direction of the pedestrian in the time period from the previous frame image to the current frame image is determined.
Step 105, judging the pedestrian direction in the current frame image by adopting the first difference value;
and step 106, if the pedestrian direction is the same as the preset direction, no reverse direction exists, otherwise, the reverse direction exists.
Specifically, when the first difference is greater than zero, it represents that the position of the pedestrian in the current frame image in the channel gate moves rightward relative to the previous frame image, and therefore, the pedestrian walks from left to right in the walking direction of the pedestrian in the time period from the previous frame image to the current frame image. Similarly, when the first difference value is less than zero, the pedestrian walks from right to left; if the pedestrian direction is the same as the preset direction, the direction is not reversed, otherwise, the direction is reversed.
In an actual scene, whether the pedestrian is reversed or not can be determined by whether the set traveling direction of the gateway gate is consistent with the actual traveling direction of the pedestrian or not. In one example, when the gate left pedestrian authenticates, the gate is right on, so it can be set to travel right in the positive direction; if the pedestrian on the right side of the gate is verified, the gate is opened to the left, and the direction to the left is the positive direction.
According to the invention, the current pedestrian position coordinate in the current frame image of the light-emitting structure and the historical pedestrian position coordinate in the previous frame image are obtained, and the difference value between the current pedestrian position coordinate and the historical pedestrian position coordinate is calculated, so that the walking direction of the pedestrian in the current frame image is judged according to the difference value, and whether the pedestrian is in the reverse direction is judged according to the walking direction; therefore, whether the pedestrian reverses in the channel gate can be known in real time.
Referring to fig. 2, fig. 2 is a flowchart illustrating steps of a pedestrian reverse direction determination method for a gateway according to another embodiment of the present invention, including:
step 201, acquiring a current frame image of the light-emitting structure through the image acquisition device;
step 202, determining the position coordinates of the current pedestrian in the current frame image;
in the embodiment of the invention, the image acquisition device can continuously acquire the image of the light-emitting structure. When having the pedestrian to pass through in the passageway floodgate, the pedestrian can shelter from light emitting structure production, leads to the light emitting structure's that image acquisition device gathered to have in the current frame image shelter from the region, and according to the length of sheltering from in the region, the general thickness of contrast pedestrian waist position can judge that should shelter from the region whether pedestrian shelters from produced. Meanwhile, the relative position of the pedestrian in the channel gate can be determined according to the relative position of the occlusion area in the current frame image.
Referring to fig. 3, fig. 3 is a flowchart illustrating a step of determining a position coordinate of a current pedestrian in a current frame image according to an embodiment of the present invention.
As shown in fig. 3, step 202 may include the following sub-steps:
s21, carrying out edge detection on the current frame image to generate an edge detection image;
the essence of edge detection is that an algorithm is adopted to extract the boundary line between an object and a background in an image, the purpose is to identify points with obvious brightness change in a digital image, the data volume of the image can be greatly reduced, irrelevant information is removed, and the important structural attributes of the image are retained.
In the embodiment of the invention, the edge detection is carried out on the luminous image, so that the data volume required to be processed when the luminous image is processed subsequently can be reduced, and meanwhile, the light path of the lamp belt in the edge detection image is highlighted.
In practical applications, there are many methods for edge detection, and most of them can be divided into two categories: one class based on look-up and one class based on zero-crossings. The search-based approach detects boundaries by finding the maximum and minimum values in the first derivative of the image, usually by locating the boundaries in the direction where the gradient is largest. Zero crossing based methods find boundaries by finding zero crossings of the second derivative of the image, typically laplacian zero crossings or zero crossings represented by nonlinear differences.
The main tool for edge detection is the edge detection template. The effect of the template is to subtract the gray value of the left neighboring point from the gray value of the right neighboring point as the gray value of the point. In the area with similar gray scale, the gray scale value of the point is close to 0 as a result of doing so; whereas near the edges there is a significant jump in the grey value, which results in a large grey value at that point. A template is an edge detector that is mathematically defined as a gradient-based filter, also known as an edge operator. The gradient is directional, always perpendicular to the direction of the edge. If the edge of the image is in the horizontal direction, the edge of the image can be detected by using a template with the gradient in the vertical direction; if the edges of the image are horizontally oriented, the edges of the image may be detected using a template whose gradient is vertically oriented.
Commonly used edge detection templates include Laplacian operator, Roberts operator, Sobel operator, log (Laplacian-Gauss) operator, Kirsch operator, Prewitt operator, and the like.
In the embodiment of the invention, the Sobel algorithm is taken as an example to perform edge detection.
Soble edge detection is usually directional and can detect only vertical edges or both.
Firstly, defining coefficients of two gradient directions; and then calculating the gradient image, wherein the edge point is actually a point with severe gray level jump in the image, so that the gradient image is calculated first, and then the brighter part in the gradient image is extracted to be the simple edge part.
The Sobel operator uses a 3 × 3 filter to filter the image to obtain a gradient image, and how to filter, meaning and the like are not described in detail herein.
After defining the filter, gradient images in the vertical and erection directions are obtained respectively. Convolving the image with a filter.
In the embodiment of the invention, in order to reduce noise, enhance the connectivity of the lamp belt region, remove local black holes of the edge detection image, and perform morphological processing, such as expansion processing, on the edge detection image.
In practical application, in an edge detection image obtained through edge processing, a light beam formed by a lamp strip may be a discontinuous light beam, fine local black holes may exist in the light beam, and in order to eliminate the local black holes and enable the light beam to be continuous, expansion processing may be performed on the edge detection image. The principle of the expansion processing is that a highlight part in an edge detection image is expanded, and the field is expanded, so that a fine local black hole is covered, and the light beam is continuous.
S22, detecting an occlusion region in the edge detection image and determining the occlusion length of the occlusion region;
in the embodiment of the invention, when a pedestrian passes through the channel gate, the light-emitting structure is shielded, so that a shielding area is generated in an image. However, in actual scenes, the pedestrian in the gateway barrier may block the light strip by different positions such as the waist, the hand and the like. Therefore, at least one occlusion region may exist in the edge detection image, and the occlusion length of each occlusion region is different.
In one example, an occlusion region in an edge image may be detected and an occlusion length of the occlusion region determined in the following manner.
Acquiring a maximum bright point pixel row of the edge detection image;
detecting pixel black points on the pixel rows with the maximum bright points to obtain a shielding area;
and counting the number of the pixel black points, and determining the shielding length of the shielding area.
In the embodiment of the invention, the image acquisition device only correspondingly acquires the luminous image of one luminous structure, so that the bright spot pixels at the position of the lamp strip are the most in the edge detection image. Because the lamp area is luminous unstable, and the lamp area position can not the complete horizontally factor, the bright spot pixel is more can reflect the exact position in lamp area more. Therefore, in the embodiment of the invention, the shielding condition of the lamp strip can be reflected by detecting the largest bright point row with the largest bright point pixels. In the embodiment of the invention, because the subsequent processing is only carried out on the maximum bright spot row, the calculation amount for searching the shielding area can be effectively reduced, and the running speed is improved.
After the maximum bright point row of the edge detection image is acquired, the shielding area can be selected according to the pixel black point on the maximum bright point row. It will be appreciated that the grey scale values of the pixels of the occluded regions will be much less than the grey scale values of the pixels of the non-occluded regions. In the embodiment of the invention, the gray value is 10 as the critical value, when the gray value of the pixel point is less than 10, the pixel point can be judged to be shielded, so that a plurality of shielded pixel black points can be obtained, the row index of each pixel black point is recorded, and a plurality of target pixel points can be divided into at least one shielding area according to the row index. The length of each occlusion region can be calculated from the number of pixel black points.
S23, when the shielding length meets a first preset threshold value, determining that the center point coordinate of the shielding area is the pedestrian position coordinate.
From the practical point of view, the waist can reflect the position information of the pedestrian better than other parts, therefore, in the embodiment of the invention, a first threshold value for representing the thickness of the waist can be set, so that which shielding region is generated by the light-emitting structure shielded by the waist position of the pedestrian is judged according to whether the shielding length of the shielding region meets the first preset threshold value, and the position of the pedestrian is determined.
Step 203, acquiring historical pedestrian position coordinates; the historical pedestrian position coordinates are pedestrian position coordinates in a previous frame image of the current frame image;
step 204, calculating a first difference value between the current pedestrian position coordinate and the historical pedestrian position coordinate;
in the embodiment of the invention, the image acquisition of the light-emitting structure by the image acquisition device is continuously performed at certain time intervals. Therefore, the walking direction of the pedestrian can be judged according to the change situation of the position of the pedestrian in the two adjacent images.
In practical application, a coordinate system can be established by taking the left side of the lamp strip in the luminescent image collected by the image collecting device as a coordinate origin, the abscissa of the center point of the current frame image and the abscissa of the center point of the previous frame image are respectively obtained, and the change condition of the position of the pedestrian is determined by calculating a first difference value between the abscissas of the center points of the current frame image and the previous frame image.
Step 205, determining a first direction of the pedestrian in the current frame image by using the first difference value;
in one example, when the first difference value is greater than zero, the position of the pedestrian in the current frame image is characterized to the right of the position of the pedestrian in the previous frame image. Therefore, the pedestrian direction of the current frame image relative to the previous frame image can be determined to be from left to right. Similarly, when the first difference is smaller than zero, it can be determined that the pedestrian direction is from right to left in the current frame image relative to the previous frame image.
It should be noted that the image capturing device captures the image of the light-emitting structure at a faster frame rate, such as every 1/12 seconds. The time interval between two adjacent frames is short. In such a short time, the position change of the pedestrian cannot accurately reflect the traveling condition of the pedestrian in the gateway. Thus, in one example, the direction of travel of a pedestrian in the aisle barrier may be determined in conjunction with the direction of travel of the pedestrian in the multiple frame images. The specific process is as follows:
step 206, obtaining a global state variable, and if the first direction is the same as the global state variable, determining that the first direction is a pedestrian direction in the current frame image;
the global state variable is used for representing the actual walking direction of the pedestrian determined before the current frame image is acquired.
When the first direction of the pedestrian in the current frame image is consistent with the global state variable, the characteristic pedestrian traveling direction is not changed. At this time, the first direction is the traveling direction of the pedestrian in the tunnel gate at this time.
Step 207, if the first direction is different from the global state variable, obtaining a marking parameter, and when the marking parameter is greater than a third preset threshold, determining that the first direction is a pedestrian direction in the current frame image;
and 208, if the pedestrian direction is the same as the preset direction, no reverse direction exists, otherwise, the reverse direction exists.
When the first direction of the pedestrian in the current frame image is inconsistent with the global state variable, the fact that the traveling direction of the pedestrian is possibly changed is indicated, whether the direction of the pedestrian is always inconsistent with the global state variable within a long time needs to be judged, if yes, the fact that the traveling direction of the pedestrian is changed in the traveling process in the channel gate is indicated, and at the moment, the first direction is the traveling direction of the pedestrian in the channel gate at the moment.
In a specific implementation, a marking parameter may be set for marking the current frame image as an image whose consecutive frame is inconsistent with the global state variable. When the marking parameter is larger than the third preset threshold value, the pedestrian can be judged to travel in one direction all the time in a longer time, and the pedestrian can be determined to change the direction in the process of traveling in the passage gate. The first direction is taken as the traveling direction of the current pedestrian in the passage gate, and the first direction is taken as a new global state variable.
It should be noted that, when the flag parameter is not greater than the third preset threshold, it cannot be determined whether the pedestrian changes the traveling direction, and at this time, the global state variable is used as the traveling direction of the pedestrian and is kept unchanged.
In the embodiment of the present invention, there is also a case where no pedestrian is detected in the previous frame of image, and the traveling direction of the pedestrian in the tunnel gate can be obtained by:
when the historical pedestrian position coordinate does not exist, determining a starting point coordinate of the shielding area;
and calculating a second difference value between the starting point coordinate and a second preset threshold value, and judging the direction of the pedestrian in the channel gate by adopting the second difference value.
Specifically, when no pedestrian is detected in the previous frame image, the current frame image is characterized as the pedestrian being detected for the first time. At this time, the distance between the position of the pedestrian in the current frame image and the second preset threshold value at the two sides of the channel gate can be calculated to determine which port of the channel gate the pedestrian enters, so as to determine the traveling direction of the pedestrian in the channel gate. Wherein the second preset threshold comprises a left threshold and a right threshold. The left threshold and the right threshold are used for judging whether the pedestrian completely enters the channel gate and travels a certain distance in the channel gate.
In one example, with the leftmost side of the edge detection image as the origin of coordinates, the maximum bright point row is set up as a rectangular coordinate system in the horizontal axis, and the maximum bright point row is divided into 240 horizontal coordinates of the positive half axis of the horizontal axis. Scanning the edge detection image from left to right, and taking the abscissa of the first point of the scanned occlusion region as the origin coordinate of the occlusion region; when the coordinates of the starting point are larger than a left threshold value and smaller than 120, representing that a pedestrian enters from the left side of the channel gate and travels a certain distance to the right side; similarly, when the coordinates of the starting point is greater than 120 and less than the right-direction threshold value, it is characterized that the pedestrian enters from the right side of the passage gate and travels a certain distance to the left side.
Referring to fig. 4, fig. 4 is a flowchart of a pedestrian direction determination method for a tunnel gate according to an embodiment of the present invention.
As shown in fig. 4, in order to determine the pedestrian direction in the gateway, firstly, an image acquisition device is required to perform image acquisition on the light-emitting structure; then, carrying out edge detection morphological processing on the acquired image; then detecting a sheltered area of the morphologically processed image; judging the direction of the pedestrian by judging whether the difference of the central positions of the shielding areas in the front and the back frames of images is greater than a threshold value; if the time interval from the previous frame image to the current frame image is short, representing that the pedestrian has a right advancing direction, and if the time interval from the previous frame image to the current frame image is short, representing that the pedestrian has a left advancing direction.
After the direction of travel of the pedestrian within the aisle barrier is determined, a determination may be made as to whether the set direction of travel of the aisle barrier coincides with the actual direction of travel of the pedestrian. In one example, when the gate left pedestrian authenticates, the gate is right on, so it can be set to travel right in the positive direction; if the pedestrian on the right side of the gate is verified, the gate is opened to the left, and the direction to the left is the positive direction.
According to the invention, the current pedestrian position coordinate in the current frame image of the light-emitting structure and the historical pedestrian position coordinate in the previous frame image are obtained, and the difference value between the current pedestrian position coordinate and the historical pedestrian position coordinate is calculated, so that the walking direction of the pedestrian in the current frame image is judged according to the difference value, and whether the pedestrian is in the reverse direction is judged according to the walking direction; therefore, whether the pedestrian reverses in the channel gate can be known in real time.
Referring to fig. 5, fig. 5 is a block diagram of a pedestrian reversal determination device for a tunnel gate according to an embodiment of the present invention.
The invention provides a pedestrian direction judging device for a channel gate, which comprises:
a current frame image acquisition module 501, configured to acquire a current frame image of the light-emitting structure through the image acquisition device;
a current pedestrian position coordinate determining module 502, configured to determine a current pedestrian position coordinate in the current frame image;
a historical pedestrian position coordinate obtaining module 503, configured to obtain historical pedestrian position coordinates; the historical pedestrian position coordinates are pedestrian position coordinates in a previous frame image of the current frame image;
a first difference calculation module 504, configured to calculate a first difference between the current pedestrian position coordinate and the historical pedestrian position coordinate;
a first pedestrian direction determining module 505, configured to determine a pedestrian direction in the gateway gate by using the first difference value;
and a reverse determination module 505, configured to determine that there is no reverse direction if the pedestrian direction is the same as the preset direction, otherwise, there is a reverse direction.
In this embodiment of the present invention, the module 502 for determining the current pedestrian position coordinate includes:
the edge detection submodule is used for carrying out edge detection on the current frame image to generate an edge detection image;
the occlusion length determining submodule is used for detecting an occlusion area in the edge detection image and determining the occlusion length of the occlusion area;
and the current pedestrian position coordinate determination submodule is used for determining the central point coordinate of the shielding area as the current pedestrian position coordinate when the shielding length meets a first preset threshold value.
In an embodiment of the present invention, the occlusion length determining sub-module includes:
a maximum bright point pixel row acquisition unit, configured to acquire a maximum bright point pixel row of the edge detection image;
the pixel black point detection unit is used for detecting pixel black points on the pixel row with the largest bright point to obtain a shielding area;
and the shielding length determining unit is used for counting the number of the pixel black points and determining the shielding length of the shielding area.
In an embodiment of the present invention, the apparatus further includes:
a starting point coordinate determination module, configured to determine a starting point coordinate of the occlusion region when there is no historical pedestrian position coordinate;
and the second pedestrian direction judging module is used for calculating a second difference value between the starting point coordinate and a second preset threshold value, and judging the pedestrian direction in the current frame image by adopting the second difference value.
In this embodiment of the present invention, the first pedestrian direction determining module 505 includes:
the first direction determining submodule is used for determining the first direction of the pedestrian in the current frame image by adopting the first difference value;
the first pedestrian direction judgment submodule is used for acquiring a global state variable, and if the first direction is the same as the global state variable, the first direction is determined to be the pedestrian direction in the gateway gate;
and the second pedestrian direction judgment submodule is used for acquiring a marking parameter if the first direction is different from the global state variable, and determining that the first direction is the pedestrian direction in the gateway when the marking parameter is greater than a third preset threshold value.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A pedestrian reverse judgment method for a channel gate is characterized in that light-emitting structures and image acquisition devices are symmetrically arranged on two sides of the channel gate; the light emitting structure is composed of a light emitting material or a light emitting device; the method comprises the following steps:
acquiring a current frame image of the light-emitting structure through the image acquisition device;
determining the position coordinates of the current pedestrian in the current frame image;
acquiring historical pedestrian position coordinates; the historical pedestrian position coordinates are pedestrian position coordinates in a previous frame image of the current frame image;
calculating a first difference value between the current pedestrian position coordinate and the historical pedestrian position coordinate;
judging the direction of the pedestrian in the channel gate by adopting the first difference value;
if the pedestrian direction is the same as the preset direction, the direction is not reversed, otherwise, the direction is reversed.
2. The method of claim 1, wherein the step of determining the current pedestrian position coordinates in the current frame image comprises:
performing edge detection on the current frame image to generate an edge detection image;
detecting an occlusion area in the edge detection image, and determining the occlusion length of the occlusion area;
and when the shielding length meets a first preset threshold value, determining the coordinate of the central point of the shielding area as the coordinate of the current pedestrian position.
3. The method of claim 2, wherein the step of detecting an occlusion region in the edge detection image and determining an occlusion length of the occlusion region comprises:
acquiring a maximum bright point pixel row of the edge detection image;
detecting pixel black points on the pixel rows with the maximum bright points to obtain a shielding area;
and counting the number of the pixel black points, and determining the shielding length of the shielding area.
4. The method of claim 2, further comprising:
when the historical pedestrian position coordinate does not exist, determining a starting point coordinate of the shielding area;
and calculating a second difference value between the starting point coordinate and a second preset threshold value, and judging the direction of the pedestrian in the channel gate by adopting the second difference value.
5. The method according to claim 1, wherein the step of determining the direction of the pedestrian in the current frame image by using the first difference value comprises:
determining a first direction of the pedestrian in the current frame image by using the first difference value;
acquiring a global state variable, and if the first direction is the same as the global state variable, determining that the first direction is a pedestrian direction in the gateway gate;
and if the first direction is different from the global state variable, obtaining a marking parameter, and when the marking parameter is greater than a third preset threshold value, determining that the first direction is the pedestrian direction in the channel gate.
6. A pedestrian reverse judgment device of a channel gate is characterized in that light-emitting structures and image acquisition devices are symmetrically arranged on two sides of the channel gate; the light emitting structure is composed of a light emitting material or a light emitting device; the device comprises:
the current frame image acquisition module is used for acquiring a current frame image of the light-emitting structure through the image acquisition device;
the current pedestrian position coordinate determination module is used for determining the current pedestrian position coordinate in the current frame image;
the historical pedestrian position coordinate acquisition module is used for acquiring historical pedestrian position coordinates; the historical pedestrian position coordinates are pedestrian position coordinates in a previous frame image of the current frame image;
the first difference value calculation module is used for calculating a first difference value between the current pedestrian position coordinate and the historical pedestrian position coordinate;
the first pedestrian direction judging module is used for judging the pedestrian direction in the channel gate by adopting the first difference value;
and the reverse judging module is used for judging that the pedestrian direction is in the same direction as the preset direction, and otherwise, judging that the pedestrian direction is not reverse.
7. The apparatus of claim 6, wherein the current pedestrian location coordinate determination module comprises:
the edge detection submodule is used for carrying out edge detection on the current frame image to generate an edge detection image;
the occlusion length determining submodule is used for detecting an occlusion area in the edge detection image and determining the occlusion length of the occlusion area;
and the current pedestrian position coordinate determination submodule is used for determining the central point coordinate of the shielding area as the current pedestrian position coordinate when the shielding length meets a first preset threshold value.
8. The apparatus of claim 7, wherein the occlusion length determination submodule comprises:
a maximum bright point pixel row acquisition unit, configured to acquire a maximum bright point pixel row of the edge detection image;
the pixel black point detection unit is used for detecting pixel black points on the pixel row with the largest bright point to obtain a shielding area;
and the shielding length determining unit is used for counting the number of the pixel black points and determining the shielding length of the shielding area.
9. The apparatus of claim 7, further comprising:
a starting point coordinate determination module, configured to determine a starting point coordinate of the occlusion region when there is no historical pedestrian position coordinate;
and the second pedestrian direction judging module is used for calculating a second difference value between the starting point coordinate and a second preset threshold value, and judging the pedestrian direction in the current frame image by adopting the second difference value.
10. The apparatus of claim 6, wherein the first pedestrian direction determining module comprises:
the first direction determining submodule is used for determining the first direction of the pedestrian in the current frame image by adopting the first difference value;
the first pedestrian direction judgment submodule is used for acquiring a global state variable, and if the first direction is the same as the global state variable, the first direction is determined to be the pedestrian direction in the gateway gate;
and the second pedestrian direction judgment submodule is used for acquiring a marking parameter if the first direction is different from the global state variable, and determining that the first direction is the pedestrian direction in the gateway when the marking parameter is greater than a third preset threshold value.
CN202011329105.3A 2020-11-24 2020-11-24 Pedestrian reverse judgment method and device for channel gate Pending CN112446922A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011329105.3A CN112446922A (en) 2020-11-24 2020-11-24 Pedestrian reverse judgment method and device for channel gate

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011329105.3A CN112446922A (en) 2020-11-24 2020-11-24 Pedestrian reverse judgment method and device for channel gate

Publications (1)

Publication Number Publication Date
CN112446922A true CN112446922A (en) 2021-03-05

Family

ID=74737688

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011329105.3A Pending CN112446922A (en) 2020-11-24 2020-11-24 Pedestrian reverse judgment method and device for channel gate

Country Status (1)

Country Link
CN (1) CN112446922A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1932888A (en) * 2006-09-28 2007-03-21 广州市地下铁道总公司 Pedestrian passing identifying method and apparatus for gate type brake machine
CN101626493A (en) * 2009-08-06 2010-01-13 北京北大千方科技有限公司 Method for judging forward motion direction of pedestrian by combining laser scanning and videos
CN101644717A (en) * 2009-08-31 2010-02-10 北京大学 Pedestrian advancing direction judging method adopting laser scanning
WO2014082480A1 (en) * 2012-11-28 2014-06-05 中兴通讯股份有限公司 Method and device for calculating number of pedestrians and crowd movement directions
CN107818287A (en) * 2016-09-13 2018-03-20 株式会社日立制作所 A kind of passenger flow statistic device and system
CN109558815A (en) * 2018-11-16 2019-04-02 恒安嘉新(北京)科技股份公司 A kind of detection of real time multi-human face and tracking
CN110532852A (en) * 2019-07-09 2019-12-03 长沙理工大学 Subway station pedestrian's accident detection method based on deep learning
CN111191572A (en) * 2019-12-26 2020-05-22 恒大智慧科技有限公司 Gate door-passing behavior identification method and device and computer-readable storage medium
CN111310576A (en) * 2020-01-17 2020-06-19 厦门中控智慧信息技术有限公司 Channel target passing detection method, device and equipment
CN111654685A (en) * 2020-08-06 2020-09-11 成都极米科技股份有限公司 Moving direction detection method and device, projection equipment and readable storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1932888A (en) * 2006-09-28 2007-03-21 广州市地下铁道总公司 Pedestrian passing identifying method and apparatus for gate type brake machine
CN101626493A (en) * 2009-08-06 2010-01-13 北京北大千方科技有限公司 Method for judging forward motion direction of pedestrian by combining laser scanning and videos
CN101644717A (en) * 2009-08-31 2010-02-10 北京大学 Pedestrian advancing direction judging method adopting laser scanning
WO2014082480A1 (en) * 2012-11-28 2014-06-05 中兴通讯股份有限公司 Method and device for calculating number of pedestrians and crowd movement directions
CN107818287A (en) * 2016-09-13 2018-03-20 株式会社日立制作所 A kind of passenger flow statistic device and system
CN109558815A (en) * 2018-11-16 2019-04-02 恒安嘉新(北京)科技股份公司 A kind of detection of real time multi-human face and tracking
CN110532852A (en) * 2019-07-09 2019-12-03 长沙理工大学 Subway station pedestrian's accident detection method based on deep learning
CN111191572A (en) * 2019-12-26 2020-05-22 恒大智慧科技有限公司 Gate door-passing behavior identification method and device and computer-readable storage medium
CN111310576A (en) * 2020-01-17 2020-06-19 厦门中控智慧信息技术有限公司 Channel target passing detection method, device and equipment
CN111654685A (en) * 2020-08-06 2020-09-11 成都极米科技股份有限公司 Moving direction detection method and device, projection equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN104933710B (en) Based on the shop stream of people track intelligent analysis method under monitor video
CN101794385B (en) Multi-angle multi-target fast human face tracking method used in video sequence
Fuentes et al. People tracking in surveillance applications
CA2692424C (en) System and process for detecting, tracking and counting human objects of interest
US7394916B2 (en) Linking tracked objects that undergo temporary occlusion
US9245187B1 (en) System and method for robust motion detection
Cavallaro et al. Shadow-aware object-based video processing
Antić et al. K-means based segmentation for real-time zenithal people counting
CN105160297A (en) Masked man event automatic detection method based on skin color characteristics
WO2001084844A1 (en) System for tracking and monitoring multiple moving objects
CN110717400A (en) Passenger flow statistical method, device and system
Xu et al. Segmentation and tracking of multiple moving objects for intelligent video analysis
CN105678213A (en) Dual-mode masked man event automatic detection method based on video characteristic statistics
CN103577832B (en) A kind of based on the contextual people flow rate statistical method of space-time
Yu et al. A robust method for detecting and counting people
CN112287823A (en) Facial mask identification method based on video monitoring
CN101719280B (en) Method for detecting petty infrared target
Chen et al. Traffic congestion classification for nighttime surveillance videos
CN112446913B (en) Method, device and equipment for counting pedestrian number and judging trailing of passway gate
Russell et al. Vehicle detection based on color analysis
JPH08249471A (en) Moving picture processor
CN112446922A (en) Pedestrian reverse judgment method and device for channel gate
CN112530059B (en) Channel gate inner draw-bar box judgment method, device, equipment and storage medium
Kim et al. Robust lane detection for video-based navigation systems
Garg et al. Low complexity techniques for robust real-time traffic incident detection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination