CN113762126A - Personnel entry and exit detection method, device, equipment and medium - Google Patents

Personnel entry and exit detection method, device, equipment and medium Download PDF

Info

Publication number
CN113762126A
CN113762126A CN202111012779.5A CN202111012779A CN113762126A CN 113762126 A CN113762126 A CN 113762126A CN 202111012779 A CN202111012779 A CN 202111012779A CN 113762126 A CN113762126 A CN 113762126A
Authority
CN
China
Prior art keywords
area
target
personnel
target person
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111012779.5A
Other languages
Chinese (zh)
Inventor
叶景泰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Shuliantianxia Intelligent Technology Co Ltd
Original Assignee
Shenzhen Shuliantianxia Intelligent 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 Shenzhen Shuliantianxia Intelligent Technology Co Ltd filed Critical Shenzhen Shuliantianxia Intelligent Technology Co Ltd
Priority to CN202111012779.5A priority Critical patent/CN113762126A/en
Publication of CN113762126A publication Critical patent/CN113762126A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/66Analysis of geometric attributes of image moments or centre of gravity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10048Infrared image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30232Surveillance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30241Trajectory

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Geometry (AREA)
  • Geophysics And Detection Of Objects (AREA)

Abstract

The embodiment of the invention relates to a method, a device, equipment and a medium for detecting personnel entry and exit, wherein the method comprises the following steps: acquiring a plurality of thermal images of a person to be detected entering and exiting an area; determining a target personnel area in the thermal image and position information of the target personnel area on the thermal image according to the pixel points and the temperature values corresponding to the pixel points one by one; determining the centroid position information of the target personnel according to the position information; acquiring track information of target personnel in the personnel access area according to the centroid position information; and obtaining a personnel in-out detection result according to the track information of the target personnel area in the personnel in-out area. According to the embodiment of the invention, the personnel entering and exiting are detected by adopting an infrared thermal imaging mode, the privacy and the safety of personnel can be effectively protected, and the personnel entering and exiting detection result is obtained through the track information of the target personnel area in the personnel entering and exiting area, so that the detection precision is high.

Description

