CN108629230B - People counting method and device and elevator dispatching method and system - Google Patents

People counting method and device and elevator dispatching method and system Download PDF

Info

Publication number
CN108629230B
CN108629230B CN201710157587.0A CN201710157587A CN108629230B CN 108629230 B CN108629230 B CN 108629230B CN 201710157587 A CN201710157587 A CN 201710157587A CN 108629230 B CN108629230 B CN 108629230B
Authority
CN
China
Prior art keywords
target
people
human head
pixel
maximum value
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.)
Active
Application number
CN201710157587.0A
Other languages
Chinese (zh)
Other versions
CN108629230A (en
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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201710157587.0A priority Critical patent/CN108629230B/en
Publication of CN108629230A publication Critical patent/CN108629230A/en
Application granted granted Critical
Publication of CN108629230B publication Critical patent/CN108629230B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • G06V20/53Recognition of crowd images, e.g. recognition of crowd congestion
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B66HOISTING; LIFTING; HAULING
    • B66BELEVATORS; ESCALATORS OR MOVING WALKWAYS
    • B66B1/00Control systems of elevators in general
    • B66B1/24Control systems with regulation, i.e. with retroactive action, for influencing travelling speed, acceleration, or deceleration
    • B66B1/2408Control systems with regulation, i.e. with retroactive action, for influencing travelling speed, acceleration, or deceleration where the allocation of a call to an elevator car is of importance, i.e. by means of a supervisory or group controller
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B66HOISTING; LIFTING; HAULING
    • B66BELEVATORS; ESCALATORS OR MOVING WALKWAYS
    • B66B5/00Applications of checking, fault-correcting, or safety devices in elevators
    • B66B5/0006Monitoring devices or performance analysers
    • B66B5/0012Devices monitoring the users of the elevator system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B66HOISTING; LIFTING; HAULING
    • B66BELEVATORS; ESCALATORS OR MOVING WALKWAYS
    • B66B2201/00Aspects of control systems of elevators
    • B66B2201/20Details of the evaluation method for the allocation of a call to an elevator car
    • B66B2201/222Taking into account the number of passengers present in the elevator car to be allocated

Landscapes

  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the invention provides a people counting method and device and an elevator dispatching method and system, wherein the people counting method comprises the following steps: converting the three-dimensional data of the image shot by the stereoscopic vision camera into space three-dimensional information under a world coordinate system; projecting the image according to the height and width information in the three-dimensional information of the space to obtain a two-dimensional projection image; acquiring target pixel points with human body target characteristics in a two-dimensional projection image; carrying out connected region marking on target pixel points, and calculating to obtain a plurality of target maximum value points in a projection blob formed by the target pixel points with different marks; covering a circle with a preset radius by taking the target maximum value point as a circle center to obtain a plurality of candidate human head target areas; determining a confirmed head target in the candidate head target area; and counting the number of all confirmed head targets in the current frame, and determining the number of people in the image shot by the stereoscopic vision camera. The invention can improve the accuracy of people counting.

Description

People counting method and device and elevator dispatching method and system
Technical Field
The invention relates to the technical field of image processing, in particular to a people counting method and device and an elevator dispatching method and system.
Background
With the development of computer vision technology, the pedestrian detection technology based on the stereoscopic vision camera has higher reliability, convenience and low cost, and is gradually replacing the traditional infrared or contact type equipment and the like, so that the pedestrian detection technology is receiving more and more attention. In the management and decision-making of public activity areas such as shopping malls, shopping centers, airports, stations, etc., the number of people is indispensable data. Through the statistics of the number of people, the operation work of public activity areas can be effectively monitored and organized in real time, for example, the elevators in a shopping mall are cooperatively dispatched according to the number of people taking the elevators and the number of people waiting for the elevators.
The traditional people counting is realized by a machine learning method, the head outline information is obtained through the training learning process, a head detector is generated, the shot image is input into the head detector, and the head area is obtained through the contrast recognition of the outline information. However, the conventional people counting method only uses the contour information of the human head, and is easy to misjudge a round object similar to the shape of the human head, a human head shadow and the like in the image into a human head area.
In order to avoid mistakenly judging a round object, a human head shadow and the like similar to the human head in the shot image as a human head area, a people counting method is provided, the people counting method adopts two cameras to synchronously shoot the image, obtains a depth value in a corresponding depth image through the human head area detected in the shot image, compares the depth value with a preset depth threshold value of a real human head area, and judges whether the detected human head area is the real human head area or not according to a comparison result. The three-dimensional depth information is utilized to compare the depth value of the detected human head area with the set human head area depth threshold value, so that the possibility that a round object with the shape similar to the human head, a human head shadow and the like in the image are judged to be the human head area by mistake by only utilizing the outline information of the human head is reduced.
Because the people number density in public activity areas such as shopping malls, shopping centers, airports, stations and the like is large, targets are seriously shielded, and for such complex scenes, the existing people number counting method adopts a detector to detect the targets, and in the actual situation, even if people number counting is carried out by verifying real head areas through three-dimensional depth information, the problem that the one-to-one correspondence between original image targets and targets on a depth map is inaccurate still exists, so that the accuracy rate of people number counting is low.
Disclosure of Invention
The embodiment of the invention aims to provide a people counting method and device and an elevator dispatching method and system so as to improve the accuracy of people counting. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a people counting method, where the people counting method includes:
acquiring three-dimensional data of an image shot by a stereoscopic vision camera, and converting the three-dimensional data into space three-dimensional information under a world coordinate system;
projecting the image according to height information and width information in the spatial three-dimensional information to obtain a two-dimensional projection image;
acquiring target pixel points with human body target characteristics in the two-dimensional projection drawing;
carrying out connected region marking on the target pixel points, and calculating to obtain at least one target maximum value point in each projection block aiming at projection blocks formed by target pixel points marked by different connected regions;
covering a circle with a preset radius by taking the target maximum value point as a circle center for each projection block to obtain at least one candidate human head target area;
when two candidate human head target areas cover the same target maximum value point and the proportion of the pixel point number of a circumscribed polygon area formed by the same target maximum value point to the total pixel point number of the two candidate human head target areas is larger than a preset proportion threshold value, determining the two candidate human head target areas as the same confirmed human head target;
and counting the number of all confirmed head targets in the current frame, and determining the number of people in the image shot by the stereoscopic vision camera.
In a second aspect, an embodiment of the present invention provides an elevator dispatching method, where the elevator dispatching method includes:
acquiring three-dimensional data of images in a waiting hall shot by a stereoscopic vision camera, and converting the three-dimensional data into spatial three-dimensional information under a world coordinate system;
projecting the image according to height information and width information in the spatial three-dimensional information to obtain a two-dimensional projection image;
acquiring target pixel points with human body target characteristics in the two-dimensional projection drawing;
carrying out connected region marking on the target pixel points, and calculating to obtain at least one target maximum value point in each projection block aiming at projection blocks formed by target pixel points marked by different connected regions;
covering a circle with a preset radius by taking the target maximum value point as a circle center for each projection block to obtain at least one candidate human head target area;
when two candidate human head target areas cover the same target maximum value point and the proportion of the pixel point number of a circumscribed polygon area formed by the same target maximum value point to the total pixel point number of the two candidate human head target areas is larger than a preset proportion threshold value, determining the two candidate human head target areas as the same confirmed human head target;
counting the number of all confirmed head targets in the current frame, and determining the number of people in the elevator waiting hall;
acquiring the number of people in an elevator car and the space occupancy rate of the elevator car;
and dispatching the elevator cars with the number of people not full and the space not full to the floors where the elevator waiting hall with the number of people more than 0 is located according to the number of people in the elevator waiting hall, the number of people in the elevator cars and the space occupancy rate of the elevator cars.
In a third aspect, an embodiment of the present invention provides a people counting apparatus, including:
the first acquisition module is used for acquiring three-dimensional data of an image shot by the stereoscopic vision camera and converting the three-dimensional data into space three-dimensional information under a world coordinate system;
the projection drawing determining module is used for projecting the image according to the height information and the width information in the three-dimensional space information to obtain a two-dimensional projection drawing;
the second acquisition module is used for acquiring target pixel points with human body target characteristics in the two-dimensional projection image;
the calculation module is used for marking the connected regions of the target pixel points and calculating at least one target maximum value point in each projection block aiming at the projection blocks formed by the target pixel points marked by different connected regions;
the target area determining module is used for covering a circle with a target maximum value point as a circle center and a preset radius aiming at each projection block to obtain at least one candidate human head target area;
the confirming human head target determining module is used for determining that the two candidate human head target areas are the same confirming human head target when the two candidate human head target areas cover the same target maximum value point and the proportion of the pixel number of a circumscribed polygon area formed by the same target maximum value point to the total pixel number of the two candidate human head target areas is greater than a preset proportion threshold value;
and the people counting module is used for counting the number of all confirmed head targets in the current frame and determining the number of people in the image shot by the stereoscopic vision camera.
In a fourth aspect, an embodiment of the present invention provides an elevator dispatching system, including:
the stereoscopic vision camera is used for shooting scene images in the elevator waiting hall;
the device comprises a counting device for the number of people in the elevator car and the duty ratio, wherein the counting device is used for obtaining the number of people in the elevator car and the space occupancy rate of the elevator car through shooting;
the elevator dispatching controller is used for acquiring three-dimensional data of images in the elevator waiting hall, which are obtained by shooting through the stereoscopic vision camera, and converting the three-dimensional data into space three-dimensional information under a world coordinate system; projecting the image according to height information and width information in the spatial three-dimensional information to obtain a two-dimensional projection image; acquiring target pixel points with human body target characteristics in the two-dimensional projection drawing; carrying out connected region marking on the target pixel points, and calculating to obtain at least one target maximum value point in each projection block aiming at projection blocks formed by target pixel points marked by different connected regions; covering a circle with a preset radius by taking the target maximum value point as a circle center for each projection block to obtain at least one candidate human head target area; when two candidate human head target areas cover the same target maximum value point and the proportion of the pixel point number of a circumscribed polygon area formed by the same target maximum value point to the total pixel point number of the two candidate human head target areas is larger than a preset proportion threshold value, determining the two candidate human head target areas as the same confirmed human head target; counting the number of all confirmed head targets in the current frame, and determining the number of people in the elevator waiting hall; acquiring the number of people in an elevator car and the space occupancy rate of the elevator car; and dispatching the elevator cars with the number of people not full and the space not full to the floors where the elevator waiting hall with the number of people more than 0 is located according to the number of people in the elevator waiting hall, the number of people in the elevator cars and the space occupancy rate of the elevator cars.
The embodiment of the invention provides a people counting method and device and an elevator dispatching method and system, which are used for converting three-dimensional data of a shot image, projecting spatial three-dimensional information under a world coordinate system obtained after conversion, primarily selecting a people target area by using a maximum value characteristic on a two-dimensional projection image, determining a real people target by adopting correlation matching of front and rear frames, determining a target position by using the spatial three-dimensional information and time dimension information of the front and rear frames, accurately acquiring the height of a person when the position of the person is too far away from a camera or is partially shielded, further obtaining the projection image, determining the real people target by using the time dimension, and realizing high people counting accuracy under a complex scene with high people density and serious shielding.
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, 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 the drawings without creative efforts.
FIG. 1 is a first flowchart of a people counting method according to an embodiment of the invention;
FIG. 2 is a second flowchart of a people counting method according to an embodiment of the invention;
FIG. 3 is a third flowchart of a people counting method according to an embodiment of the invention;
FIG. 4 is a fourth flowchart illustrating a people counting method according to an embodiment of the invention;
fig. 5 is a schematic flow chart of an elevator dispatching method of an embodiment of the invention;
FIG. 6 is a schematic flow chart of target verification screening according to an embodiment of the present invention;
fig. 7 is a flow chart of elevator dispatching based on people counting in an embodiment of the invention;
FIG. 8 is a first structural diagram of an apparatus for counting people according to an embodiment of the present invention;
FIG. 9 is a second structural diagram of the people counting device according to the embodiment of the invention;
FIG. 10 is a schematic diagram of a third structure of the people counting device according to the embodiment of the invention;
FIG. 11 is a diagram illustrating a fourth exemplary configuration of an apparatus for people counting according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of an elevator dispatching device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments 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.
In order to improve the accuracy of people counting, the embodiment of the invention provides a people counting method and device and an elevator dispatching method and system.
First, a method for counting people according to an embodiment of the present invention will be described.
It should be noted that the main body of the implementation of the people counting method provided by the embodiment of the present invention may be a control device, and the control device may receive a three-dimensional image captured by a stereoscopic camera, and the three-dimensional image is processed by a chip such as a DSP (Digital Signal Processor), an ARM (Advanced reduced instruction Set Computer machine) or an FPGA (Field Programmable Gate Array), so as to count the number of people in the captured image. Of course, the implementation subject of the people counting method provided by the embodiment of the invention can also be a stereoscopic vision camera integrated with a control unit or a control chip with the above functions. It should be emphasized that the stereoscopic camera is a camera that can obtain three-dimensional information of the object, such as a binocular camera, a TOF (Time of Flight) camera, and is not limited herein. The manner of implementing the people counting method provided by the embodiment of the invention may be software, hardware circuit and/or logic circuit arranged in the execution main body.
In the scenes such as building elevator dispatching and the like, reasonable dispatching of elevators can effectively improve the running efficiency of the whole elevator group of a building, and in order to achieve the aim and the automation degree of elevator dispatching, people counting with high accuracy is needed. It should be noted that the application scenarios of the embodiment of the present invention include, but are not limited to, public activity areas such as an elevator waiting hall with a large number of people and a serious object occlusion, and are not limited to this.
As shown in fig. 1, a people counting method provided by an embodiment of the invention may include the following steps:
s101, three-dimensional data of an image shot by the stereoscopic vision camera is obtained, and the three-dimensional data is converted into space three-dimensional information under a world coordinate system.
The stereoscopic vision camera is a camera capable of obtaining three-dimensional information of a target, and the current commonly used stereoscopic vision cameras include a binocular camera and a camera based on a Time of Flight (TOF) technology. The three-dimensional data of the image shot by the stereoscopic vision camera is the three-dimensional data in the coordinate system of the stereoscopic vision camera, and the three-dimensional data can be converted into space three-dimensional information in the world coordinate system through external parameters of the stereoscopic vision camera, namely the three-dimensional information in the three-dimensional space with the ground plane as the horizontal plane, so that the actual height of each pixel point in the world coordinate system can be reflected. The technology of converting three-dimensional data into spatial three-dimensional information belongs to the prior art, and is not described herein again. It should be noted that, the image captured by the two-dimensional camera cannot obtain the specific three-dimensional structural information of the captured object, or the accuracy of the obtained spatial structural information is extremely low. Thus, embodiments of the present invention require the use of stereoscopic cameras.
And S102, projecting the image according to the height information and the width information in the three-dimensional space information to obtain a two-dimensional projection image.
The spatial three-dimensional information specifically includes height information of the target, width information of the target, and depth information of the target, where the height information of the target is an actual height of the target, and for example, if the height of the human target is 1.8m, the height information of the target is 1.8 m. The shot image is projected to a plane vertical to a horizontal plane, so that a two-dimensional projection graph capable of showing the height and the width of a target can be obtained, wherein the projection height is generally limited within a preset height range, for example, considering that the target higher than an elevator door cannot enter an elevator, and the target with too low height is often caused by the ground and noise together, so that the preset height range is set within a human body height range lower than the elevator door in elevator dispatching, and under the normal condition, the stereoscopic vision camera frame is set at a position 3m to 3.5m higher than the horizontal plane. In addition, the two-dimensional projection map can be constructed on any plane according to the height information and the width information of the target, and the two-dimensional projection map can reflect the height and the width of the target.
It should be emphasized that the abscissa of the two-dimensional projection graph is the width of the target, the ordinate is the height of the target, and the height value of the highest point in the vertical direction is selected at the same position of the two-dimensional projection graph. A scaling relationship exists between the spatial three-dimensional information and the two-dimensional projection drawing, and the real distance represented by one pixel point in the two-dimensional projection drawing is represented, for example, the actual height of a target is 1.8m, the height of the target in the two-dimensional projection drawing accounts for 9 pixel points, and then the real distance represented by each pixel point is 20 cm.
Optionally, after step S102, the people counting method may further include:
and reducing the height value of the non-human body target area in the two-dimensional projection image at a preset speed through non-target background pixel suppression processing to obtain the two-dimensional projection image after the non-target background pixels are suppressed.
It should be noted that, because articles such as flowerpots and garbage bins are usually placed in the area shot by the stereoscopic vision camera, in order to avoid detecting these articles as human targets, such object targets can be determined as non-target backgrounds according to the feature that the positions of the object targets are fixed for a long time, and the height values of the projection drawings corresponding to the non-human target areas are reduced at a preset rate, so as to realize the function of suppressing the pixels of the non-target backgrounds. For example, for the above object target, the height value of the non-human target region projection view may be reduced at a rate of one pixel point height reduction every 2 seconds.
S103, acquiring target pixel points with human body target characteristics in the two-dimensional projection image.
It should be noted that, the two-dimensional projection drawing includes a plurality of pixel points, and each pixel point can embody different target characteristics, and since this embodiment needs to count the number of people, it needs to obtain the pixel point with human target characteristics in the two-dimensional projection drawing, wherein, the human target characteristics can include: human height, human area, human aspect ratio, human circularity and the like.
And S104, carrying out connected region marking on the target pixel points, and calculating to obtain at least one target maximum value point in each projection block aiming at the projection blocks formed by the target pixel points marked by different connected regions.
The connected region mark means that an image is scanned row by row and column by column, and the same connected mark is given to pixels belonging to the same connected region, thereby realizing connected identification. From a dot matrix image consisting of only "1" pixels (foreground points) and "0" pixels (background points), the adjacent "1" pixels are combined into a region, each connected region is described by boundary information, and each pixel point in the same connected region is adjacent to each other, so that all the pixel points in one connected region can form a projection blob. For each projection blob to be processed separately, the processing mainly takes the following two aspects into consideration: firstly, excluding some noise areas according to the attributes such as the size of a projection block mass; secondly, since the same human head should be a continuous projection blob on the image, it is necessary to ensure that the human head extraction is performed in the same projection blob. Because the shooting performance of the cameras has certain difference, some cameras can shoot images with clear edges, and some cameras can shoot images with unclear edges; for an image with clear edges, the image can be directly analyzed to obtain a target maximum value point, and for an image with unclear edges, the target maximum value point can be obtained only by performing certain processing on the edges and performing gray expansion on the image. In order to reduce the process of image analysis, the edges of the image can be processed no matter whether the image is clear or not, and the target maximum value point is obtained through the processing of gray scale expansion.
Optionally, step S104 may include:
firstly, according to a preset value, expanding projection blobs formed by target pixel points marked in different connected regions to obtain a maximum value to-be-searched region of each projection blob.
It should be noted that, the processing of the projection blobs is performed, first, distance conversion is performed on each projection blob, and an inner region of a preset distance at the edge of the projection blob is used as a maximum value region to be searched, in other words, the edge of the projection blob is properly enlarged, that is, the area of the projection blob is enlarged, so as to ensure that the human head target is in the enlarged region, thereby facilitating the identification of the human head target in the subsequent steps.
And secondly, performing gray expansion on all the maximum value areas to be searched to obtain an expansion result of each maximum value area to be searched.
And the pixel value of the characteristic pixel point in the expansion result is equal to the pixel value of the corresponding pixel point before the gray scale expansion. It should be noted that, the preset radius is adopted to perform gray scale expansion on the two-dimensional projection image in the area to be searched for the maximum value, so as to obtain an expanded result, the gray scale expansion process is to process the gray scale of the original image, so that the structural elements are all positive values, the output image tends to be brighter than the input original image, and the dark details in the original image are all eliminated or reduced, depending on the value and the shape of the structural element used for expansion. And through gray scale expansion, the pixel values of some characteristics of the human head, such as human height, human area, human aspect ratio, human circularity and the like, are not changed. The preset radius can be obtained by scaling the real human head radius according to the scaling of the two-dimensional projection diagram.
And thirdly, comparing the pixel value of each pixel point in each expansion result with the pixel value of the corresponding pixel point in the corresponding projection block, and determining the pixel points with the same pixel value as the candidate maximum value point.
And then, aiming at each projection block, comparing the position deviation and the height difference of each candidate maximum value point in the current frame of the two-dimensional projection image and the corresponding pixel point in the previous frame of the current frame.
It should be noted that, because the target does not have a large-scale violent movement in a scene such as an elevator waiting hall, and the height does not usually change violently, based on the prior, the human head position offset and the height difference of two adjacent frames (i.e. the current frame and the frame before the current frame) are used for verification for each candidate maximum value point.
And finally, determining the candidate maximum value point with the position deviation smaller than the preset displacement and the height difference smaller than the preset height difference threshold value as the target maximum value point.
It should be noted that when the head position offset and the height difference of the current frame and the previous frame of the current frame are verified, the candidate maximum value point satisfying the condition that the position offset is smaller than the preset displacement and the height difference is smaller than the preset height difference threshold value can be determined as the target maximum value point. Wherein the preset displacement and the preset height difference threshold are typically very small values, e.g. 5 cm.
And S105, covering a circle with a target maximum value point as a circle center and a preset radius aiming at each projection block to obtain at least one candidate human head target area.
It should be noted that the target maximum point is often a feature point in the human head target, the target maximum point may be used as a circle center, and a circle with a preset radius covers the projection blob.
Optionally, step S105 may include:
firstly, aiming at each projection block, taking any target maximum value point as a circle center, and obtaining the area of a target area covered by a preset radius in a current frame.
And secondly, when the difference value between the area of the target area and the area corresponding to the previous frame is smaller than a preset area difference threshold value, determining the target area as a candidate head target area.
It should be noted that, in each projection blob, since a plurality of target maximum points are included, a plurality of target regions can be obtained with each target maximum point as a center of a circle, and a target region having a large difference from the area of the corresponding region of the previous frame may exist in the plurality of target regions of the current frame, it is necessary to compare the target region of the current frame with the corresponding region of the previous frame, and when the area difference is smaller than a preset area difference threshold, the target region can be determined to be a candidate human head target region. Wherein the predetermined area difference threshold is typically a small value, e.g. 5cm2
S106, when the two candidate human head target areas cover the same target maximum value point and the proportion of the pixel point number of the circumscribed polygon area formed by the same target maximum value point to the total pixel point number of the two candidate human head target areas is larger than a preset proportion threshold value, determining the two candidate human head target areas as the same confirmed human head target.
It should be noted that one candidate human head target area may cover a plurality of target maximum points, and two adjacent candidate human head target areas may cover a plurality of same target maximum points, when the repetition rate of the target maximum points covered by the two candidate human head target areas is high, and the ratio of the number of pixels in the circumscribed polygon area formed by the same target maximum points to the total number of pixels in the two candidate human head target areas is greater than the preset ratio threshold, the two candidate human head target areas may be considered as the same confirmed human head target, where the circumscribed polygon may be a circumscribed triangle, a circumscribed rectangle, a circumscribed diamond, a circumscribed hexagon, and the like.
And S107, counting the number of all confirmed head targets in the current frame, and determining the number of people in the image shot by the stereoscopic vision camera.
All confirmed head targets can be obtained through the steps, the number of the confirmed head targets can be obtained through statistics, and the number can be recorded as the number N of people in the image shot by the stereoscopic vision camerap
By applying the embodiment, the three-dimensional data of the shot image is converted, the space three-dimensional information under the world coordinate system obtained after conversion is projected, the maximum value characteristic on the two-dimensional projection image is used for preliminarily selecting the human head target area, the real human head target is determined by adopting the correlation matching of the front frame and the rear frame, the target position is determined by utilizing the space three-dimensional information and the time dimension information of the front frame and the rear frame, when the position of a person is too far away from the camera or is partially shielded, the height of the person can still be accurately obtained, the projection image is further obtained, the real human head target is determined by the time dimension, and the people counting has high accuracy under the complex scene with high people number density and serious shielding.
As shown in fig. 2, based on the embodiment shown in fig. 1, the method for counting people according to this embodiment may further include, after step S102:
s201, performing smooth filtering processing on the two-dimensional projection graph to obtain the two-dimensional projection graph with the abnormal pixel values removed.
It should be noted that, because of the influence of image distortion, image matching error, and the like, the two-dimensional projection image pixel has large noise, and the two-dimensional projection image obtained by projection needs to be subjected to smooth filtering processing, where the adopted filtering method may be a mean filtering method or a median filtering method, that is, a template is adopted to solve a mean value or a median value for a pixel point of the two-dimensional projection image, so as to achieve the purpose of removing an abnormal pixel value of the two-dimensional projection image.
Optionally, after step S201, the people counting method may further include:
and reducing the height value of the non-human head target area in the two-dimensional projection image after the abnormal pixel value is removed at a preset rate through non-target background pixel suppression processing to obtain the two-dimensional projection image after the non-target background pixel suppression.
It should be noted that, because articles such as flowerpots and garbage bins are usually placed in the area shot by the stereoscopic vision camera, in order to avoid detecting these articles as human targets, such object targets can be determined as non-target backgrounds according to the feature that the positions of the object targets are fixed for a long time, and the height values of the projection drawings corresponding to the non-human target areas are reduced at a preset rate, so as to realize the function of suppressing the pixels of the non-target backgrounds. For example, for the above object target, the height value of the non-human target region projection view may be reduced at a rate of one pixel point height reduction every 2 seconds.
It should be emphasized that S101 to S107 in this embodiment are the same as those in the embodiment shown in fig. 1, and are not described again.
By applying the embodiment, the three-dimensional data of the shot image is converted, the space three-dimensional information under the world coordinate system obtained after conversion is projected, the maximum value characteristic on the two-dimensional projection image is used for preliminarily selecting the human head target area, the real human head target is determined by adopting the correlation matching of the front frame and the rear frame, the target position is determined by utilizing the space three-dimensional information and the time dimension information of the front frame and the rear frame, when the position of a person is too far away from the camera or is partially shielded, the height of the person can still be accurately obtained, the projection image is further obtained, the real human head target is determined by the time dimension, and people counting has high accuracy under the complex scene with high people number density and serious shielding; and the noise interference and the background interference are filtered out from the obtained two-dimensional projection image through smooth filtering processing.
As shown in fig. 3, based on the embodiment shown in fig. 1, the method for counting people according to the present embodiment may further include, after step S106:
s301, obtaining and determining the pseudo human head target in the two-dimensional projection drawing according to the characteristic parameters of each confirmed human head target in the two-dimensional projection drawing.
Wherein, the characteristic parameters may include: contour feature parameters and texture feature parameters. After the confirmation human head target is obtained, there is a possibility that the confirmation human head target includes a small number of false detections, and therefore, in order to improve the accuracy of the population statistics, it is necessary to further verify the detected confirmation human head target and screen out a small number of false detections. The target verification of the part consists of two parts, namely inter-frame target association and target cross-verification. The inter-frame target association is based on the information of distance, area, height and the like between targets, the mutual association of targets detected by two frames before and after the current frame and the previous frame of the image sequence is realized, the comparison processing is carried out, partial false detection is screened out, and the number of the targets detected by the false detection can be recorded as Ns. The target cross validation mainly aims at the problem that a two-dimensional projection graph of a corresponding region has a large error due to the fact that matching errors of a non-texture region in an original image shot by a stereoscopic vision camera do not exist, a detected target is back projected to the original image shot by the stereoscopic vision camera, texture characteristic parameters such as brightness, contrast and energy value of the corresponding target region are calculated, a target with weak texture characteristics is screened, the number of the target with weak texture characteristics can be recorded as Nw
Optionally, step S301 may include:
firstly, acquiring and according to the contour characteristic parameters of each confirmed head target in the two-dimensional projection image, judging whether the region of the confirmed head target in the current frame of the two-dimensional projection image is matched with the region corresponding to the previous frame of the current frame.
The contour feature parameters may include: area, height and distance. It should be noted that, for inter-frame target association, since the contour features of the confirmed head targets of the current frame and the previous frame, such as the area, the height, and the distance, are compared, contour feature parameters of the confirmed head targets need to be obtained, and in the comparison process, if the change of the area, the height, or the distance is too large, it is considered that the confirmed head targets of the current frame and the previous frame are not matched, for example, if a person holds an umbrella in a region photographed by a stereoscopic camera, the umbrella may be identified as the confirmed head target in the above process, but a person puts down the umbrella at a certain moment, a sudden change in height occurs between two previous frames in the region where the umbrella is located, so that the region of the current frame is obtained and the region corresponding to the previous frame are not matched. If there is a match, the matching region can be considered to be a true human head target.
And secondly, if the two-dimensional projection image is not matched with the human head target, executing a step of judging whether the region where the human head target is confirmed in the previous frame of the current frame of the two-dimensional projection image is matched with the region corresponding to the next previous frame of the current frame, and determining that the confirmed human head target is the pseudo human head target until the number of mismatching reaches a preset number threshold.
It should be noted that if the areas of the confirmed head targets of the current frame and the previous frame do not match, the confirmed head target may be a dummy head target, but the determination may be made only through multi-feature comprehensive evaluation, so that the confirmed head target may be determined as the dummy head target by performing comparison processing on the previous frame and the previous frame until the number of mismatches reaches a preset number threshold.
Optionally, step S301 may further include:
firstly, back projecting the confirmed head target to an original gray image of an image shot by a stereoscopic vision camera to obtain a back-projected gray image;
it should be noted that, for the target cross validation, the target cross validation mainly aims at the problem that the two-dimensional projection map of the corresponding region has a large error due to matching errors of non-texture regions in the original image captured by the stereoscopic vision camera. The resulting confirmed head object needs to be back projected to the original grayscale image of the image captured by the stereoscopic camera.
And secondly, acquiring a target pixel area in the gray-scale image after the back projection.
And finally, calculating texture characteristic parameters of the target pixel region, and determining the weak texture target region smaller than a preset parameter threshold value in the texture characteristic parameters as a pseudo human head target.
The texture feature parameters include brightness, contrast and energy values of the target pixel region, and it should be noted that the weak texture target region smaller than a preset parameter threshold in the texture feature parameters is screened by calculating the texture feature parameters of the target pixel region, and the weak texture target region is determined as a pseudo human head target.
It should be emphasized that the inter-frame target association and target cross validation processes may be executed in parallel or in series, but of course, the inter-frame target association process and the target cross validation process may be alternatively executed under the condition that the imaging accuracy is guaranteed.
S302, counting the number of all the dummy head targets.
It should be noted that, because the dummy head targets obtained through the target verification screening are targets for confirming false detection in the head targets, statistics needs to be performed on the number of the dummy head targets, where the dummy head targets include dummy head targets obtained through inter-frame target association and/or target cross-validation.
Optionally, step S107 may include:
firstly, the number of all confirmed head targets in the current frame is counted.
And secondly, determining the difference value between the number of all confirmed head targets and the number of all false head targets in the current frame as the number of people in the image shot by the stereoscopic vision camera.
It should be noted that the number N of confirmed head targets is obtained by statisticspNumber of false detected targets N obtained by inter-frame target associationsThe number N of objects with weak texture features obtained by object cross validationwThen the number of false head targets is Ns+NwThus, stereoscopic vision is takenThe number of people N in the image obtained by camera shootingo=Np-(Ns+Nw)。
It should be emphasized that S101 to S107 in this embodiment are the same as those in the embodiment shown in fig. 1, and are not described again.
By applying the embodiment, the three-dimensional data of the shot image is converted, the space three-dimensional information under the world coordinate system obtained after conversion is projected, the maximum value characteristic on the two-dimensional projection image is used for preliminarily selecting the human head target area, the real human head target is determined by adopting the correlation matching of the front frame and the rear frame, the target position is determined by utilizing the space three-dimensional information and the time dimension information of the front frame and the rear frame, when the position of a person is too far away from the camera or is partially shielded, the height of the person can still be accurately obtained, the projection image is further obtained, the real human head target is determined by the time dimension, and people counting has high accuracy under the complex scene with high people number density and serious shielding; and through inter-frame target association and target cross validation, subtracting the pseudo-human head target from the obtained confirmed human head target to obtain the people number statistics with higher accuracy.
It is understood that, in another embodiment of the present invention, based on the embodiment shown in fig. 1, S201 of the embodiment shown in fig. 2 and S301 and S302 of the embodiment shown in fig. 3 may be included at the same time. And will not be described in detail herein.
As shown in fig. 4, based on the embodiment shown in fig. 1, the method for counting people according to this embodiment may further include, after step S107:
s401, the confirmed human head target in the two-dimensional projection image corresponding to the images shot by the multiple stereoscopic vision cameras and the overlapped area shot by every two stereoscopic vision cameras are obtained.
It should be noted that, for the shooting area of the stereoscopic vision camera with a large area, the field of view of a single stereoscopic vision camera cannot cover the whole area to be detected, and then the multi-camera linkage strategy is adopted in this embodiment to reasonably divide the whole shooting area into at least two areas.
S402, determining a coincidence coefficient according to the distance from the confirmed human head target to the boundary of the coincidence region in the coincidence region.
The coincidence coefficient is any value from 0 to 1, and is inversely proportional to the distance from the confirmed human head target to the boundary of the coincidence area. It should be noted that the overlapped area shot by the two stereoscopic cameras is often a rectangular area, the width of the rectangular area is slightly wider than the width of the human body, and the boundary of the overlapped area may be any boundary of the overlapped area. It is emphasized that the boundaries of two overlapping regions are the same boundary; the coincidence coefficient is inversely proportional to the distance from the confirmed head target in the coincidence region to the boundary of the coincidence region, that is, if the confirmed head target in the coincidence region is farther from the boundary, the coincidence coefficient is smaller; the larger the coincidence coefficient is if the confirmed head target in the coincidence region is closer to the boundary.
And S403, calculating the total number of people shot by the plurality of stereoscopic cameras according to the number of people in the images shot by each stereoscopic camera, the overlapping coefficient and the number of confirmed head targets in the overlapping area.
Since the number of persons shot by two adjacent stereoscopic cameras overlaps, the total number of persons can be obtained by counting the number of confirmed head targets in the overlapping area and the overlapping coefficient. In particular, it can be according to formula No=∑i(Noi-∑jwkjNkj) Obtaining the total number of people shot by a plurality of stereoscopic vision cameras, wherein NoI is the total number of stereo vision cameras, NoiJ is the jth stereoscopic camera having an overlapping region with the region captured by the ith stereoscopic camera, wkjDetermining the coincidence coefficient of the head object for the distance boundary k in the coincidence region of the jth and ith stereo cameras, NkjThe number of head targets is determined for the distance boundary k in the overlapping area of the jth stereoscopic camera and the ith stereoscopic camera.
By applying the embodiment, the three-dimensional data of the shot image is converted, the space three-dimensional information under the world coordinate system obtained after conversion is projected, the maximum value characteristic on the two-dimensional projection image is used for preliminarily selecting the human head target area, the real human head target is determined by adopting the correlation matching of the front frame and the rear frame, the target position is determined by utilizing the space three-dimensional information and the time dimension information of the front frame and the rear frame, when the position of a person is too far away from the camera or is partially shielded, the height of the person can still be accurately obtained, the projection image is further obtained, the real human head target is determined by the time dimension, and people counting has high accuracy under the complex scene with high people number density and serious shielding; through the linkage of multiple cameras, the area division is carried out to the large tracts of land and is detected the region, and different cameras are responsible for counting different regional numbers and splice and gather, realize that the large tracts of land detects the regional real-time number statistics of detecting.
It is understood that, in another embodiment of the present invention, based on the embodiment shown in fig. 1, S201 of the embodiment shown in fig. 2 and S401 of the embodiment shown in fig. 4 may be included at the same time; in another embodiment of the present invention, based on the embodiment shown in fig. 1, S301 and S302 of the embodiment shown in fig. 3 and S401 of the embodiment shown in fig. 4 may be included at the same time; in another embodiment of the present invention, based on the embodiment shown in fig. 1, S201 of the embodiment shown in fig. 2, S301 and S302 of the embodiment shown in fig. 3, and S401 of the embodiment shown in fig. 4 may be included at the same time. And will not be described in detail herein.
As shown in fig. 5, based on the people counting method as shown in fig. 1, the elevator dispatching method provided by the embodiment of the invention may include the following steps after S107:
s501, the number of people in the elevator car and the space occupancy rate of the elevator car are obtained.
It should be noted that, in order to ensure reliable, efficient, comfortable and fast operation of the elevator, the number of people waiting for the elevator in the waiting hall, the number of people in the elevator car and the space occupancy rate in the elevator car need to be obtained through the stereoscopic vision camera shooting, and when the number of people in the elevator car is too many, namely the elevator car is full of people, the elevator does not stop; when the space occupancy of the elevator car is too great, i.e. the space of the elevator car is full, the elevator does not stop.
It can be understood that the number of people in the elevator car and the space occupancy rate of the elevator car can be obtained by collecting and analyzing the number of people in the elevator car and the duty ratio statistical equipment in the elevator car and transmitting the number of people and the duty ratio statistical equipment to the execution main body of the embodiment through an interface of the equipment, wherein the number of people in the elevator car and the duty ratio statistical equipment can be a stereoscopic vision video camera installed in the car and have a certain image analysis function, and of course, the number of people in the elevator car and the duty ratio statistical equipment can also be equipment consisting of a common camera and a control module with an image analysis unit, which belong to the protection scope of the embodiment.
Specifically, in the present embodiment, the number of people in the elevator car can be obtained by the flow statistics of the above-described people counting method, or the existing people counting method can be used. It should be noted that, because the space of the elevator car is small, generally 2m × 2m, which is only one fifth or less of the area of the elevator waiting hall, and is a closed space, and the elevator car usually does not contain a complicated non-human body target, a relatively simple and easy-to-implement head and shoulder feature detection technology can be selected, whether the head and shoulder feature frame of the target meets the triggering condition of people counting can be determined, and then the head and shoulder feature frame meeting the condition can be used for people counting. In this embodiment, the space occupancy of the elevator car is calculated by taking the car space area as a reference, and the statistics device for the number of people in the elevator car and the duty ratio obtains the space occupancy of the elevator car according to the proportion of the total area of the projection of the shot human target on the ground plane of the elevator car to the actual area of the ground plane of the elevator car, for example, if a person in the elevator car drags a big box, p is (a + b)/s is 100%, where p is the space occupancy of the elevator car, a is the area of the projection of the person on the ground plane of the elevator car, b is the area of the projection of the big box on the ground plane of the elevator car, and s is the total area of the ground plane of the elevator car, therefore, the method for obtaining the space occupancy of the elevator car first obtains the area of the projection of the target on the ground plane of the elevator car and the total, and then the space occupancy rate is obtained through calculation, wherein the projection area of the target on the ground plane of the elevator car and the total area of the ground plane of the elevator car can be obtained by using any one of the prior arts, and the details are not repeated.
And S502, dispatching the elevator cars with the number of people not full and the space not full to the floor where the elevator waiting hall with the number of people more than 0 is located according to the number of people in the elevator waiting hall, the number of people in the elevator cars and the space occupancy rate of the elevator cars.
In the case where there is an elevator that is not full in the hall where people are waiting for the elevator, the elevator needs to be dispatched to the floor where the hall is located, and an elevator with the smallest number of people or the largest remaining space can be dispatched with priority in order to improve the utilization efficiency of the elevator.
Optionally, step S502 may include:
when the number of people in the elevator waiting hall is more than 0 and less than the nuclear load number of the elevator cars, dispatching the elevator car with the least number of people in the elevator cars with less number of people to the floor where the elevator waiting hall is located, or dispatching the elevator car with the largest remaining space in the elevator cars with less space to the floor where the elevator waiting hall is located;
when the number of people in the elevator waiting hall is larger than the number of nuclear people of the elevator cars, the elevator cars with the number of people not full and the space not full are dispatched to the floor where the elevator waiting hall is located.
When the number of people in the elevator waiting hall is greater than the number of nuclear people in the elevator cars, it is necessary to dispatch a plurality of elevator cars to the floor where the elevator waiting hall is located if one elevator cannot take all waiting people, and the elevator car with the least number of people or the largest remaining space is also dispatched preferentially.
By applying the embodiment, the three-dimensional data of the shot image is converted, the space three-dimensional information under the world coordinate system obtained after conversion is projected, the maximum value characteristic on the two-dimensional projection image is used for preliminarily selecting the human head target area, the real human head target is determined by adopting the correlation matching of the front frame and the rear frame, the target position is determined by utilizing the space three-dimensional information and the time dimension information of the front frame and the rear frame, when the position of a person is too far away from the camera or is partially shielded, the height of the person can still be accurately obtained, the projection image is further obtained, the real human head target is determined by the time dimension, and the people counting has high accuracy under the complex scene with high people number density and serious shielding; and the number of people waiting for the elevator in the current elevator waiting hall is output, elevator passenger flow information such as the number of people in the current elevator car, the space occupation ratio and the like is combined, and an elevator dispatching principle based on elevator taking number detection is applied, so that the purposes of reasonably dispatching the elevator and efficiently operating the elevator are achieved.
It should be noted that the elevator dispatching method in the embodiment of the invention is based on the people counting method, and all the embodiments of the people counting method are applicable to the elevator dispatching method and can achieve the same or similar beneficial effects.
The people counting method provided by the embodiment of the invention is introduced below by taking elevator dispatching as a specific application example.
At present, the door height of the elevator is usually 2m, 2.1m, 2.2m, 2.4m or 2.8m, so that the stereoscopic camera can be arranged at a position 3m higher from the ground level. The stereoscopic vision camera obtains three-dimensional information of an image of the current elevator waiting hall through shooting, the three-dimensional information is converted into space three-dimensional information through external parameters of the stereoscopic vision camera, and height information, width information and depth information of a target in the current elevator waiting hall are obtained. The control equipment projects the spatial three-dimensional information onto a plane vertical to a horizontal plane through projection to obtain a two-dimensional projection image, removes fixed backgrounds such as flowerpots and garbage cans through non-target background pixel suppression treatment on non-human body targets, and performs smooth filtering treatment on the two-dimensional projection image to obtain an updated two-dimensional projection image. And acquiring target pixel points with human body target characteristics in the updated two-dimensional projection image, and marking the pixel points in the same connected region to obtain projection blobs marked in different connected regions. And expanding the area of each projection block mass by 2cm outwards to obtain a maximum value area to be searched, carrying out gray scale expansion on the two-dimensional projection image in the maximum value area to be searched, and comparing the current frame with the previous frame to obtain a plurality of target maximum value points with equal pixel values. And covering by taking the maximum value point of the target as the center of a circle and taking the radius of 10cm as a circle aiming at each projection block to obtain a plurality of candidate human head target areas. The same target maximum value points covered by the two candidate human head target areas are detected, for example, the first candidate human head target area comprises target maximum values 1-10, the second candidate human head target area comprises target maximum values 1-8 and 12, the first candidate human head target area and the second candidate human head target area have the same target maximum value points 1-8, and the ratio of the number of pixels of the circumscribed hexagonal area formed by the target maximum value points 1-8 to the total number of pixels of the first candidate human head target area and the second candidate human head target area is 88.9%, so that the first candidate human head target area and the second candidate human head target area can be determined to be the same confirmed human head target. And counting to obtain the number of all confirmed head targets, and verifying and screening the targets to obtain the number of people in the image shot by the stereoscopic vision camera.
Fig. 6 is a schematic flow chart of target verification screening according to an embodiment of the present invention.
S601, obtaining a target linked list according to the head target confirmed in the current frame, wherein the target linked list comprises attribute information of the head target confirmed;
s602, matching the confirmed head targets of the current frame and the previous frame based on the contour attribute information;
s603, judging whether the region where the head target of the current frame is confirmed is matched with the region corresponding to the previous frame, if so, executing S607, otherwise, executing S608;
s604, back projecting the confirmed head target to an original gray image of an image shot by a stereoscopic vision camera, and intercepting a target pixel area;
s605, calculating and intercepting the texture features of the target pixel region;
s606, judging whether the texture features are weak texture feature targets, if so, executing S607, otherwise, executing S608;
s607, determining the human head target which is preliminarily verified to be real;
and S608, determining the target as a pseudo human head target through multi-feature comprehensive evaluation.
Subtracting the number of the false head targets from the number of the confirmed head targets through target verification and screening to obtain the number N of the detected people in the elevator waiting hallo
Fig. 7 is a schematic flow chart of elevator dispatching based on people counting in the embodiment of the invention.
S701, acquiring the number N of people in the elevator waiting halloAnd obtaining the number N of people in each elevator car by combining the input in the elevator car and the duty ratio statistical equipmentcAnd the space occupancy rate R of the elevator car;
s702, judging the number N of people in the elevator waiting halloWhether the number of people is less than the number of the core people of the elevator, if so, S705 is executed, otherwise, S707 is executed;
s703, judging the number N of people in the elevator carcWhether the number of people is larger than a preset number of people threshold value or not, if so, executing S606, otherwise, executing S607; if the number of people is larger than the preset number of people threshold, the car is full of people at the moment;
s704, judging whether the space occupancy rate R of the elevator car is larger than a preset occupancy rate threshold value, if so, executing S706, otherwise, executing S707; wherein, if the occupancy rate is larger than the preset occupancy rate threshold value, the space of the car at the moment can be determined to be full;
s705, judging the number N of people in the elevator waiting halloWhether the value is 0 or not, if so, executing S706, otherwise, executing S707;
s706, the outside elevator taking command of the elevator car is not responded, namely the elevator does not stop;
and S707, responding to the outside-car elevator taking command, namely stopping the elevator at the moment.
It should be noted that, as can be seen from the above flow, the basic principle of elevator dispatching is that when a car is full of people or the space is full, if no people signal is given, the floor does not stop; passengers in the elevator waiting hall leave after pressing the elevator taking button, the absence of people in the elevator waiting hall is continuously detected within a certain time, and if no people coming out signal exists, the floor does not stop; when the number of people detected by the elevator waiting hall is larger than the number of people carrying by the core, a plurality of elevators are dispatched to the floor, and elevators with fewer people and larger residual space in the elevator car are dispatched preferentially.
Compared with the prior art, the scheme has the advantages that three-dimensional data of the shot image is converted, space three-dimensional information under a world coordinate system obtained after conversion is projected, a human head target area is preliminarily selected by using a maximum value characteristic on a two-dimensional projection image, a real human head target is determined by adopting correlation matching of front and back frames, the target position is determined by using the space three-dimensional information and time dimension information of the front and back frames together, when the position of a person is too far away from a camera or is partially shielded, the height of the person can be accurately obtained, the projection image is further obtained, the real human head target is determined by the time dimension, and people counting has high accuracy under a complex scene with high people number density and serious shielding; and the number of people waiting for the elevator in the current elevator waiting hall is output, elevator passenger flow information such as the number of people in the current elevator car, the space occupation ratio and the like is combined, and an elevator dispatching principle based on elevator taking number detection is applied, so that the purposes of reasonably dispatching the elevator and efficiently operating the elevator are achieved.
Corresponding to the above method embodiment, an embodiment of the present invention provides a people counting apparatus, as shown in fig. 8, the apparatus may include:
the first obtaining module 810 is configured to obtain three-dimensional data of an image captured by a stereoscopic vision camera, and convert the three-dimensional data into spatial three-dimensional information in a world coordinate system;
a projection diagram determining module 820, configured to project the image according to height information and width information in the spatial three-dimensional information to obtain a two-dimensional projection diagram;
a second obtaining module 830, configured to obtain a target pixel point with a human target feature in the two-dimensional projection image;
the calculation module 840 is used for marking the connected regions of the target pixel points and calculating at least one target maximum value point in each projection block according to the projection blocks formed by the target pixel points marked by different connected regions;
a target area determining module 850, configured to cover, for each projection blob, a circle with a preset radius and a target maximum point as a circle center, to obtain at least one candidate human head target area;
a confirmed human head target determining module 860, configured to determine that two candidate human head target areas are the same confirmed human head target when the two candidate human head target areas cover the same target maximum value point and a ratio of the number of pixels of a circumscribed polygon area formed by the same target maximum value point to the total number of pixels of the two candidate human head target areas is greater than a preset ratio threshold;
and the people counting module 870 is used for counting the number of all real head targets in the current frame and determining the number of people shot by the stereoscopic vision camera.
By applying the embodiment, the three-dimensional data of the shot image is converted, the space three-dimensional information under the world coordinate system obtained after conversion is projected, the maximum value characteristic on the two-dimensional projection image is used for preliminarily selecting the human head target area, the real human head target is determined by adopting the correlation matching of the front frame and the rear frame, the target position is determined by utilizing the space three-dimensional information and the time dimension information of the front frame and the rear frame, when the position of a person is too far away from the camera or is partially shielded, the height of the person can still be accurately obtained, the projection image is further obtained, the real human head target is determined by the time dimension, and the people counting has high accuracy under the complex scene with high people number density and serious shielding.
Optionally, the people counting device may further include:
and the non-target background pixel suppression module is used for reducing the height value of the non-human head target area in the two-dimensional projection image or the height value of the non-human head target area in the two-dimensional projection image after the abnormal pixel value is removed at a preset rate through non-target background pixel suppression processing to obtain the two-dimensional projection image after the non-target background pixel suppression.
Optionally, the calculating module 840 may be specifically configured to:
expanding projection blocks formed by target pixel points marked by different communication areas according to a preset value to obtain a maximum value to-be-searched area of each projection block;
performing gray expansion on all the maximum value areas to be searched to obtain an expansion result of each maximum value area to be searched, wherein the pixel value of a characteristic pixel point in the expansion result is equal to the pixel value before the gray expansion;
comparing the pixel value of each pixel point in each expansion result with the pixel value of the corresponding pixel point in the corresponding projection block, and determining the pixel points with the same pixel value as a candidate maximum value point;
for each projection block, comparing the position offset and the height difference of each candidate maximum point in the current frame of the two-dimensional projection image and the corresponding pixel point in the previous frame of the current frame;
and determining the candidate maximum value point of which the position deviation is smaller than the preset displacement and the height difference is smaller than a preset height difference threshold value as a target maximum value point.
Optionally, the target area determining module 850 may be specifically configured to:
aiming at each projection block, taking any target maximum value point as a circle center, and obtaining the area of a target area covered by a preset radius in the current frame;
and when the difference value between the area of the target area and the area corresponding to the previous frame is smaller than a preset area difference threshold value, determining the target area as a candidate human head target area.
Furthermore, on the basis of the first obtaining module 810, the projection view determining module 820, the second obtaining module 830, the calculating module 840, the target area determining module 850, the confirmed head target determining module 860, and the people counting module 870, as shown in fig. 9, the people counting apparatus according to the embodiment of the present invention may further include:
and a filtering module 910, configured to perform smoothing filtering on the two-dimensional projection map to obtain a two-dimensional projection map with abnormal pixel values removed.
By applying the embodiment, the three-dimensional data of the shot image is converted, the space three-dimensional information under the world coordinate system obtained after conversion is projected, the maximum value characteristic on the two-dimensional projection image is used for preliminarily selecting the human head target area, the real human head target is determined by adopting the correlation matching of the front frame and the rear frame, the target position is determined by utilizing the space three-dimensional information and the time dimension information of the front frame and the rear frame, when the position of a person is too far away from the camera or is partially shielded, the height of the person can still be accurately obtained, the projection image is further obtained, the real human head target is determined by the time dimension, and people counting has high accuracy under the complex scene with high people number density and serious shielding; and the noise interference and the background interference are filtered out from the obtained two-dimensional projection image through smooth filtering processing.
It is understood that, in another embodiment of the present invention, the people counting apparatus may include: a first acquisition module 810, a projected image determination module 820, a second acquisition module 830, a calculation module 840, a target area determination module 850, a confirmed head target determination module 860, a people count module 870, a non-target background pixel suppression module, and a filtering module 910.
Furthermore, on the basis of the first obtaining module 810, the projection view determining module 820, the second obtaining module 830, the calculating module 840, the target area determining module 850, the confirmed head target determining module 860, and the people counting module 870, as shown in fig. 10, the people counting apparatus according to the embodiment of the present invention may further include:
a pseudo-human head target determining module 1010, configured to obtain and determine a pseudo-human head target in the two-dimensional projection map according to a characteristic parameter of each confirmed human head target in the two-dimensional projection map;
and a pseudo-human head target number counting module 1020, configured to count the number of all pseudo-human head targets.
By applying the embodiment, the three-dimensional data of the shot image is converted, the space three-dimensional information under the world coordinate system obtained after conversion is projected, the maximum value characteristic on the two-dimensional projection image is used for preliminarily selecting the human head target area, the real human head target is determined by adopting the correlation matching of the front frame and the rear frame, the target position is determined by utilizing the space three-dimensional information and the time dimension information of the front frame and the rear frame, when the position of a person is too far away from the camera or is partially shielded, the height of the person can still be accurately obtained, the projection image is further obtained, the real human head target is determined by the time dimension, and people counting has high accuracy under the complex scene with high people number density and serious shielding; and through inter-frame target association and target cross validation, subtracting the pseudo-human head target from the obtained confirmed human head target to obtain the people number statistics with higher accuracy.
Optionally, the people counting module 870 may be specifically configured to:
counting the number of all confirmed head targets in the current frame;
and determining the difference value between the number of all confirmed head targets and the number of all false head targets in the current frame as the number of people in the image shot by the stereoscopic vision camera.
Optionally, the characteristic parameters may include: contour feature parameters and texture feature parameters.
Optionally, the pseudo-human head target determining module 1010 may be specifically configured to:
acquiring and according to the contour characteristic parameters of each confirmed head target in the two-dimensional projection drawing, judging whether the region where the confirmed head target is located in the current frame of the two-dimensional projection drawing is matched with the region corresponding to the previous frame of the current frame, wherein the contour characteristic parameters comprise: area, height and distance;
and if the two-dimensional projection image is not matched with the pseudo human head target, executing a step of judging whether the region where the human head target is confirmed in the previous frame of the current frame of the two-dimensional projection image is matched with the region corresponding to the next previous frame of the current frame, and determining that the confirmed human head target is the pseudo human head target until the unmatched times reach a preset times threshold value.
The pseudo-human head target determining module 1010 may be further configured to:
back projecting the confirmed head target to an original gray level image of an image shot by the stereoscopic vision camera to obtain a back-projected gray level image;
acquiring a target pixel area in the gray level image after the back projection;
and calculating texture characteristic parameters of the target pixel region, and determining that the weak texture target region smaller than a preset parameter threshold value in the texture characteristic parameters is a pseudo human head target.
It is understood that, in another embodiment of the present invention, the people counting apparatus may include: the system comprises a first acquisition module 810, a projected graph determination module 820, a second acquisition module 830, a calculation module 840, a target area determination module 850, a confirmed person head target determination module 860, a people counting module 870, a non-target background pixel suppression module, a filtering module 910, a pseudo person head target determination module 1010, and a pseudo person head target number counting module 1020.
Furthermore, on the basis of the first obtaining module 810, the projection view determining module 820, the second obtaining module 830, the calculating module 840, the target area determining module 850, the confirmed head target determining module 860, and the people counting module 870, as shown in fig. 11, the people counting apparatus according to the embodiment of the present invention may further include:
a third obtaining module 1110, configured to obtain a confirmed head target in the two-dimensional projection view corresponding to the images captured by the multiple stereoscopic cameras and a coincidence region captured by every two stereoscopic cameras;
a coincidence coefficient determining module 1120, configured to determine a coincidence coefficient according to a distance from a confirmed human head target in the coincidence region to a boundary of the coincidence region, where the coincidence coefficient is any one of values from 0 to 1, and the coincidence coefficient is inversely proportional to the distance;
the head count confirming module 1130 is configured to calculate the head count of the total number of the persons captured by the multiple stereoscopic cameras according to the number of the persons in the image captured by each stereoscopic camera, the overlapping coefficient, and the number of the confirmed head targets in the overlapping area.
By applying the embodiment, the three-dimensional data of the shot image is converted, the space three-dimensional information under the world coordinate system obtained after conversion is projected, the maximum value characteristic on the two-dimensional projection image is used for preliminarily selecting the human head target area, the real human head target is determined by adopting the correlation matching of the front frame and the rear frame, the target position is determined by utilizing the space three-dimensional information and the time dimension information of the front frame and the rear frame, when the position of a person is too far away from the camera or is partially shielded, the height of the person can still be accurately obtained, the projection image is further obtained, the real human head target is determined by the time dimension, and people counting has high accuracy under the complex scene with high people number density and serious shielding; through the linkage of multiple cameras, the area division is carried out to the large tracts of land and is detected the region, and different cameras are responsible for counting different regional numbers and splice and gather, realize that the large tracts of land detects the regional real-time number statistics of detecting.
It is understood that, in another embodiment of the present invention, the people counting apparatus may include: the system comprises a first acquisition module 810, a projected graph determination module 820, a second acquisition module 830, a calculation module 840, a target area determination module 850, a confirmed person head target determination module 860, a people count module 870, a non-target background pixel suppression module, a filtering module 910, a false person head target determination module 1010, a false person head target number statistics module 1020, a third acquisition module 1110, a coincidence coefficient determination module 1120, and a total people count determination module 1130.
It should be noted that, the people counting device according to the embodiment of the present invention is a device applying the people counting method, and all embodiments of the people counting method are applicable to the device and can achieve the same or similar beneficial effects.
Corresponding to the embodiments of the people counting method, the elevator dispatching method and the people counting device, the embodiment of the invention provides an elevator dispatching system, as shown in fig. 12, the elevator dispatching system can comprise:
a stereoscopic vision camera 1210 for shooting a scene image in a waiting hall;
the counting equipment 1220 is used for counting the number of people in the elevator car and the duty ratio of the elevator car and obtaining the number of people in the elevator car and the space occupancy rate of the elevator car through shooting;
the elevator dispatching controller 1230 is used for acquiring three-dimensional data of images in the elevator waiting hall shot by the stereoscopic vision camera 1210 and converting the three-dimensional data into spatial three-dimensional information under a world coordinate system; projecting the image according to height information and width information in the spatial three-dimensional information to obtain a two-dimensional projection image; acquiring target pixel points with human body target characteristics in the two-dimensional projection drawing; carrying out connected region marking on the target pixel points, and calculating to obtain at least one target maximum value point in each projection block aiming at projection blocks formed by target pixel points marked by different connected regions; covering a circle with a preset radius by taking the target maximum value point as a circle center for each projection block to obtain at least one candidate human head target area; when two candidate human head target areas cover the same target maximum value point and the proportion of the pixel point number of a circumscribed polygon area formed by the same target maximum value point to the total pixel point number of the two candidate human head target areas is larger than a preset proportion threshold value, determining the two candidate human head target areas as the same confirmed human head target; counting the number of all confirmed head targets in the current frame, and determining the number of people in the elevator waiting hall; acquiring the number of people in the elevator car and the space occupancy rate of the elevator car, which are obtained by the counting equipment 1220 for the number of people in the elevator car and the duty ratio; and dispatching the elevator cars with the number of people not full and the space not full to the floors where the elevator waiting hall with the number of people more than 0 is located according to the number of people in the elevator waiting hall, the number of people in the elevator cars and the space occupancy rate of the elevator cars.
By applying the embodiment, the three-dimensional data of the shot image is converted, the space three-dimensional information under the world coordinate system obtained after conversion is projected, the maximum value characteristic on the two-dimensional projection image is used for preliminarily selecting the human head target area, the real human head target is determined by adopting the correlation matching of the front frame and the rear frame, the target position is determined by utilizing the space three-dimensional information and the time dimension information of the front frame and the rear frame, when the position of a person is too far away from the camera or is partially shielded, the height of the person can still be accurately obtained, the projection image is further obtained, the real human head target is determined by the time dimension, and the people counting has high accuracy under the complex scene with high people number density and serious shielding; and the number of people waiting for the elevator in the current elevator waiting hall is output, elevator passenger flow information such as the number of people in the current elevator car, the space occupation ratio and the like is combined, and an elevator dispatching principle based on elevator taking number detection is applied, so that the purposes of reasonably dispatching the elevator and efficiently operating the elevator are achieved.
Optionally, the elevator dispatching controller 1230 may be specifically configured to:
and performing smooth filtering processing on the two-dimensional projection graph to obtain the two-dimensional projection graph with the abnormal pixel values removed.
Optionally, the elevator dispatching controller 1230 may be specifically configured to:
and reducing the height value of the non-human head target area in the two-dimensional projection image or the height value of the non-human head target area in the two-dimensional projection image after the abnormal pixel value is removed at a preset rate through non-target background pixel suppression processing to obtain the two-dimensional projection image after the non-target background pixels are suppressed.
Optionally, the elevator dispatching controller 1230 may be specifically configured to:
expanding projection blocks formed by target pixel points marked by different communication areas according to a preset value to obtain a maximum value to-be-searched area of each projection block;
performing gray expansion on all maximum value areas to be searched to obtain an expansion result of each maximum value area to be searched, wherein the pixel value of a characteristic pixel point in the expansion result is equal to the pixel value of a corresponding pixel point before the gray expansion;
comparing the pixel value of each pixel point in each expansion result with the pixel value of the corresponding pixel point in the corresponding projection block, and determining the pixel points with the same pixel value as a candidate maximum value point;
for each projection block, comparing the position offset and the height difference of each candidate maximum point in the current frame of the two-dimensional projection image and the corresponding pixel point in the previous frame of the current frame;
and determining the candidate maximum value point of which the position deviation is smaller than the preset displacement and the height difference is smaller than a preset height difference threshold value as a target maximum value point.
Optionally, the elevator dispatching controller 1230 may be specifically configured to:
aiming at each projection block, taking any target maximum value point as a circle center, and obtaining the area of a target area covered by a preset radius in the current frame;
and when the difference value between the area of the target area and the area corresponding to the previous frame is smaller than a preset area difference threshold value, determining the target area as a candidate human head target area.
Optionally, the elevator dispatching controller 1230 may be specifically configured to:
acquiring and determining a pseudo human head target in the two-dimensional projection drawing according to the characteristic parameters of each confirmed human head target in the two-dimensional projection drawing;
counting the number of all the dummy head targets;
the counting of the number of all confirmed head targets in the current frame and the determination of the number of people in the image shot by the stereoscopic vision camera comprise:
counting the number of all confirmed head targets in the current frame;
and determining the difference value between the number of all confirmed head targets and the number of all false head targets in the current frame as the number of people in the image shot by the stereoscopic vision camera.
Optionally, the characteristic parameters include: contour characteristic parameters and texture characteristic parameters;
the elevator dispatching controller 1230 may be specifically configured to:
acquiring and according to the contour characteristic parameters of each confirmed head target in the two-dimensional projection drawing, judging whether the region where the confirmed head target is located in the current frame of the two-dimensional projection drawing is matched with the region corresponding to the previous frame of the current frame, wherein the contour characteristic parameters comprise: area, height and distance;
and if the two-dimensional projection image is not matched with the pseudo human head target, executing a step of judging whether the region where the human head target is confirmed in the previous frame of the current frame of the two-dimensional projection image is matched with the region corresponding to the next previous frame of the current frame, and determining that the confirmed human head target is the pseudo human head target until the unmatched times reach a preset times threshold value.
Optionally, the elevator dispatching controller 1230 may be specifically configured to:
back projecting the confirmed head target to an original gray level image of an image shot by the stereoscopic vision camera to obtain a back-projected gray level image;
acquiring a target pixel area in the gray level image after the back projection;
and calculating texture characteristic parameters of the target pixel region, and determining that the weak texture target region smaller than a preset parameter threshold value in the texture characteristic parameters is a pseudo human head target.
Optionally, the elevator dispatching controller 1230 may be specifically configured to:
acquiring confirmed head targets in a two-dimensional projection image corresponding to images shot by a plurality of stereoscopic vision cameras and a superposition area shot by every two stereoscopic vision cameras;
determining a coincidence coefficient according to the distance from a confirmed human head target in the coincidence region to the boundary of the coincidence region, wherein the coincidence coefficient is any one of values from 0 to 1, and is inversely proportional to the distance;
and calculating the total number of people shot by the multiple stereoscopic vision cameras according to the number of people in the image shot by each stereoscopic vision camera, the coincidence coefficient and the number of confirmed head targets in the coincidence area.
Optionally, the elevator dispatching controller 1230 may be specifically configured to:
when the number of people in the elevator waiting hall is more than 0 and less than the nuclear load number of the elevator cars, dispatching the elevator car with the least number of people in the elevator cars with less than full number of people to the floor where the elevator waiting hall is located, or dispatching the elevator car with the largest remaining space in the elevator cars with less than full space to the floor where the elevator waiting hall is located;
and when the number of people in the elevator waiting hall is greater than the nuclear load number of the elevator cars, dispatching the elevator cars with the number of people not full and the space not full to the floor where the elevator waiting hall is located.
It should be noted that, the elevator dispatching system of the embodiment of the invention is based on the people counting method, the elevator dispatching method and the people counting device, and all the embodiments of the people counting method, the elevator dispatching method and the people counting device are suitable for the elevator dispatching system and can achieve the same or similar beneficial effects.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (19)

1. A people counting method is characterized by comprising the following steps:
acquiring three-dimensional data of an image shot by a stereoscopic vision camera, and converting the three-dimensional data into space three-dimensional information under a world coordinate system;
projecting the image according to height information and width information in the spatial three-dimensional information to obtain a two-dimensional projection image;
acquiring target pixel points with human body target characteristics in the two-dimensional projection drawing;
carrying out connected region marking on the target pixel points, and expanding projection lumps formed by the target pixel points marked in different connected regions according to preset values to obtain a maximum value to-be-searched region of each projection lump; performing gray expansion on all maximum value areas to be searched to obtain an expansion result of each maximum value area to be searched, wherein the pixel value of a characteristic pixel point in the expansion result is equal to the pixel value of a corresponding pixel point before the gray expansion; comparing the pixel value of each pixel point in each expansion result with the pixel value of the corresponding pixel point in the corresponding projection block, and determining the pixel points with the same pixel value as a candidate maximum value point; for each projection block, comparing the position offset and the height difference of each candidate maximum point in the current frame of the two-dimensional projection image and the corresponding pixel point in the previous frame of the current frame; determining candidate maximum value points of which the position deviation is smaller than a preset displacement and the height difference is smaller than a preset height difference threshold value as target maximum value points;
covering a circle with a preset radius by taking the target maximum value point as a circle center for each projection block to obtain at least one candidate human head target area;
when two candidate human head target areas cover the same target maximum value point and the proportion of the pixel point number of a circumscribed polygon area formed by the same target maximum value point to the total pixel point number of the two candidate human head target areas is larger than a preset proportion threshold value, determining the two candidate human head target areas as the same confirmed human head target;
and counting the number of all confirmed head targets in the current frame, and determining the number of people in the image shot by the stereoscopic vision camera.
2. The method of counting people according to claim 1, wherein after the image is projected according to the height information and the width information in the three-dimensional information of the space to obtain a two-dimensional projection diagram, the method further comprises:
and performing smooth filtering processing on the two-dimensional projection graph to obtain the two-dimensional projection graph with the abnormal pixel values removed.
3. The method of counting people according to claim 2, wherein after the image is projected according to the height information and the width information in the three-dimensional information of the space to obtain a two-dimensional projection diagram, the method further comprises:
and reducing the height value of the non-human head target area in the two-dimensional projection image or the height value of the non-human head target area in the two-dimensional projection image after the abnormal pixel value is removed at a preset rate through non-target background pixel suppression processing to obtain the two-dimensional projection image after the non-target background pixels are suppressed.
4. The people counting method according to claim 1, wherein the step of covering a circle with a preset radius and a target maximum value point as a center of the circle for each projection blob to obtain at least one candidate head target area comprises:
aiming at each projection block, taking any target maximum value point as a circle center, and obtaining the area of a target area covered by a preset radius in the current frame;
and when the difference value between the area of the target area and the area corresponding to the previous frame is smaller than a preset area difference threshold value, determining the target area as a candidate human head target area.
5. The method of claim 1, wherein when two candidate human head target areas cover the same target maximum value point and the ratio of the number of pixels in a circumscribed polygon area formed by the same target maximum value point to the total number of pixels in the two candidate human head target areas is greater than a preset ratio threshold, the method further comprises the following steps:
acquiring and determining a pseudo human head target in the two-dimensional projection drawing according to the characteristic parameters of each confirmed human head target in the two-dimensional projection drawing;
counting the number of all the dummy head targets;
the counting of the number of all confirmed head targets in the current frame and the determination of the number of people in the image shot by the stereoscopic vision camera comprise:
counting the number of all confirmed head targets in the current frame;
and determining the difference value between the number of all confirmed head targets and the number of all false head targets in the current frame as the number of people in the image shot by the stereoscopic vision camera.
6. The people counting method according to claim 5, wherein the characteristic parameters comprise: contour characteristic parameters and texture characteristic parameters;
the obtaining and determining the pseudo human head target in the two-dimensional projection drawing according to the characteristic parameters of each confirmed human head target in the two-dimensional projection drawing comprises the following steps:
acquiring and according to the contour characteristic parameters of each confirmed head target in the two-dimensional projection drawing, judging whether the region where the confirmed head target is located in the current frame of the two-dimensional projection drawing is matched with the region corresponding to the previous frame of the current frame, wherein the contour characteristic parameters comprise: area, height and distance;
and if the two-dimensional projection image is not matched with the pseudo human head target, executing a step of judging whether the region where the human head target is confirmed in the previous frame of the current frame of the two-dimensional projection image is matched with the region corresponding to the next previous frame of the current frame, and determining that the confirmed human head target is the pseudo human head target until the unmatched times reach a preset times threshold value.
7. The people counting method according to claim 5, wherein the obtaining and determining the pseudo head targets in the two-dimensional projection drawing according to the characteristic parameters of each confirmed head target in the two-dimensional projection drawing further comprises:
back projecting the confirmed head target to an original gray level image of an image shot by the stereoscopic vision camera to obtain a back-projected gray level image;
acquiring a target pixel area in the gray level image after the back projection;
and calculating texture characteristic parameters of the target pixel region, and determining that the weak texture target region smaller than a preset parameter threshold value in the texture characteristic parameters is a pseudo human head target.
8. The people counting method according to claim 1, wherein after counting the number of all confirmed head targets in the current frame and determining the number of people in the image captured by the stereoscopic camera, the people counting method further comprises:
acquiring confirmed head targets in a two-dimensional projection image corresponding to images shot by a plurality of stereoscopic vision cameras and a superposition area shot by every two stereoscopic vision cameras;
determining a coincidence coefficient according to the distance from a confirmed human head target in the coincidence region to the boundary of the coincidence region, wherein the coincidence coefficient is any one of values from 0 to 1, and is inversely proportional to the distance;
and calculating the total number of people shot by the multiple stereoscopic vision cameras according to the number of people in the image shot by each stereoscopic vision camera, the coincidence coefficient and the number of confirmed head targets in the coincidence area.
9. An elevator dispatching method, characterized in that the elevator dispatching method comprises:
acquiring three-dimensional data of images in a waiting hall shot by a stereoscopic vision camera, and converting the three-dimensional data into spatial three-dimensional information under a world coordinate system;
projecting the image according to height information and width information in the spatial three-dimensional information to obtain a two-dimensional projection image;
acquiring target pixel points with human body target characteristics in the two-dimensional projection drawing;
carrying out connected region marking on the target pixel points, and expanding projection lumps formed by the target pixel points marked in different connected regions according to preset values to obtain a maximum value to-be-searched region of each projection lump; performing gray expansion on all maximum value areas to be searched to obtain an expansion result of each maximum value area to be searched, wherein the pixel value of a characteristic pixel point in the expansion result is equal to the pixel value of a corresponding pixel point before the gray expansion; comparing the pixel value of each pixel point in each expansion result with the pixel value of the corresponding pixel point in the corresponding projection block, and determining the pixel points with the same pixel value as a candidate maximum value point; for each projection block, comparing the position offset and the height difference of each candidate maximum point in the current frame of the two-dimensional projection image and the corresponding pixel point in the previous frame of the current frame; determining candidate maximum value points of which the position deviation is smaller than a preset displacement and the height difference is smaller than a preset height difference threshold value as target maximum value points;
covering a circle with a preset radius by taking the target maximum value point as a circle center for each projection block to obtain at least one candidate human head target area;
when two candidate human head target areas cover the same target maximum value point and the proportion of the pixel point number of a circumscribed polygon area formed by the same target maximum value point to the total pixel point number of the two candidate human head target areas is larger than a preset proportion threshold value, determining the two candidate human head target areas as the same confirmed human head target;
counting the number of all confirmed head targets in the current frame, and determining the number of people in the elevator waiting hall;
acquiring the number of people in an elevator car and the space occupancy rate of the elevator car;
and dispatching the elevator cars with the number of people not full and the space not full to the floors where the elevator waiting hall with the number of people more than 0 is located according to the number of people in the elevator waiting hall, the number of people in the elevator cars and the space occupancy rate of the elevator cars.
10. The elevator dispatching method according to claim 9, wherein the dispatching of the elevator cars with less number of people and less space to the floor where the elevator waiting hall with more than 0 number of people is located according to the number of people in the elevator waiting hall, the number of people in the elevator cars and the space occupancy of the elevator cars comprises:
when the number of people in the elevator waiting hall is more than 0 and less than the nuclear load number of the elevator cars, dispatching the elevator car with the least number of people in the elevator cars with less than full number of people to the floor where the elevator waiting hall is located, or dispatching the elevator car with the largest remaining space in the elevator cars with less than full space to the floor where the elevator waiting hall is located;
and when the number of people in the elevator waiting hall is greater than the nuclear load number of the elevator cars, dispatching the elevator cars with the number of people not full and the space not full to the floor where the elevator waiting hall is located.
11. A people counting device, comprising:
the first acquisition module is used for acquiring three-dimensional data of an image shot by the stereoscopic vision camera and converting the three-dimensional data into space three-dimensional information under a world coordinate system;
the projection drawing determining module is used for projecting the image according to the height information and the width information in the three-dimensional space information to obtain a two-dimensional projection drawing;
the second acquisition module is used for acquiring target pixel points with human body target characteristics in the two-dimensional projection image;
the calculation module is used for marking the connected regions of the target pixel points, expanding projection blobs formed by the target pixel points marked by different connected regions according to preset values, and obtaining a maximum value to-be-searched region of each projection blob; performing gray expansion on all maximum value areas to be searched to obtain an expansion result of each maximum value area to be searched, wherein the pixel value of a characteristic pixel point in the expansion result is equal to the pixel value of a corresponding pixel point before the gray expansion; comparing the pixel value of each pixel point in each expansion result with the pixel value of the corresponding pixel point in the corresponding projection block, and determining the pixel points with the same pixel value as a candidate maximum value point; for each projection block, comparing the position offset and the height difference of each candidate maximum point in the current frame of the two-dimensional projection image and the corresponding pixel point in the previous frame of the current frame; determining candidate maximum value points of which the position deviation is smaller than a preset displacement and the height difference is smaller than a preset height difference threshold value as target maximum value points;
the target area determining module is used for covering a circle with a target maximum value point as a circle center and a preset radius aiming at each projection block to obtain at least one candidate human head target area;
the confirming human head target determining module is used for determining that the two candidate human head target areas are the same confirming human head target when the two candidate human head target areas cover the same target maximum value point and the proportion of the pixel number of a circumscribed polygon area formed by the same target maximum value point to the total pixel number of the two candidate human head target areas is greater than a preset proportion threshold value;
and the people counting module is used for counting the number of all confirmed head targets in the current frame and determining the number of people in the image shot by the stereoscopic vision camera.
12. The people counting device according to claim 11, further comprising:
and the filtering module is used for carrying out smooth filtering processing on the two-dimensional projection graph to obtain the two-dimensional projection graph with the abnormal pixel values removed.
13. The people counting device according to claim 12, further comprising:
and the non-target background pixel suppression module is used for reducing the height value of the non-human head target area in the two-dimensional projection image or the height value of the non-human head target area in the two-dimensional projection image after the abnormal pixel value is removed at a preset rate through non-target background pixel suppression processing to obtain the two-dimensional projection image after the non-target background pixel suppression.
14. The people counting device according to claim 11, wherein the target area determining module is specifically configured to:
aiming at each projection block, taking any target maximum value point as a circle center, and obtaining the area of a target area covered by a preset radius in the current frame;
and when the difference value between the area of the target area and the area corresponding to the previous frame is smaller than a preset area difference threshold value, determining the target area as a candidate human head target area.
15. The people counting device according to claim 11, further comprising:
the pseudo human head target determining module is used for acquiring and determining the pseudo human head target in the two-dimensional projection drawing according to the characteristic parameters of each confirmed human head target in the two-dimensional projection drawing;
the pseudo-human head target number counting module is used for counting the number of all pseudo-human head targets;
the people counting module is specifically used for:
counting the number of all confirmed head targets in the current frame;
and determining the difference value between the number of all confirmed head targets and the number of all false head targets in the current frame as the number of people in the image shot by the stereoscopic vision camera.
16. The people counting device according to claim 15, wherein the characteristic parameters comprise: contour characteristic parameters and texture characteristic parameters;
the pseudo-human head target determination module is specifically configured to:
acquiring and according to the contour characteristic parameters of each confirmed head target in the two-dimensional projection drawing, judging whether the region where the confirmed head target is located in the current frame of the two-dimensional projection drawing is matched with the region corresponding to the previous frame of the current frame, wherein the contour characteristic parameters comprise: area, height and distance;
and if the two-dimensional projection image is not matched with the pseudo human head target, executing a step of judging whether the region where the human head target is confirmed in the previous frame of the current frame of the two-dimensional projection image is matched with the region corresponding to the next previous frame of the current frame, and determining that the confirmed human head target is the pseudo human head target until the unmatched times reach a preset times threshold value.
17. The people counting device according to claim 15, wherein the pseudo-head target determining module is further configured to:
back projecting the confirmed head target to an original gray level image of an image shot by the stereoscopic vision camera to obtain a back-projected gray level image;
acquiring a target pixel area in the gray level image after the back projection;
and calculating texture characteristic parameters of the target pixel region, and determining that the weak texture target region smaller than a preset parameter threshold value in the texture characteristic parameters is a pseudo human head target.
18. The people counting device according to claim 11, further comprising:
the third acquisition module is used for acquiring confirmed head targets in the two-dimensional projection image corresponding to the images shot by the multiple stereoscopic vision cameras and the overlapped area shot by every two stereoscopic vision cameras;
the coincidence coefficient determining module is used for determining a coincidence coefficient according to the distance from a confirmed human head target in the coincidence region to the boundary of the coincidence region, wherein the coincidence coefficient is any one of values from 0 to 1, and the coincidence coefficient is inversely proportional to the distance;
and the total number confirming module is used for calculating the total number of people shot by the plurality of stereoscopic vision cameras according to the number of people in the image shot by each stereoscopic vision camera, the coincidence coefficient and the number of confirmed head targets in the coincidence area.
19. An elevator dispatching system, comprising:
the stereoscopic vision camera is used for shooting scene images in the elevator waiting hall;
the device comprises a counting device for the number of people in the elevator car and the duty ratio, wherein the counting device is used for obtaining the number of people in the elevator car and the space occupancy rate of the elevator car through shooting;
the elevator dispatching controller is used for acquiring three-dimensional data of images in the elevator waiting hall, which are obtained by shooting through the stereoscopic vision camera, and converting the three-dimensional data into space three-dimensional information under a world coordinate system; projecting the image according to height information and width information in the spatial three-dimensional information to obtain a two-dimensional projection image; acquiring target pixel points with human body target characteristics in the two-dimensional projection drawing; carrying out connected region marking on the target pixel points, and expanding projection lumps formed by the target pixel points marked in different connected regions according to preset values to obtain a maximum value to-be-searched region of each projection lump; performing gray expansion on all maximum value areas to be searched to obtain an expansion result of each maximum value area to be searched, wherein the pixel value of a characteristic pixel point in the expansion result is equal to the pixel value of a corresponding pixel point before the gray expansion; comparing the pixel value of each pixel point in each expansion result with the pixel value of the corresponding pixel point in the corresponding projection block, and determining the pixel points with the same pixel value as a candidate maximum value point; for each projection block, comparing the position offset and the height difference of each candidate maximum point in the current frame of the two-dimensional projection image and the corresponding pixel point in the previous frame of the current frame; determining candidate maximum value points of which the position deviation is smaller than a preset displacement and the height difference is smaller than a preset height difference threshold value as target maximum value points; covering a circle with a preset radius by taking the target maximum value point as a circle center for each projection block to obtain at least one candidate human head target area; when two candidate human head target areas cover the same target maximum value point and the proportion of the pixel point number of a circumscribed polygon area formed by the same target maximum value point to the total pixel point number of the two candidate human head target areas is larger than a preset proportion threshold value, determining the two candidate human head target areas as the same confirmed human head target; counting the number of all confirmed head targets in the current frame, and determining the number of people in the elevator waiting hall; acquiring the number of people in the elevator car and the space occupancy rate of the elevator car, which are obtained by the counting equipment for the number of people in the elevator car and the duty ratio; and dispatching the elevator cars with the number of people not full and the space not full to the floors where the elevator waiting hall with the number of people more than 0 is located according to the number of people in the elevator waiting hall, the number of people in the elevator cars and the space occupancy rate of the elevator cars.
CN201710157587.0A 2017-03-16 2017-03-16 People counting method and device and elevator dispatching method and system Active CN108629230B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710157587.0A CN108629230B (en) 2017-03-16 2017-03-16 People counting method and device and elevator dispatching method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710157587.0A CN108629230B (en) 2017-03-16 2017-03-16 People counting method and device and elevator dispatching method and system

Publications (2)

Publication Number Publication Date
CN108629230A CN108629230A (en) 2018-10-09
CN108629230B true CN108629230B (en) 2021-02-12

Family

ID=63686583

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710157587.0A Active CN108629230B (en) 2017-03-16 2017-03-16 People counting method and device and elevator dispatching method and system

Country Status (1)

Country Link
CN (1) CN108629230B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109704160A (en) * 2019-02-27 2019-05-03 广州广日电梯工业有限公司 Elevator control method and control device based on signal strength
CN112149457A (en) * 2019-06-27 2020-12-29 西安光启未来技术研究院 People flow statistical method, device, server and computer readable storage medium
CN110503028B (en) * 2019-08-21 2023-12-15 腾讯科技(深圳)有限公司 Sensor, system, method and medium for determining distribution of objects in an area
CN111483912A (en) * 2020-01-07 2020-08-04 郝红娟 Escalator passenger number dynamic updating system and method
CN111738125B (en) * 2020-06-16 2023-10-27 中国银行股份有限公司 Method and device for determining number of clients
CN111986253B (en) * 2020-08-21 2023-09-15 日立楼宇技术(广州)有限公司 Method, device, equipment and storage medium for detecting elevator crowding degree
CN112587035B (en) * 2020-12-08 2023-05-05 珠海一微半导体股份有限公司 Control method and system for identifying working scene of mobile robot
CN115604444A (en) * 2022-09-29 2023-01-13 泰州可以信息科技有限公司(Cn) Projection big data self-adjusting system

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100462295C (en) * 2006-09-29 2009-02-18 浙江工业大学 Intelligent dispatcher for group controlled lifts based on image recognizing technology
CN100595121C (en) * 2007-12-10 2010-03-24 中国科学院计算技术研究所 Target place optimized dispatching method and system
CN101872422B (en) * 2010-02-10 2012-11-21 杭州海康威视数字技术股份有限公司 People flow rate statistical method and system capable of precisely identifying targets
CN101872414B (en) * 2010-02-10 2012-07-25 杭州海康威视软件有限公司 People flow rate statistical method and system capable of removing false targets
CN102236902B (en) * 2011-06-21 2013-01-09 杭州海康威视数字技术股份有限公司 Method and device for detecting targets
CN102982598B (en) * 2012-11-14 2015-05-20 三峡大学 Video people counting method and system based on single camera scene configuration
JP5674857B2 (en) * 2013-05-10 2015-02-25 技研トラステム株式会社 Passenger counting device
JP6276519B2 (en) * 2013-05-22 2018-02-07 株式会社 日立産業制御ソリューションズ Person counting device and human flow line analyzing device
CN105035887B (en) * 2015-07-03 2017-06-20 穆国栋 A kind of intelligent elevator master control system based on Computer Vision Detection
CN105844234B (en) * 2016-03-21 2020-07-31 商汤集团有限公司 Method and equipment for counting people based on head and shoulder detection
CN106022458B (en) * 2016-05-13 2018-04-03 中国人民解放军国防科学技术大学 Towards the number faster statistical approach of safety of school bus
CN106251363A (en) * 2016-07-18 2016-12-21 四川君逸数码科技股份有限公司 A kind of wisdom gold eyeball identification artificial abortion's demographic method and device

Also Published As

Publication number Publication date
CN108629230A (en) 2018-10-09

Similar Documents

Publication Publication Date Title
CN108629230B (en) People counting method and device and elevator dispatching method and system
US11789545B2 (en) Information processing device and method, program and recording medium for identifying a gesture of a person from captured image data
JP6549797B2 (en) Method and system for identifying head of passerby
US8655078B2 (en) Situation determining apparatus, situation determining method, situation determining program, abnormality determining apparatus, abnormality determining method, abnormality determining program, and congestion estimating apparatus
CN110425005B (en) Safety monitoring and early warning method for man-machine interaction behavior of belt transport personnel under mine
CN103824066B (en) A kind of licence plate recognition method based on video flowing
JP7205613B2 (en) Image processing device, image processing method and program
WO2020220663A1 (en) Target detection method and apparatus, device, and storage medium
CN109344746B (en) Pedestrian counting method, system, computer device and storage medium
CA3094424A1 (en) Safety monitoring and early-warning method for man-machine interaction behavior of underground conveyor belt operator
CN104902258A (en) Multi-scene pedestrian volume counting method and system based on stereoscopic vision and binocular camera
CN101847265A (en) Method for extracting moving objects and partitioning multiple objects used in bus passenger flow statistical system
CN107491720A (en) A kind of model recognizing method based on modified convolutional neural networks
CN105631418A (en) People counting method and device
CN110781964A (en) Human body target detection method and system based on video image
CN112347814A (en) Passenger flow estimation and display method, system and computer readable storage medium
CN111079518A (en) Fall-down abnormal behavior identification method based on scene of law enforcement and case handling area
CN107590431B (en) Quantity counting method and device based on image recognition
CN102610104A (en) Onboard front vehicle detection method
CN109064444B (en) Track slab disease detection method based on significance analysis
CN104281851A (en) Extraction method and device of car logo information
CN114155278A (en) Target tracking and related model training method, related device, equipment and medium
Kumar et al. Intelligent parking vehicle identification and classification system
CN103971376A (en) Application program execution method and device
CN111986253B (en) Method, device, equipment and storage medium for detecting elevator crowding degree

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
GR01 Patent grant
GR01 Patent grant