Personnel entry and exit detection method, device, equipment and medium
Technical Field
The embodiment of the invention relates to the technical field of intelligent home, in particular to a method, a device, equipment and a medium for detecting personnel entering and exiting.
Background
The entrance and exit detection is an important premise basis of many intelligent home scenes, the number of people in a room can be known through the detection of the number of the entrance and exit people, and then intelligent equipment is linked, and if people exist, the lamp is turned on, and if no people exist, the lamp is turned off.
In the process of implementing the present application, the inventor finds that at least the following problems exist in the prior art:
at present, a mainstream commonly used entrance and exit detection mode is a detection mode based on PIR pyroelectric infrared matched camera, an optical camera mode is adopted, the privacy protection performance is poor, a binocular camera or an RGBD (red green blue digital) camera is expensive, and moreover, if a plurality of people enter and exit, if the people walk side by side, the detection omission occurs, and the accuracy of a method for locking the head of the people is insufficient.
Disclosure of Invention
The embodiment of the invention aims to provide a method, a device, equipment and a medium for detecting the entrance and exit of people, which adopt a low-cost infrared thermal imaging technology, effectively protect the privacy of people, obtain the track of the people, detect the entrance and exit of the people through the track and have high detection precision.
In a first aspect, an embodiment of the present invention provides a method for detecting entry and exit of people, where the method includes:
acquiring a plurality of thermal images of a person to be detected entering and exiting an area; each thermal image comprises a plurality of pixel points and temperature values corresponding to the pixel points one by one;
determining target personnel in the thermal image and position information of the target personnel on the thermal image according to the pixel points and the temperature values corresponding to the pixel points one by one;
determining the centroid position information of the target personnel according to the position information;
acquiring track information of target personnel in the personnel access area according to the centroid position information;
and obtaining a personnel in-out detection result according to the track information of the target personnel area in the personnel in-out area.
In some embodiments, the determining, according to the pixel points and the temperature values corresponding to the pixel points in a one-to-one manner, the target person in the thermal image and the position information of the target person on the thermal image includes:
calculating a temperature division threshold;
setting the pixel value corresponding to the temperature value larger than the temperature segmentation threshold as a foreground pixel value;
acquiring a target personnel area according to the foreground pixel value;
extracting geometric shape information of the target personnel area;
determining location information of the target person area on the thermal image based on the geometry information.
In some embodiments, the calculating the temperature split threshold comprises:
calculating the upper quartile and the quartile interval of the temperature value corresponding to the pixel point;
and calculating the temperature segmentation threshold according to the upper quartile and the interquartile distance.
In some embodiments, the obtaining trajectory information of the target person in the person entering and exiting area according to the centroid position information includes:
acquiring a heat source target set, wherein the heat source target set comprises centroid position information of at least two existing target personnel areas;
calculating a centroid distance between each existing target person region in the set of heat source targets and a target person region to be confirmed;
updating the existing target personnel area according to the centroid distance to obtain an updated target personnel area so as to update the heat source target set;
and obtaining the track information corresponding to the existing target personnel area according to the existing target personnel area and the updated target personnel area.
In some embodiments, the updating the existing target person area according to the centroid distance to obtain an updated target person area to update the heat source target set includes:
selecting a target person area to be determined which is closest to the existing target person area from the centroid distance as an updated target person area;
judging whether redundant new targets exist in the target personnel area to be determined;
and if redundant new targets exist in the target personnel area to be determined, updating the heat source target set based on the new targets and the updated target personnel area.
In some embodiments, said updating said set of heat source targets comprises:
and in the updated heat source target set, if the existing target personnel area does not update the centroid coordinate, the existing target personnel area without updating the centroid coordinate is cancelled.
In some embodiments, the personnel access area comprises a preset entry demarcation and a preset exit demarcation; the obtaining of the personnel entering and exiting detection result according to the trajectory information of the target personnel area in the personnel entering and exiting area comprises the following steps:
traversing each target person region in the set of heat source targets;
binding an entering boolean variable and an exiting boolean variable on each of the target person areas;
identifying whether the track information of the target personnel area crosses the preset entering boundary or not;
if the track information of the target person area crosses the preset entering boundary, identifying whether the track information of the target person area crosses the preset leaving boundary;
if the track information of the target person area crosses the preset departure boundary, recording a departure Boolean variable of the target person area to determine that the target person area is in a departure state.
In some embodiments, after said binding an entering boolean variable and an exiting boolean variable on each of said target person regions, said method further comprises:
identifying whether the track information of the target person area crosses the preset departure boundary or not;
if the track information of the target person area crosses the preset departure boundary, identifying whether the track information of the target person area crosses the preset departure boundary;
if the track information of the target personnel area is identified to cross the preset entering boundary, recording an entering Boolean variable of the target personnel area so as to determine that the target personnel area is in an entering state.
In some embodiments, the method further comprises:
if the pixel point has a pixel value with an individual pixel error, calculating the average value of normal pixel values, wherein the normal pixel values are the normal pixel values of the neighborhood of the pixel value with the pixel error;
the average value is filled with the pixel value of the pixel error.
In a second aspect, an embodiment of the present invention provides a device for detecting entry and exit of people, where the device includes:
the thermal image acquisition module is used for acquiring a plurality of thermal images of the entering and exiting areas of the person to be detected; each thermal image comprises a plurality of pixel points and temperature values corresponding to the pixel points one by one;
the target determining module is used for determining target personnel in the thermal image and position information of the target personnel on the thermal image according to the pixel points and the temperature values corresponding to the pixel points one by one;
the centroid determining module is used for determining centroid position information of the target personnel according to the position information;
the track acquisition module is used for acquiring track information of the target person in the person access area according to the centroid position information;
and the in-out detection module is used for obtaining a personnel in-out detection result according to the track information of the target personnel area in the personnel in-out area.
In a third aspect, an embodiment of the present invention provides a device for detecting entry and exit of people, where the device for detecting entry and exit of people includes:
at least one processor, and
a memory communicatively coupled to the at least one processor, the memory storing instructions executable by the at least one processor to enable the at least one processor to perform the method described above.
In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium, which stores computer-executable instructions that, when executed by a person entry and exit detection apparatus, cause the person entry and exit detection apparatus to perform the method described above.
According to the personnel in-out detection method, the personnel in-out detection device and the personnel in-out detection equipment, a plurality of thermal images of a to-be-detected personnel in-out area are obtained in a low-cost infrared thermal imaging mode; each thermal image comprises a plurality of pixel points and temperature values corresponding to the pixel points one by one; then, determining target personnel in the thermal image and position information of the target personnel on the thermal image according to the pixel points and the temperature values corresponding to the pixel points one by one, so as to determine a human body in the thermal image; determining the centroid position information of the target person according to the position information, and acquiring the track information of the target person in the person entering and exiting area according to the centroid position information to acquire the track of the human body; and obtaining a personnel in-out detection result according to the track information of the target personnel area in the personnel in-out area so as to identify the in-out state of the personnel. The mode that adopts infrared thermal imaging detects personnel business turn over, can effectively protect personnel privacy safety, and passes in and out regional orbit information at personnel through the target personnel region, obtains personnel business turn over testing result, and it is high to detect the precision, has low cost, privacy nature is good, detects the advantage that the precision is high, is fit for using at the house scene.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
FIG. 1 is a schematic view of a scenario of one embodiment of a person entry and exit detection method of the present invention;
FIG. 2 is a schematic flow chart diagram illustrating one embodiment of a person entry and exit detection method of the present invention;
FIG. 3 is a thermodynamic diagram of one embodiment of a person entry and exit detection method of the present invention;
FIG. 4 is a schematic diagram of attribute information for one embodiment of a people entry and exit detection method of the present invention;
FIG. 5 is a schematic illustration of a set of heat source targets for one embodiment of a person entry and exit detection method of the present invention;
FIG. 6 is a schematic illustration of a set of heat source targets of yet another embodiment of a person entry and exit detection method of the present invention;
FIG. 7 is a trajectory diagram of one embodiment of the person entry and exit detection method of the present invention;
FIG. 8 is a schematic structural view of one embodiment of the person entry and exit detection apparatus of the present invention;
fig. 9 is a schematic hardware configuration diagram of a controller in an embodiment of the human entry and exit detection apparatus of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. 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.
The personnel entry and exit detection method and the personnel entry and exit detection device provided by the embodiment of the invention can be applied to personnel entry and exit detection equipment.
It can be understood that, in the personnel business turn over check out test set, be provided with the controller, as the master control center, adopt low-cost infrared thermal imaging technique, effectively protect personnel's privacy, acquire personnel's orbit to pass through the business turn over of orbit detection personnel, detect the precision height.
And, in this personnel passed in and out check out test set, still be equipped with infrared thermal imaging collection module, infrared ray array sensor transmission infrared ray that has low cost, low resolution characteristics, cooperation infrared thermal imaging camera, set up infrared thermal imaging collection module in the higher house scene of privacy, install infrared thermal imaging collection module on the gate toward the roof of indoor direction apart from a distance of door frame, if apart from the door frame 30cm, infrared thermal imaging collection module's thermal image collection scope is shown as figure 1, thermal image collection scope includes the region of predetermineeing into the boundary and predetermineeing to leave between the boundary. It is understood that the thermal image acquisition range is human ingress and egress.
The personnel entry and exit detection device is also provided with a Detector, a Tracker trajectory Tracker and a Counter. The Detector is used for determining a target person area in the thermal image and position information of the target person area on the thermal image according to the pixel points and the temperature values corresponding to the pixel points one by one; determining the centroid position information of the target personnel area according to the position information; the Tracker is used for acquiring the track information of the target personnel area in the personnel entering and exiting area according to the centroid position information; and the Counter is used for obtaining a personnel in-out detection result according to the track information of the target personnel area in the personnel in-out area.
Referring to fig. 2, fig. 2 is a schematic flow chart of a method for detecting people entering and exiting according to an embodiment of the present invention, where the method may be executed by the controller 13 in the equipment for detecting people entering and exiting, and as shown in fig. 2, the method includes steps S201 to S205.
S201: acquiring a plurality of thermal images of a person to be detected entering and exiting an area; each thermal image comprises a plurality of pixel points and temperature values corresponding to the pixel points one by one.
Specifically, an infrared thermal imaging acquisition module is installed on a roof at a distance from a door frame in the indoor direction at a doorway, and is used for acquiring infrared thermal imaging data, wherein the infrared thermal imaging data can be an infrared thermal imaging video and/or an infrared thermal imaging picture, and the infrared thermal imaging data are a plurality of thermal images of a person to be detected in and out of an area as shown in fig. 1. Taking an infrared thermal imaging video as an example, when the acquisition frame rate of the infrared array sensor is 8, that is, the sampling rate is 8Hz, 8 pictures are contained in each second of the infrared thermal imaging video; each picture comprises 32 × 24 pixel points, and the value of each pixel point is the temperature value of the corresponding position of the picture. When single-frame infrared thermal imaging data is acquired, one frame of data is acquired from the infrared thermal imaging device each time, the length of the data is 32 × 24 to 768, the 768 data is the distribution of the zone temperature values in the irradiation range of the infrared thermal imaging camera, and the single-frame data is recorded as an array A [ m ] [ n ], wherein m is 24, and n is 32.
When a plurality of thermal images of a person to be detected entering and exiting an area are obtained, a plurality of pixel points included by each thermal image and temperature values corresponding to the pixel points one by one are obtained, and the distribution range of heat and specific temperature value size information on the thermal images can be known through analyzing the plurality of thermal images.
In some embodiments, after acquiring the plurality of thermal images, the plurality of thermal images may need to be preprocessed to facilitate subsequent separation of the target person region of the human body from the background, the method further comprising:
if the pixel point has a pixel value with an individual pixel error, calculating the average value of normal pixel values, wherein the normal pixel values are the normal pixel values of the neighborhood of the pixel value with the pixel error;
the average value is filled with the pixel value of the pixel error.
Specifically, due to the problems of the infrared thermal imaging acquisition module, a phenomenon that an individual pixel value is wrong may occur, such as a non-digital or abnormally large pixel value, and the thermal image needs to be preprocessed based on the assumption of smooth change of temperature, that is, if the pixel point has the pixel value with the individual pixel error, an average value of normal pixel values is calculated, and the normal pixel value is a normal pixel value in a neighborhood of the pixel value with the pixel error, that is, the normal pixel value exists in a neighborhood around the pixel value with the individual pixel error, and the average value of the normal pixel values is calculated to fill the pixel value with the pixel error, so that the pixel point and a temperature value corresponding to the pixel point are in a smoothly changing state.
S202, determining target personnel in the thermal image and position information of the target personnel on the thermal image according to the pixel points and the temperature values corresponding to the pixel points one by one.
After the thermal image is preprocessed, the preprocessed thermal image is input into a Detector to determine a target person area corresponding to the human body.
Since the temperature of the human body is usually higher than the ambient temperature, in some embodiments, determining the target person in the thermal image and the position information of the target person on the thermal image according to the pixel points and the temperature values corresponding to the pixel points one by one may include:
calculating a temperature division threshold;
setting the pixel value corresponding to the temperature value larger than the temperature segmentation threshold as a foreground pixel value;
acquiring a target personnel area according to the foreground pixel value;
extracting geometric shape information of the target personnel area;
determining location information of the target person area on the thermal image based on the geometry information.
Specifically, a temperature segmentation threshold is calculated, the temperature segmentation threshold may be 35 ℃, then, a pixel value corresponding to a temperature value greater than the temperature segmentation threshold is set as a foreground pixel value, that is, determined as a pixel value corresponding to a human body, and further, after obtaining a plurality of foreground pixel values, the plurality of foreground pixel values may be subjected to connected domain analysis to obtain a target person region, so that the human body is separated from the surrounding environment.
Because the target person region corresponding to the human body has the characteristics of small volume and high temperature, the target person region can be treated as an abnormal value, and then, the calculation of the temperature segmentation threshold is substantially an abnormal value detection algorithm. Outliers may be detected using the interquartile range IQR of the boxplot to provide a criterion for identifying outliers. In some of these embodiments, calculating the temperature split threshold may include:
calculating the upper quartile and the quartile interval of the temperature value corresponding to the pixel point;
and calculating the temperature segmentation threshold according to the upper quartile and the interquartile distance.
Specifically, an outlier (temperature split threshold) is defined as a value greater than QU +1.5 IQR. Therefore, the upper quartile QU and the quartile interval IQR of the temperature value corresponding to the pixel point are calculated, and then the temperature division threshold is calculated according to the upper quartile and the quartile interval, and specifically, the upper quartile QU and the quartile interval IQR are input into an abnormal value calculation formula to calculate the temperature division threshold. The abnormal value calculation formula is the following formula I:
t is QU +1.5IQR formula one;
wherein QU represents an upper quartile, IQR represents a quartile distance, and the quartile distance IQR is a difference between the upper quartile QU and a lower quartile QL.
After obtaining the temperature division threshold, setting a pixel value corresponding to the temperature value greater than the temperature division threshold as a foreground pixel value, for example, setting a pixel value having a temperature value greater than 35 ℃ as the foreground pixel value, or as shown in fig. 3b, setting a pixel value other than the foreground pixel value as a certain pixel value, for example, as 0, thereby setting a region other than the foreground pixel value as black; and then, acquiring a target person region according to the foreground pixel value, and specifically performing connected domain processing on the foreground pixel value to obtain the target person region, so that the target person region is highlighted from the background in the thermal image. As shown in fig. 3, 3a is a thermal image after preprocessing, and 3b is a thermodynamic diagram after determining the target person area.
After a target person region is obtained, extracting geometric shape information of the target person region; determining location information of the target person area on the thermal image based on the geometry information.
And S203, determining the centroid position information of the target person according to the position information.
S204: and acquiring the track information of the target personnel in the personnel access area according to the centroid position information.
In some embodiments, obtaining trajectory information of the target person in the person entry and exit area according to the centroid position information may include:
acquiring a heat source target set, wherein the heat source target set comprises centroid position information of at least two existing target personnel areas;
calculating a centroid distance between each existing target person region in the set of heat source targets and a target person region to be confirmed;
updating the existing target personnel area according to the centroid distance to obtain an updated target personnel area so as to update the heat source target set;
and obtaining the track information corresponding to the existing target personnel area according to the existing target personnel area and the updated target personnel area.
Specifically, as shown in fig. 4, geometric shape information of the target person area is extracted, where the geometric shape information is a Bounding rectangle frame Bounding Boxes in fig. 4, and is used for framing the target person area, and after the geometric shape information (the Bounding rectangle frame Bounding Boxes) is obtained, the centroid position information of the target person area is determined according to the geometric shape information (the Bounding rectangle frame Bounding Boxes), and is the centroid coordinate position Centroids of the rectangle frame. In fig. 4, there are two target person areas ID-1 and ID-2 on the thermal image of the current frame, and these two target person areas ID-1 and ID-2 are registered and recorded in the heat source target set existing _ targets.
After the centroid position information of the target personnel area is extracted, the centroid position information is input into a Tracker, the Tracker is used for updating the trajectory information of the target personnel area in real time, and the essence of the trajectory information is a historical value set of the centroid position information (x, y) coordinates of the target personnel area. The strategy of target tracking adopts a nearest centroid algorithm, and firstly, a heat source target set existing _ targets is initialized to be empty. Therefore, in fig. 4, in the infrared thermography data of the current frame, the two target person areas ID-1 and ID-2 are registered and recorded in the heat source target set existing _ targets, and in the infrared thermography data of the next frame, the centroid position information (x, y) of the corresponding target person area is output through the detector as well. Therefore, when passing in and out through thermal imaging detection personnel, the phenomenon of missed detection cannot occur, and the traditional detection mode based on the PIR pyroelectric infrared matched camera can cause the phenomenon of missed detection if the personnel to be detected walk side by side to enter a personnel passing-in and-out area.
As shown in fig. 5, ID-3, ID-4 are the existing target person areas in the heat source target set, and ID-5, ID-6, ID-7 are the centroid positions of the new target person areas output by the current frame passing through the detector.
Then, the centroid distance between each existing target person area in the heat source target set and the target person area to be confirmed is calculated, and the centroid distance can be calculated in a Euclidean distance mode, namely the centroid distances of ID-3 and ID-5, ID-6 and ID-7 and the centroid distances of ID-4 and ID-5, ID-6 and ID-7 are calculated. And then, updating the existing target personnel area according to the centroid distance to obtain an updated target personnel area so as to update the heat source target set.
In some embodiments, updating the existing target person area according to the centroid distance to obtain an updated target person area to update the heat source target set may include:
selecting a target person area to be determined which is closest to the existing target person area from the centroid distance as an updated target person area;
judging whether redundant new targets exist in the target personnel area to be determined;
and if redundant new targets exist in the target personnel area to be determined, updating the heat source target set based on the new targets and the updated target personnel area.
Specifically, after calculating the centroid distances between ID-3 and ID-5, ID-6, ID-7, and ID-4 and ID-5, ID-6, ID-7, respectively, the target person area to be determined closest to the existing target person area is selected as the updated target person area among the centroid distances, i.e., the target person area to be determined closest to ID-3 or ID-4 is selected among the centroid distances between ID-3 and ID-5, ID-6, ID-7, and ID-4 and ID-5, ID-6, ID-7, as shown in fig. 5, for example, the distance between ID-3 and ID-6 is closest, and the distance between ID-4 and ID-7 is closest, then ID-6 and ID-7 are taken as the centroid positions of the updated target person area, and ID-3 and ID-4 are old targets. It is obvious that when the number of existing target person areas in one heat source target set does not correspond to the number of target person areas to be determined, as in fig. 5, of 5 targets, 2 are existing targets and 3 are new targets to be determined, there must be a surplus of new target ID-5. Therefore, whether redundant new targets exist in the target personnel areas (ID-5, ID-6 and ID-7) to be determined or not needs to be judged, if yes, the heat source target set is updated based on the new targets (ID-5) and the updated target personnel areas (ID-6 and ID-7), and an updated heat source target set is obtained, wherein the updated heat source target set at least comprises (ID-5, ID-6 and ID-7).
For example, as shown in FIG. 6, ID-1 and ID-2 are both old targets (existing target person areas) in the existing _ targets heat source target set, and the arrows indicate the movement of the old targets (target person areas). ID-3 is a newly added object (object personnel area to be determined), and ID-3 is registered and added into the existing _ targets heat source object set.
In some embodiments, updating the set of heat source targets may include:
and in the updated heat source target set, if the existing target personnel area does not update the centroid coordinate, the existing target personnel area without updating the centroid coordinate is cancelled.
Specifically, if the existing target person region of the heat source target set corresponding to the continuous 5 frames of infrared thermal imaging data does not update the centroid coordinates thereof, the existing target person region without the updated centroid coordinates is cancelled, and the existing target person region without the updated centroid coordinates is removed from the heat source target set.
And after the heat source target set is continuously updated, obtaining the track information corresponding to the existing target personnel area according to the existing target personnel area and the updated target personnel area.
As shown in fig. 7, for the trajectory information corresponding to the centroid positions of the two target person areas, the tracking method of the centroid position information is adopted, so that the identification accuracy is higher.
S205: and obtaining a personnel in-out detection result according to the track information of the target personnel area in the personnel in-out area.
Specifically, the personnel access area comprises a preset access boundary and a preset exit boundary; the entering and exiting can be judged according to the sequence of crossing the preset entering boundary Line and the preset leaving boundary Line, if the person crosses the preset entering boundary Line In Line firstly and then crosses the preset leaving boundary Line Out Line, the person is considered to be In the outgoing state, and if the person crosses the preset leaving boundary Line Out Line firstly and then crosses the preset entering boundary Line In Line, the person is considered to be In the entering state.
In some of these embodiments, the personnel access area includes a preset entry demarcation and a preset exit demarcation; obtaining a person entering and exiting detection result according to the trajectory information of the target person area in the person entering and exiting area, may include:
traversing each target person region in the set of heat source targets;
binding an entering boolean variable and an exiting boolean variable on each of the target person areas;
identifying whether the track information of the target personnel area crosses the preset entering boundary or not;
if the track information of the target person area crosses the preset entering boundary, identifying whether the track information of the target person area crosses the preset leaving boundary;
if the track information of the target person area crosses the preset departure boundary, recording a departure Boolean variable of the target person area to determine that the target person area is in a departure state.
Specifically, due to the fact that the heat source target set is track information generated by the centroid positions of the multiple target personnel areas, after the heat source target set is obtained, each target personnel area in the heat source target set is traversed, and when each new target is registered in the heat source target set, the entering boolean variable in _ pass and the leaving boolean variable out _ pass are bound to the new target and used for identifying whether the new target crosses a line or not. And identifying whether the trajectory information of the target person region crosses the preset entering boundary, if so, identifying whether the trajectory information of the target person region crosses the preset leaving boundary, and if so, recording a leaving boolean variable out _ pass of the target person region to determine that the target person region is in a leaving state, namely, determining that a person crosses the preset entering boundary first and then crosses the preset leaving boundary, thereby identifying that the person leaves.
Correspondingly, in order to judge the entering state of the personnel, whether the track information of the target personnel area crosses the preset departure boundary is identified; if the track information of the target person area crosses the preset departure boundary, identifying whether the track information of the target person area crosses the preset departure boundary; if the track information of the target person area is recognized to cross the preset entering boundary, recording an entering Boolean variable of the target person area to determine that the target person area is in an entering state, namely determining that a person firstly crosses the preset leaving boundary and then crosses the preset entering boundary, and recognizing that the person enters.
According to the embodiment of the application, a low-cost infrared thermal imaging mode is adopted to obtain a plurality of thermal images of the entering and exiting areas of the person to be detected; each thermal image comprises a plurality of pixel points and temperature values corresponding to the pixel points one by one; then, determining target personnel in the thermal image and position information of the target personnel on the thermal image according to the pixel points and temperature values corresponding to the pixel points one by one, so as to determine a human body in infrared thermal imaging data; determining the centroid position information of the target person according to the position information, and acquiring the track information of the target person in the person entering and exiting area according to the centroid position information to acquire the track of the human body; and obtaining a personnel in-out detection result according to the track information of the target personnel area in the personnel in-out area so as to identify the in-out state of the personnel. The mode that adopts infrared thermal imaging detects personnel business turn over, can effectively protect personnel privacy safety, and passes in and out regional orbit information at personnel through the target personnel region, obtains personnel business turn over testing result, and it is high to detect the precision, has low cost, privacy nature is good, detects the advantage that the precision is high, is fit for using at the house scene.
Correspondingly, as shown in fig. 8, an embodiment of the present invention further provides a device for detecting entry and exit of people, which can be used for a device for detecting entry and exit of people, where the device 800 for detecting entry and exit of people includes:
a thermal image acquisition module 801, configured to acquire a plurality of thermal images of an entering and exiting area of a person to be detected; each thermal image comprises a plurality of pixel points and temperature values corresponding to the pixel points one by one;
a target determining module 802, configured to determine, according to the pixel points and temperature values corresponding to the pixel points one to one, target persons in the thermal image and location information of the target persons on the thermal image;
a centroid determining module 803, configured to determine centroid location information of the target person according to the location information;
a trajectory acquisition module 804, configured to acquire trajectory information of the target person in the person entry and exit area according to the centroid position information;
and an entry and exit detection module 805, configured to obtain a person entry and exit detection result according to trajectory information of the target person area in the person entry and exit area.
According to the embodiment of the invention, a low-cost infrared thermal imaging mode is adopted to obtain a plurality of thermal images of the entering and exiting areas of the personnel to be detected; each thermal image comprises a plurality of pixel points and temperature values corresponding to the pixel points one by one; then, determining target personnel in the thermal image and position information of the target personnel on the thermal image according to the pixel points and temperature values corresponding to the pixel points one by one, so as to determine a human body in infrared thermal imaging data; determining the centroid position information of the target person according to the position information, and acquiring the track information of the target person in the person entering and exiting area according to the centroid position information to acquire the track of the human body; and obtaining a personnel in-out detection result according to the track information of the target personnel area in the personnel in-out area so as to identify the in-out state of the personnel. The mode that adopts infrared thermal imaging detects personnel business turn over, can effectively protect personnel privacy safety, and passes in and out regional orbit information at personnel through the target personnel region, obtains personnel business turn over testing result, and it is high to detect the precision, has low cost, privacy nature is good, detects the advantage that the precision is high, is fit for using at the house scene.
In other embodiments, the targeting module 802 is further configured to:
calculating a temperature division threshold;
setting the pixel value corresponding to the temperature value larger than the temperature segmentation threshold as a foreground pixel value;
acquiring a target personnel area according to the foreground pixel value;
extracting geometric shape information of the target personnel area;
determining location information of the target person area on the thermal image based on the geometry information.
In other embodiments, the targeting module 802 is further configured to:
calculating the upper quartile and the quartile interval of the temperature value corresponding to the pixel point;
and calculating the temperature segmentation threshold according to the upper quartile and the interquartile distance.
In some embodiments, the trajectory acquisition module 804 is further configured to:
acquiring a heat source target set, wherein the heat source target set comprises centroid position information of at least two existing target personnel areas;
calculating a centroid distance between each existing target person region in the set of heat source targets and a target person region to be confirmed;
updating the existing target personnel area according to the centroid distance to obtain an updated target personnel area so as to update the heat source target set;
and obtaining the track information corresponding to the existing target personnel area according to the existing target personnel area and the updated target personnel area.
In some embodiments, the trajectory acquisition module 804 is further configured to:
selecting a target person area to be determined which is closest to the existing target person area from the centroid distance as an updated target person area;
judging whether redundant new targets exist in the target personnel area to be determined;
and if redundant new targets exist in the target personnel area to be determined, updating the heat source target set based on the new targets and the updated target personnel area.
In some embodiments, the trajectory acquisition module 804 is further configured to:
and in the updated heat source target set, if the existing target personnel area does not update the centroid coordinate, the existing target personnel area without updating the centroid coordinate is cancelled.
In some embodiments, the access detection module 805 is further configured to:
traversing each target person region in the set of heat source targets;
binding an entering boolean variable and an exiting boolean variable on each of the target person areas;
identifying whether the track information of the target personnel area crosses the preset entering boundary or not;
if the track information of the target person area crosses the preset entering boundary, identifying whether the track information of the target person area crosses the preset leaving boundary;
if the track information of the target person area crosses the preset departure boundary, recording a departure Boolean variable of the target person area to determine that the target person area is in a departure state.
In some embodiments, the access detection module 805 is further configured to:
identifying whether the track information of the target person area crosses the preset departure boundary or not;
if the track information of the target person area crosses the preset departure boundary, identifying whether the track information of the target person area crosses the preset departure boundary;
if the track information of the target personnel area is identified to cross the preset entering boundary, recording an entering Boolean variable of the target personnel area so as to determine that the target personnel area is in an entering state.
In some embodiments, the apparatus 800 further comprises a filling module 806, further configured to:
if the pixel point has a pixel value with an individual pixel error, calculating the average value of normal pixel values, wherein the normal pixel values are the normal pixel values of the neighborhood of the pixel value with the pixel error;
the average value is filled with the pixel value of the pixel error.
It should be noted that the above-mentioned apparatus can execute the method provided by the embodiments of the present application, and has corresponding functional modules and beneficial effects for executing the method. For technical details which are not described in detail in the device embodiments, reference is made to the methods provided in the embodiments of the present application.
Fig. 9 is a schematic diagram of a hardware structure of a controller in an embodiment of the human entry and exit detection apparatus, and as shown in fig. 9, the controller 13 includes:
one or more processors 131, memory 132. Fig. 9 illustrates an example of one processor 131 and one memory 132.
The processor 131 and the memory 132 may be connected by a bus or other means, and fig. 9 illustrates the connection by the bus as an example.
The memory 132, as a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the person entry and exit detection method in the embodiment of the present application (for example, the thermal image acquisition module 801, the target determination module 802, the centroid determination module 803, the trajectory acquisition module 804, the entry and exit detection module 805, and the filling module 806 shown in fig. 8). The processor 131 executes various functional applications and data processing of the controller, that is, implementing the people entry and exit detection method of the above method embodiment, by running the nonvolatile software program, instructions and modules stored in the memory 132.
The memory 132 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the person entry and exit detection apparatus, and the like. Further, the memory 132 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 132 may optionally include memory located remotely from processor 131, which may be connected to the human entry and exit detection device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory 132 and, when executed by the one or more processors 131, perform the people entry and exit detection method in any of the above-described method embodiments, e.g., performing the above-described method steps S201-S205 in fig. 2; the functions of blocks 801 and 806 in fig. 8 are implemented.
The product can execute the method provided by the embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the methods provided in the embodiments of the present application.
Embodiments of the present application provide a non-transitory computer-readable storage medium, which stores computer-executable instructions, which are executed by one or more processors, such as one of the processors 131 in fig. 9, and enable the one or more processors to perform the method for detecting human entry and exit in any of the method embodiments, such as the method steps S201 to S205 in fig. 2 described above; the functions of blocks 801 and 806 in fig. 8 are implemented.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that the embodiments may be implemented by software plus a general hardware platform, and may also be implemented by hardware. It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a computer readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; within the idea of the invention, also technical features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (12)

1. A method of personnel entry and exit detection, the method comprising:
acquiring a plurality of thermal images of a person to be detected entering and exiting an area; each thermal image comprises a plurality of pixel points and temperature values corresponding to the pixel points one by one;
determining a target personnel area in the thermal image and position information of the target personnel area on the thermal image according to the pixel points and the temperature values corresponding to the pixel points one by one;
determining the centroid position information of the target personnel area according to the position information;
acquiring track information of the target personnel area in the personnel access area according to the centroid position information;
and obtaining a personnel in-out detection result according to the track information of the target personnel area in the personnel in-out area.
2. The method of claim 1, wherein said determining the target person area in the thermal image and the location information of the target person area on the thermal image based on the pixel points and the temperature values corresponding to the pixel points one-to-one comprises:
calculating a temperature division threshold;
setting the pixel value corresponding to the temperature value larger than the temperature segmentation threshold as a foreground pixel value;
acquiring a target personnel area according to the foreground pixel value;
extracting geometric shape information of the target personnel area;
determining location information of the target person area on the thermal image based on the geometry information.
3. The method of claim 2, wherein the calculating the temperature split threshold comprises:
calculating the upper quartile and the quartile interval of the temperature value corresponding to the pixel point;
and calculating the temperature segmentation threshold according to the upper quartile and the interquartile distance.
4. The method of claim 1, wherein the obtaining trajectory information of the target person area in the person entry and exit area according to the centroid location information comprises:
acquiring a heat source target set, wherein the heat source target set comprises centroid position information of at least two existing target personnel areas;
calculating a centroid distance between each existing target person region in the set of heat source targets and a target person region to be confirmed;
updating the existing target personnel area according to the centroid distance to obtain an updated target personnel area so as to update the heat source target set;
and obtaining the track information corresponding to the existing target personnel area according to the existing target personnel area and the updated target personnel area.
5. The method of claim 4, wherein updating existing target person areas according to the centroid distance to obtain updated target person areas to update the set of heat source targets comprises:
selecting a target person area to be determined which is closest to the existing target person area from the centroid distance as an updated target person area;
judging whether redundant new targets exist in the target personnel area to be determined;
and if redundant new targets exist in the target personnel area to be determined, updating the heat source target set based on the new targets and the updated target personnel area.
6. The method of claim 5, wherein the updating the set of heat source targets comprises:
and in the updated heat source target set, if the existing target personnel area does not update the centroid coordinate, the existing target personnel area without updating the centroid coordinate is cancelled.
7. The method of claim 4, wherein the personnel access area comprises a pre-defined entry demarcation line and a pre-defined exit demarcation line; the obtaining of the personnel entering and exiting detection result according to the trajectory information of the target personnel area in the personnel entering and exiting area comprises the following steps:
traversing each target person region in the set of heat source targets;
binding an entering boolean variable and an exiting boolean variable on each of the target person areas;
identifying whether the track information of the target personnel area crosses the preset entering boundary or not;
if the track information of the target person area crosses the preset entering boundary, identifying whether the track information of the target person area crosses the preset leaving boundary;
if the track information of the target person area crosses the preset departure boundary, recording a departure Boolean variable of the target person area to determine that the target person area is in a departure state.
8. The method of claim 7, wherein after said binding an entering boolean variable and an exiting boolean variable on each of said target person regions, said method further comprises:
identifying whether the track information of the target person area crosses the preset departure boundary or not;
if the track information of the target person area crosses the preset departure boundary, identifying whether the track information of the target person area crosses the preset departure boundary;
if the track information of the target personnel area is identified to cross the preset entering boundary, recording an entering Boolean variable of the target personnel area so as to determine that the target personnel area is in an entering state.
9. The method according to any one of claims 1-8, further comprising:
if the pixel point has a pixel value with an individual pixel error, calculating the average value of normal pixel values, wherein the normal pixel values are the normal pixel values of the neighborhood of the pixel value with the pixel error;
the average value is filled with the pixel value of the pixel error.
10. A personnel access detection device, said device comprising:
the thermal image acquisition module is used for acquiring a plurality of thermal images of the entering and exiting areas of the person to be detected; each thermal image comprises a plurality of pixel points and temperature values corresponding to the pixel points one by one;
the target determining module is used for determining target personnel in the thermal image and position information of the target personnel on the thermal image according to the pixel points and the temperature values corresponding to the pixel points one by one;
the centroid determining module is used for determining centroid position information of the target personnel area according to the position information;
the track acquisition module is used for acquiring track information of the target person in the person access area according to the centroid position information;
and the in-out detection module is used for obtaining a personnel in-out detection result according to the track information of the target personnel area in the personnel in-out area.
11. A personnel access detection device, characterized in that said personnel access detection device comprises:
at least one processor, and
a memory communicatively coupled to the processor, the memory storing instructions executable by the at least one processor to enable the at least one processor to perform the method of any of claims 1-9.
12. A non-transitory computer-readable storage medium storing computer-executable instructions that, when executed by a human entry and exit detection device, cause the human entry and exit detection device to perform the method of any one of claims 1-9.
CN202111012779.5A 2021-08-31 2021-08-31 Personnel entry and exit detection method, device, equipment and medium Pending CN113762126A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111012779.5A CN113762126A (en) 2021-08-31 2021-08-31 Personnel entry and exit detection method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111012779.5A CN113762126A (en) 2021-08-31 2021-08-31 Personnel entry and exit detection method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN113762126A true CN113762126A (en) 2021-12-07

Family

ID=78792113

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111012779.5A Pending CN113762126A (en) 2021-08-31 2021-08-31 Personnel entry and exit detection method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN113762126A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116245911A (en) * 2023-02-08 2023-06-09 珠海安联锐视科技股份有限公司 Video offline statistics method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116245911A (en) * 2023-02-08 2023-06-09 珠海安联锐视科技股份有限公司 Video offline statistics method
CN116245911B (en) * 2023-02-08 2023-11-03 珠海安联锐视科技股份有限公司 Video offline statistics method

Similar Documents

Publication Publication Date Title
CN109461168B (en) Target object identification method and device, storage medium and electronic device
US10147195B2 (en) Object detection along pre-defined trajectory
Snidaro et al. Video security for ambient intelligence
CN104303193B (en) Target classification based on cluster
US10853664B2 (en) Device and method for detecting abnormal situation
WO2021170030A1 (en) Method, device, and system for target tracking
US20030053659A1 (en) Moving object assessment system and method
WO2021139049A1 (en) Detection method, detection apparatus, monitoring device, and computer readable storage medium
KR20060090554A (en) A surveillance apparatus and surveillance system
KR20130097868A (en) Intelligent parking management method and system based on camera
CN111163285A (en) High-altitude falling object monitoring method and system and computer readable storage medium
KR20190046351A (en) Method and Apparatus for Detecting Intruder
CN110255318B (en) Method for detecting idle articles in elevator car based on image semantic segmentation
CN108122412B (en) Method for monitoring robot to detect vehicle disorderly stop
CN112270253A (en) High-altitude parabolic detection method and device
US20190096066A1 (en) System and Method for Segmenting Out Multiple Body Parts
US20210374426A1 (en) Occupancy control apparatus
CN113762126A (en) Personnel entry and exit detection method, device, equipment and medium
CN111739332B (en) Parking lot management system
CN111597919A (en) Human body tracking method in video monitoring scene
CN111277789A (en) Video-based community security method and device, electronic equipment and storage medium
KR102434154B1 (en) Method for tracking multi target in traffic image-monitoring-system
CN110400329B (en) People flow counting method and system
CN114219825A (en) Target contact force tracking method and system under multiple photoelectric distributed deployments
CN112802058A (en) Method and device for tracking illegal moving target

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