CN112101151B - Method and related device for detecting whether human body exists in fixed area - Google Patents

Method and related device for detecting whether human body exists in fixed area Download PDF

Info

Publication number
CN112101151B
CN112101151B CN202010903018.8A CN202010903018A CN112101151B CN 112101151 B CN112101151 B CN 112101151B CN 202010903018 A CN202010903018 A CN 202010903018A CN 112101151 B CN112101151 B CN 112101151B
Authority
CN
China
Prior art keywords
heat source
video frame
human body
frame image
fixed area
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
CN202010903018.8A
Other languages
Chinese (zh)
Other versions
CN112101151A (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.)
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 CN202010903018.8A priority Critical patent/CN112101151B/en
Publication of CN112101151A publication Critical patent/CN112101151A/en
Application granted granted Critical
Publication of CN112101151B publication Critical patent/CN112101151B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/41Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/46Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/48Matching video sequences

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the invention discloses a method for detecting whether a human body exists in a fixed area or not and a related device, wherein whether a moving human body heat source exists in a target video frame image or not is determined by utilizing a video segment, so that the determination of whether the moving human body heat source exists in the fixed area or not can be effectively realized based on the characteristics of the moving human body heat source in the video segment, and further, the accuracy of detecting the existence of the human body can be further improved by setting a heat source list for storing the central point coordinates of the moving human body heat source in continuous video frame images, so that whether the moving human body heat source exists in the fixed area or not can be further determined according to the central point coordinates in the heat source list under the condition that the moving human body heat source does not exist is determined.

Description

Method and related device for detecting whether human body exists in fixed area
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method and an apparatus for detecting whether a human body exists in a fixed area.
Background
With the rapid development of social economy and the increasing of comprehensive national force, the living standard of people is gradually improved, and the demand for living safety is increased, so that the monitoring of living environment is an important part of living safety.
The infrared thermal imaging device can sense the temperature of objects in the monitored environment range and is also applied to safety monitoring to detect whether human bodies exist or not. However, there are many interference heat sources in the current environment, which can affect the accuracy of detecting whether the human body exists, for example, if a large number of dense high-temperature areas such as hot water basin filled with hot water, ground after bath, wood floor irradiated by sunlight and the like are encountered, the imaging area of the interference heat sources is close to the imaging area of the human body, and is difficult to distinguish from the human body, thus reducing the accuracy of detecting the human body.
Disclosure of Invention
The invention mainly aims to provide a method and a related device for detecting whether a human body exists in a fixed area or not, which can effectively improve the accuracy of detecting the existence of the human body.
To achieve the above object, a first aspect of the present invention provides a method for detecting whether a human body exists in a fixed area, the method comprising:
acquiring a video segment corresponding to a fixed area, wherein the video segment is obtained by performing thermal imaging on the fixed area, the video segment comprises continuous multi-frame video frame images, and pixel values of pixel points in the video frame images are temperature values;
Determining whether a moving human body heat source exists in a target video frame image according to the video segment, wherein the target video frame image is the last frame of video frame image in the video segment;
if the moving human body heat source exists, determining that the moving human body exists in the fixed area, and adding the center point coordinates of the moving human body heat source in the target video frame image to a preset heat source list, wherein the heat source list is used for storing the center point coordinates of the moving human body heat source in continuous video frame images;
and if the fact that the heat source of the moving human body does not exist is determined, determining whether the non-moving human body exists in the fixed area according to the heat source list.
To achieve the above object, a second aspect of the present invention provides a device for detecting whether a human body exists in a fixed area, the device comprising:
the device comprises an acquisition module, a temperature detection module and a control module, wherein the acquisition module is used for acquiring a video segment corresponding to a fixed area, the video segment is obtained by performing thermal imaging on the fixed area, the video segment comprises continuous multi-frame video frame images, and pixel values of pixel points in the video frame images are temperature values;
the first determining module is used for determining whether a moving human body heat source exists in a target video frame image according to the video segment, wherein the target video frame image is the last frame of video frame image in the video segment;
The determining and adding module is used for determining that a moving human body exists in the fixed area if the moving human body heat source exists, adding the center point coordinates of the moving human body heat source in the target video frame image to a preset heat source list, and storing the center point coordinates of the moving human body heat source in the continuous video frame image;
and the second determining module is used for determining whether the non-moving human body exists in the fixed area according to the heat source list if the non-moving human body heat source exists.
To achieve the above object, a third aspect of the present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the respective steps in the detection method of whether or not a human body is present in a fixed area as described in the first aspect.
The embodiment of the invention has the following beneficial effects:
the invention provides a detection method for whether a human body exists in a fixed area or not, which comprises the steps of acquiring a video segment corresponding to the fixed area, wherein the video segment is obtained by performing thermal imaging on the fixed area, the video segment comprises continuous multi-frame video frame images, and pixel values of pixel points in the video frame images are temperature values; determining whether a moving human body heat source exists in a target video frame image according to the video segment, wherein the target video frame image is the last frame of video frame image in the video segment; if the moving human body heat source exists, determining that the moving human body exists in the fixed area, and adding the center point coordinates of the moving human body heat source in the target video frame image into a preset heat source list, wherein the heat source list is used for storing the center point coordinates of the moving human body heat source in the continuous video frame image; if the fact that the heat source of the moving human body does not exist is determined, whether the non-moving human body exists in the fixed area or not is determined according to the heat source list. Whether the moving human body heat source exists in the target video frame image or not is determined by utilizing the video segment, so that whether the moving human body heat source exists in the fixed area or not can be determined based on the characteristics of the moving human body heat source in the video segment, and further, by setting a heat source list for storing the central point coordinates of the moving human body heat source in the continuous video frame images, whether the moving human body exists in the fixed area or not can be determined according to the central point coordinates in the heat source list under the condition that the moving human body heat source does not exist is determined, and the accuracy of detecting the existence of the human body is further improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Wherein:
fig. 1 is a flow chart of a method for detecting whether a human body exists in a fixed area according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a method for detecting whether a human body exists in a fixed area according to an embodiment of the present invention;
fig. 3 is a block diagram of a device for detecting whether a human body exists in a fixed area according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the prior art, the imaging area of the interference heat source is close to the imaging area of the human body, so that the interference heat source is difficult to distinguish from the human body, and the accuracy of detecting the existence of the human body is reduced.
In order to solve the above-mentioned problems, the present application provides a method for detecting whether a human body exists in a fixed area, and through creative efforts, the present inventors confirm that an interfering heat source is usually a fixed heat source, i.e. it does not move after a certain position, and a human body heat source is a heat source which moves frequently, so that the interfering heat source and the moving human body heat source can be effectively distinguished by detecting the moving human body heat source, so as to realize whether the human body exists. In addition, considering that an unmovable human body heat source is possible to exist, a heat source list is set, and the heat source list is used for storing central coordinate points of the movable human body heat sources in continuous video frame images, so that the access condition of the human body heat sources in a fixed area can be counted to further determine whether the unmovable human body exists or not.
Referring to fig. 1, a flow chart of a method for detecting whether a human body exists in a fixed area according to an embodiment of the invention is shown, and the method includes:
step 101, obtaining a video segment corresponding to a fixed area, wherein the video segment is obtained by performing thermal imaging on the fixed area, and comprises continuous multi-frame video frame images, and pixel values of pixel points in the video frame images are temperature values;
in the embodiment of the invention, there is a need to detect whether a human body exists in a fixed area, which may be a closed space area with at least one entrance, for example, a bathroom, a primary sleeping, a secondary sleeping, a conference room, etc. And the fixed area is internally provided with a thermal imaging device, the thermal imaging device can perform thermal imaging on the fixed area, the thermal imaging device uses an infrared thermal imaging technology, the infrared thermal imaging technology can detect infrared specific wave band signals of object thermal radiation based on a photoelectric technology, the signals can be converted into images which can be distinguished by human vision, and further a temperature value is calculated, so that the video segment comprises continuous multi-frame video frame images, and the pixel value of each pixel point in the video frame images is the temperature value. It will be appreciated that by using infrared thermal imaging techniques, so that humans go beyond vision impairment, the temperature profile of the object surface can be seen.
It will be appreciated that when detecting whether a human body is present in a fixed area, it is necessary to obtain video segments corresponding to the same angle range at the same shooting angle, and therefore, when the thermal imaging apparatus is set, the shooting angle of the thermal imaging apparatus is fixed, and at least when it is used to detect a certain fixed area, the shooting angle thereof is fixed. For example, if desired to be installed in a room, it may be installed in the center directly above the roof of the room with the thermal imaging device shining vertically downward, with a height from the ground of between 2.5m and 3.3 m.
102, determining whether a moving human body heat source exists in a target video frame image according to a video segment, wherein the target video frame image is the last frame of video frame image in the video segment;
in the embodiment of the invention, the video segment may be a historical video segment, for example, a stored video segment imaged by the thermal imaging device in a certain time period may be read, so that whether a human body exists in a fixed area in a certain time period in the past can be detected, or a real-time video segment, that is, a video segment imaged by the thermal imaging device is obtained in real time.
When detecting whether a human body exists in a fixed area, it is usually determined that a certain fixed video frame image in a video segment exists, and when determining whether a moving human body heat source exists, it is required to use a video frame image before the target video frame image, so that the last video frame image of the video segment can be designed to be the target video frame image. It will be appreciated that when the video segment is a video segment acquired in real time, the target video frame image may also be referred to as a current frame video frame image.
In the embodiment of the invention, whether the moving human body heat source exists in the target video frame image or not is determined according to the video segment, and it is required to be noted that when the video segment is used for determining whether the moving human body heat source exists in the target video frame image or not, the positions of the moving human body heat source in different frames are different in consideration of the moving human body heat source in a fixed area, the positions of the non-moving heat source in different frames are the same in the fixed area, and the change of pixel values is smaller, so that the characteristic can be utilized, and the non-moving heat source (including the interference heat source and the non-moving human body heat source) in the target video frame image can be removed by processing the pixel values of the pixel points in the same position in different frames of the video segment. It will be appreciated that in the case where it is determined that a moving human heat source is present, it is indicated that a human is necessarily present in the fixed area, whereas in the case where it is determined that a moving human heat source is not present, it is indicated that only a moving human is not present in the fixed area, and further determination may be made as to whether or not a non-moving human is present.
Step 103, if the existence of the moving human body heat source is determined, determining that the moving human body exists in the fixed area, and adding the center point coordinates of the moving human body heat source in the target video frame image to a preset heat source list, wherein the heat source list is used for storing the center point coordinates of the moving human body heat source in the continuous video frame image;
Step 104, if it is determined that the heat source of the moving human body does not exist, determining whether the non-moving human body exists in the fixed area according to the heat source list.
In the embodiment of the invention, after the video segment is utilized to determine whether the moving human body heat source exists in the target video frame image, if the moving human body heat source exists, the moving human body exists in the fixed area. In addition, a heat source list for storing the center point coordinates of the moving human heat source in the continuous video frame images is also provided, and when the moving human heat source exists in the target video frame images, the center point coordinates of the moving human heat source in the target video frame images are calculated, the center point coordinates can be calculated based on the denoised heat source pixel points in the target video frame images, and the denoising mode can be realized by determining the number of the heat source pixel points in the preset size range.
In the embodiment of the invention, if it is determined that the heat source of the moving human body does not exist, whether the moving human body exists in the fixed area or not can be determined according to the heat source list, so as to further determine whether the moving human body exists or not.
In the embodiment of the invention, whether the moving human body heat source exists in the target video frame image is determined by utilizing the video segment, so that the determination of whether the moving human body heat source exists in the fixed area can be effectively realized based on the characteristics of the moving human body heat source in the video segment, and further, by setting a heat source list for storing the central point coordinates of the moving human body heat source in the continuous video frame image, whether the moving human body exists in the fixed area can be further determined according to the central point coordinates in the heat source list under the condition that the moving human body heat source does not exist is determined, so that the accuracy of detecting the human body existence is further improved.
In order to better understand the technical solution in the embodiment of the present invention, please refer to fig. 2 based on the embodiment shown in fig. 1, which is another flow chart of a method for detecting whether a human body exists in a fixed area in the embodiment of the present invention, including:
step 201, obtaining a video segment corresponding to a fixed area, wherein the video segment is obtained by performing thermal imaging on the fixed area, the video segment comprises continuous multi-frame video frame images, and pixel values of pixel points in the video frame images are temperature values;
it should be noted that, the above-mentioned step 201 is similar to the description of the step 101 in the embodiment shown in fig. 1, and the description of the step 101 in the embodiment shown in fig. 1 may be referred to specifically, and will not be repeated here.
Step 202, performing an operation of eliminating an unmovable heat source on a target video frame image by utilizing a video segment to obtain a first video frame image from which the unmovable heat source is eliminated;
in the embodiment of the present invention, after the video segment of the fixed area is obtained, the elimination operation of the non-moving human heat source is performed on the target video frame image by using the video segment to obtain the first video frame image from which the non-moving human heat source is eliminated, and it can be understood that the principle used in the elimination operation herein is that the positions of the non-moving human heat source in each frame of the video segment are similar and the pixel values are similar, and the influence of the pixel values of the non-moving heat source in the target video frame image can be eliminated by processing the pixel values, and specifically, the step 202 includes the following steps:
A1, calculating an average pixel value of a first target pixel point in a video segment to obtain a second video frame image formed by the average pixel value of the first target pixel point, wherein the first target pixel point is any pixel point in the video segment;
and A2, subtracting the pixel value of the pixel point which is the same as the second target pixel point in the second video frame image from the pixel value of the second target pixel point in the target video frame image to obtain a first video frame image formed by the difference value of the pixel values, wherein the second target pixel point is any pixel point in the target video frame image.
In the embodiment of the invention, since the video segment is imaged by the imaging device under the fixed shooting angle, the same pixel point in each frame of video frame image in the video segment represents the same position in the fixed area, and any pixel point in the video segment can be used as a first target pixel point, and the acquisition process of the first video frame image is described by taking the first target pixel point as an example.
When the video segment contains 50 frames of video frame images, for example, the pixel value of the 50 frames of video frame images at the position (i, j) can be obtained for the pixel point A (i, j), and the pixel value of the 50 frames of video frame images can be obtained, and the pixel value at the position (i, j) in the second video frame image can be obtained by carrying out an averaging operation on the 50 pixel values, wherein i represents a row, j represents a column, i is in a range of [1, 32], j is in a range of [1, 24], and each pixel value is an average value of the first target pixel point.
After the second video frame image is obtained, any pixel point in the target video frame is taken as a second target pixel point, and the pixel value of the pixel point which is the same as the position of the second target pixel point in the second video frame image is subtracted from the pixel value of the second target pixel point in the target video frame image, so that a first video frame image formed by the difference value of the pixel values is obtained. For example, if the position of the second target pixel point is (i, j) and the pixel value thereof is a1, the pixel value a2 of the pixel point with the position of (i, j) is found in the second video frame image, and the difference value a1 minus a2 is used as the pixel value of the pixel point at the position of (i, j) in the first video frame image, so that the pixel value of each pixel point in the first video frame image can be obtained effectively.
It can be understood that, firstly, the average value of the pixel values of the same pixel point in different video frame images in the video segment is calculated, so that the average value of the pixel points in the corresponding time range can be obtained based on the video segment, and for the non-moving heat source, the position change of the moving heat source is very small, and almost no change exists, so that in the obtained second video frame image, the position of the moving heat source is similar to the position in the video segment or the difference is very small, further, the pixel value of the pixel point in the target video frame is subtracted by the pixel value of the same pixel point in the second video frame image, so that for the non-moving heat source, the obtained difference value is very small due to the change of the position and the pixel value, and for the moving heat source, the obtained difference value after the difference value operation is carried out is relatively large due to the change of the position, by this way, the non-moving heat source and the moving heat source can be effectively distinguished from the moving heat source in such a way that the difference value can be obtained by solving the average value first and then the difference value is removed, and the non-moving heat source is highlighted.
Step 203, performing a heat source pixel point detection operation of moving a heat source on the first video frame image, and determining a heat source pixel point contained in the first video frame image;
in the embodiment of the invention, because the target video frame image may or may not have a moving human body heat source, after the first video frame image corresponding to the target video frame image and from which the non-moving heat source is eliminated is obtained, the first video frame image may be further subjected to a detection operation of the heat source pixel point of the moving heat source, so as to determine the heat source pixel point included in the first video frame image.
In one possible implementation, the heat source pixel point included in the first video frame image may be determined in the following manner:
and detecting the heat source pixel points of the first video frame image by utilizing the first video frame image and the preset dividing points, and determining the heat source pixel points contained in the first video frame. The dividing point may be set based on specific needs, for example, may include an upper dividing point and a lower dividing point, which are also referred to as 75 dividing point and 25 dividing point, respectively, to calculate a first dividing value of the first video frame image at the upper dividing point, and to calculate a second dividing value of the first video frame image at the lower dividing point.
And for any pixel point in the first video frame image, the pixel value of the pixel point in the first video frame image can be recalculated as follows:
wherein M represents the updated pixel value of the pixel point in the first video frame image, D represents the initial pixel value of the pixel point in the first video frame image, alpha, beta represent constants associated with the quantiles,and->The upper and lower division points are indicated,a first quantile value representing an upper quantile of the first video frame image,/for>A second index value representing the index of the first video frame image at the lower index point, in one possible implementation, the values of α, β may be 2.5 and 1.5, the values of->And->Can be 75 and 25 respectively, it is understood that in practical application, the above alpha, beta,/-can be set according to specific needs>And->Is not limited herein.
After the updated first video frame image is obtained, a heat source pixel point in the first video frame image can be obtained, wherein the heat source pixel point is a pixel point with a pixel value larger than 0 in the first video frame image. It is understood that these pixels are all representative of pixels corresponding to a heat source, and are therefore also referred to as heat source pixels.
Step 204, determining whether a moving human body heat source exists in the target video frame image according to the heat source pixel points contained in the first video frame image;
in the embodiment of the invention, after the updated first video frame image is obtained, whether a human body heat source exists in the target video frame image is determined by using the heat source pixel points contained in the first video frame image.
In one possible implementation, the first video frame image may be first de-noised, i.e., to remove some interference from small mobile heat sources, such as puppies, kittens, and the like. Specifically, the position coordinate value of each heat source pixel point in the first video frame image can be determined, taking any one heat source pixel point in the first video frame image as a target heat source pixel point as an example, and calculating the distances between the target heat source pixel point and other heat source pixel points except the target heat source pixel point in the first video frame image respectively to obtain a distance set of the target heat source pixel points; determining the distance number of distance values smaller than or equal to a preset distance threshold value in a distance set of target heat source pixel points of the first video frame image, and determining the distance number as a heat source density value of the target heat source pixel points; determining heat source pixel points with the heat source density value larger than or equal to a preset density threshold in the first video frame image, taking the heat source pixel points with the heat source density value larger than or equal to the preset density threshold as the heat source pixel points of the mobile human heat source, and further determining the target number of the heat source pixel points of the mobile human heat source.
In the embodiment of the invention, when the number of the targets is greater than or equal to a preset value, the existence of the mobile human body heat source is indicated, so that the existence of the mobile human body heat source in the target video frame image can be determined; when the number of targets is smaller than the preset value, the fact that the moving human body heat source does not exist is indicated, and therefore it can be determined that the moving human body heat source does not exist in the target video frame image. Preferably, the preset value may be 1, and when the number of the heat source pixels having the heat source density value greater than or equal to the preset density threshold is 1, it may indicate that the moving human heat source exists, and thus, as long as greater than or equal to 1, it may indicate that the moving human heat source exists.
Step 205, if it is determined that a moving human body heat source exists, determining that a moving human body exists in a fixed area, and adding the center point coordinates of the moving human body heat source in the target video frame image to a preset heat source list, wherein the heat source list is used for storing the center point coordinates of the moving human body heat source in the continuous video frame image;
step 206, if it is determined that there is no moving human body heat source, determining whether there is an unmoved human body in the fixed area according to the heat source list.
In the embodiment of the invention, after the video segment is utilized to determine whether the moving human body heat source exists in the target video frame image, if the moving human body heat source exists, the moving human body exists in the fixed area. In addition, a heat source list for storing the center point coordinates of the moving human heat source in the continuous video frame images is also provided, and when the moving human heat source exists in the target video frame images, the center point coordinates of the moving human heat source in the target video frame images are calculated, the center point coordinates can be calculated based on the denoised heat source pixel points in the target video frame images, and the denoising mode can be realized by determining the number of the heat source pixel points in the preset size range.
In the embodiment of the invention, the overtime stay alarm can be realized, and in particular, a timestamp list is arranged and is used for storing the timestamps of the continuous multi-frame video frame images of the detected moving human body heat source, so that the timestamps of the target video frame images are added into the timestamp list under the condition that the moving human body heat source exists in the target video frame images. After adding, the time difference between the last time stamp and the first time stamp is determined by using the time stamp list, the time difference is compared with a preset overtime threshold, when the time difference is greater than or equal to the preset overtime threshold, the time difference indicates that the residence time of the mobile human heat source in the fixed area is too long, and an overtime residence alarm is output, wherein the overtime residence alarm can be one or more of triggering playing voice reminding, triggering a buzzer to work, sending a reminding message to a designated user side, and the like. When the time difference is smaller than the preset timeout threshold, the fact that timeout stay does not exist is indicated, and timeout stay alarming is not needed.
In addition, if it is determined that there is no moving human body heat source, it may be determined whether there is an moving human body in the fixed area according to the heat source list to further determine whether there is an moving human body.
Specifically, the determination can be performed in two cases, including that the heat source list is empty, and the list is not empty, which is specifically as follows:
(1) The list of heat sources is empty
The heat source list is used for storing the central point coordinates of the moving human heat source in the continuous video frame images, and when the heat source list is empty, the result of the detection of at least the video frame image of the last frame continuous with the target video frame image is that the moving human heat source is not existed, the counted number of the residual personnel in the fixed area is obtained, and the initial value of the number of the residual personnel is zero.
The number of the remaining people is obtained by counting the people flow in the fixed area, and the number of the remaining people in the fixed area is counted by determining whether the increase, the decrease or the invariance of the heat source of the mobile human body exists based on the heat source list. And under the condition that the heat source list is empty, the number of the remaining persons in the fixed area is unchanged, so that the number of the remaining persons does not need to be updated, the counted number of the remaining persons in the fixed area is obtained, and the counted number of the remaining persons in the fixed area is the number of the remaining persons after the last update.
Further, the judgment will be made based on the above-described remaining number of persons, when the remaining number of persons is greater than zero, indicating that there is a human body in the fixed area, and since there is no moving human body, it can be determined that there is an unmoved human body in the fixed area, which may be a person who has not moved a position after entering the fixed area, for example, a state in which the unmoved human body lies in a bed for sleeping, or sits on a sofa, or the like.
When the number of the remaining people is equal to zero, the fact that no human body exists in the fixed area and no moving human body exists and no non-moving human body exists is indicated.
(2) The list of heat sources is not empty
When the heat source list is non-empty, it indicates that at least a moving human heat source exists in a previous frame of video frame images which are continuous with the target video frame image, and the moving human heat source is not detected in the target video frame image, then it indicates that a human body possibly exists moving out of the fixed area, or the moving human body possibly exists moving into the fixed area and does not continue moving after entering the fixed area, for further determination, a first center point coordinate and a last center point coordinate in the heat source list are acquired, so that a change condition of remaining people in the fixed area can be determined according to the first center point coordinate and the last center point coordinate, and the number of remaining people is updated based on the change condition, so as to determine whether the non-moving human body exists in the target video frame image.
Further, when the first center point coordinate and the last center point coordinate in the heat source list are used to determine the change condition of the remaining people in the fixed area, an access area of the fixed area is also used, where the access area refers to an area where the people enter or exit, and may be a position where the door of the fixed area is located and an adjacent area with a preset size, for example, a position where the door of the fixed area is located in a bedroom, a bathroom, a restaurant, etc. and an adjacent area with a preset size. It will be appreciated that the entrance/exit area of the fixed area may be determined in a plurality of ways, and in a possible implementation manner, it may be manually determined which part of the area in the frame image captured by the thermal imaging device is the entrance/exit area, and corresponding marking is performed.
Specifically, if the first center point coordinate is not located in the image area range corresponding to the entrance area of the fixed area and the last center point coordinate is located in the image area range, it is indicated that the first center point coordinate of the moving human heat source is located in the image area range corresponding to the other areas except the entrance area of the fixed area, the moving human heat source moves into the image area range corresponding to the entrance area, it is indicated that the moving human heat source has a trend of moving from the non-entrance area of the fixed area to the entrance area and finally is not detected (the moving human heat source is not detected in the target video frame image), it is indicated that the moving track of the moving human heat source should be just moving from the fixed area to the entrance area and finally moves out of the fixed area, it is determined that the moving human heat source exits from the room (fixed area), at this time, the number of remaining people in the fixed area is reduced, and the number of remaining people in the stored fixed area is reduced by 1, and the updated number of remaining people is obtained.
If the first center point coordinate is located in the image area and the last center point coordinate is not located in the image area, the moving track of the moving human heat source is indicated to start from the entrance area, and finally the moving track of the moving human heat source is indicated to be in other areas except the entrance area in the fixed area: the moving human body heat source represented by the first center point coordinate and the last center point coordinate can be determined to enter the fixed area from the outside of the fixed area and is kept still, at the moment, the number of the remaining people in the fixed area is actually increased, and the number of the remaining people in the stored fixed area can be increased by 1 to obtain the updated number of the remaining people.
If the first center point coordinate is located in the image area and the last center point coordinate is located in the image area, it indicates how the moving human heat source moves in the fixed area, the starting point and the end point of the moving human heat source are both in the entrance area and the exit area of the fixed area, and finally the moving human heat source moves out of the fixed area, in this case, the number of the remaining people in the fixed area is not affected, and the number of the remaining people can be determined unchanged.
If the first center point coordinate is not located within the image area and the last center point coordinate is not located within the image area, it indicates that the moving human heat source is within the fixed area, but is not in the entrance area within the fixed area, the moving human heat source is likely to become an unmoved human after the movement of the non-entrance area within the fixed area, in which case the number of remaining people within the fixed area is not changed, and thus, it can be determined that the number of remaining people is unchanged.
Further, after the number of remaining people is updated, it is determined whether the updated number of remaining people is greater than zero, and when the updated number of remaining people is greater than zero, it indicates that at least one human body exists in the fixed area, and since no moving human body heat source is detected in the target video frame image, it is determined that an unmoved human body exists in the fixed area. When the updated number of the remaining persons is equal to zero, it is indicated that no non-moving human body exists in the fixed area, and no moving human body exists.
It will be appreciated that the heat source list is for storing the coordinates of the center points of the moving human heat source in successive video frame images, and in the event that no moving human heat source is detected in the target video frame image, it is indicated that the heat source list will not continue to remain continuous, and therefore will be emptied after the first center point coordinate, and the last center point coordinate, is acquired.
In the embodiment of the invention, whether the moving human body heat source exists in the target video frame image is determined by utilizing the video segment, so that the determination of whether the moving human body heat source exists in the fixed area can be effectively realized based on the characteristics of the moving human body heat source in the video segment, and further, by setting a heat source list for storing the central point coordinates of the moving human body heat source in the continuous video frame image, whether the moving human body exists in the fixed area can be further determined according to the central point coordinates in the heat source list under the condition that the moving human body heat source does not exist is determined, so that the accuracy of detecting the human body existence is further improved.
Referring to fig. 3, a schematic structural diagram of a device for detecting whether a human body exists in a fixed area according to an embodiment of the present invention is shown, where the device includes:
the obtaining module 301 is configured to obtain a video segment corresponding to the fixed area, where the video segment is obtained by performing thermal imaging on the fixed area, the video segment includes continuous multi-frame video frame images, and pixel values of pixel points in the video frame images are temperature values;
a first determining module 302, configured to determine, according to a video segment, whether a moving human body heat source exists in a target video frame image, where the target video frame image is a last frame of video frame image in the video segment;
The determining and adding module 303 is configured to determine that a moving human body exists in the fixed area if it is determined that a moving human body heat source exists, and add the center point coordinates of the moving human body heat source in the target video frame image to a preset heat source list, where the heat source list is configured to store the center point coordinates of the moving human body heat source in the continuous video frame images;
the second determining module 304 is configured to determine whether an unmoved human body exists in the fixed area according to the heat source list if it is determined that the unmoved human body heat source does not exist.
In the embodiment of the present invention, the content of each module included in the detection device for detecting whether a human body exists in the fixed area in the embodiment shown in fig. 3 is similar to the content of each step in the detection method for detecting whether a human body exists in the fixed area in the embodiment shown in fig. 1 and 2, and specifically, the content described in each step in fig. 1 and 2 may be referred to, and details are not repeated here.
In the embodiment of the invention, whether the moving human body heat source exists in the target video frame image is determined by utilizing the video segment, so that the determination of whether the moving human body heat source exists in the fixed area can be effectively realized based on the characteristics of the moving human body heat source in the video segment, and further, by setting a heat source list for storing the central point coordinates of the moving human body heat source in the continuous video frame image, whether the moving human body exists in the fixed area can be further determined according to the central point coordinates in the heat source list under the condition that the moving human body heat source does not exist is determined, so that the accuracy of detecting the human body existence is further improved.
Those skilled in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a non-volatile computer readable storage medium, and where the program, when executed, may include processes in the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (10)

1. A method for detecting the presence of a human body in a fixed area, the method comprising:
acquiring a video segment corresponding to a fixed area, wherein the video segment is obtained by performing thermal imaging on the fixed area, the video segment comprises continuous multi-frame video frame images, and pixel values of pixel points in the video frame images are temperature values;
determining whether a moving human body heat source exists in a target video frame image according to the video segment, wherein the target video frame image is the last frame of video frame image in the video segment;
If the moving human body heat source exists, determining that the moving human body exists in the fixed area, and adding the center point coordinates of the moving human body heat source in the target video frame image to a preset heat source list, wherein the heat source list is used for storing the center point coordinates of the moving human body heat source in continuous video frame images;
and if the fact that the heat source of the moving human body does not exist is determined, determining whether the non-moving human body exists in the fixed area according to the heat source list.
2. The method of claim 1, wherein determining whether a moving human heat source is present in the target video frame image from the video segment comprises:
performing the elimination operation of the unmovable heat source on the target video frame image by utilizing the video segment to obtain a first video frame image with the unmovable heat source eliminated;
performing heat source pixel point detection operation of a mobile heat source on the first video frame image, and determining heat source pixel points contained in the first video frame image;
and determining whether a moving human body heat source exists in the target video frame image according to the heat source pixel points contained in the first video frame image.
3. The method according to claim 2, wherein said performing an operation of removing the unmoved heat source from the target video frame image using the video segment to obtain a first video frame image from which the unmoved heat source has been removed comprises:
Calculating an average pixel value of a first target pixel point in the video segment to obtain a second video frame image formed by the average pixel value of the first target pixel point, wherein the first target pixel point is any pixel point in the video segment;
and subtracting the pixel value of a second target pixel point in the target video frame image from the pixel value of a pixel point which is the same as the second target pixel point in the second video frame image to obtain a first video frame image formed by the difference value of the pixel values, wherein the second target pixel point is any pixel point in the target video frame image.
4. The method according to claim 2, wherein determining whether a moving human heat source exists in the target video frame image according to the heat source pixel points included in the first video frame image comprises:
determining position coordinate values of each heat source pixel point in the first video frame image;
calculating distances between a target heat source pixel point and other heat source pixel points except the target heat source pixel point in the first video frame image respectively to obtain a distance set of the target heat source pixel point, wherein the target heat source pixel point is any heat source pixel point in the first video frame image;
Determining the distance number of distance values smaller than or equal to a preset distance threshold value in the distance set, and determining the distance number as a heat source density value of the target heat source pixel point;
determining the target number of heat source pixel points, of which the heat source density value is greater than or equal to a preset density threshold value, in the first video frame image;
when the number of the targets is larger than or equal to a preset value, determining that a moving human body heat source exists in the target video frame image;
and when the target number is smaller than the preset value, determining that no moving human body heat source exists in the target video frame image.
5. The method of any one of claims 1 to 4, wherein said determining whether there is an unmoved human body within the fixed zone based on the list of heat sources comprises:
when the heat source list is empty, acquiring the counted number of the residual personnel in the fixed area, wherein the initial value of the number of the residual personnel is zero;
when the number of the remaining people is greater than zero, determining that an unmoved human body exists in the fixed area;
and when the number of the remaining people is equal to zero, determining that no non-moving human body exists in the fixed area.
6. The method of any one of claims 1 to 4, wherein said determining whether there is an unmoved human body within the fixed zone based on the list of heat sources comprises:
when the heat source list is non-empty, acquiring a first center point coordinate and a last center point coordinate in the heat source list;
updating the number of the remaining persons in the fixed area according to the first center point coordinate and the last center point coordinate to obtain the updated number of the remaining persons;
when the updated number of the rest people is greater than zero, determining that an unmovable human body exists in the fixed area;
and when the updated number of the rest people is equal to zero, determining that no non-moving human body exists in the fixed area.
7. The method of claim 6, wherein updating the number of remaining people in the fixed area based on the first center point coordinate and the last center point coordinate to obtain the updated number of remaining people comprises:
if the first center point coordinate is not located in the image area range corresponding to the entrance area of the fixed area and the last center point coordinate is located in the image area range, subtracting 1 from the number of the remaining people to obtain the updated number of the remaining people;
If the first center point coordinate is located in the image area range and the last center point coordinate is not located in the image area range, adding 1 to the number of the remaining persons to obtain the updated number of the remaining persons;
and if the first center point coordinate is positioned in the image area range and the last center point coordinate is positioned in the image area range, or if the first center point coordinate is not positioned in the image area range and the last center point coordinate is not positioned in the image area range, determining that the number of the rest people is unchanged.
8. A device for detecting the presence of a human body in a fixed area, the device comprising:
the device comprises an acquisition module, a temperature detection module and a control module, wherein the acquisition module is used for acquiring a video segment corresponding to a fixed area, the video segment is obtained by performing thermal imaging on the fixed area, the video segment comprises continuous multi-frame video frame images, and pixel values of pixel points in the video frame images are temperature values;
the first determining module is used for determining whether a moving human body heat source exists in a target video frame image according to the video segment, wherein the target video frame image is the last frame of video frame image in the video segment;
The determining and adding module is used for determining that a moving human body exists in the fixed area if the moving human body heat source exists, adding the center point coordinates of the moving human body heat source in the target video frame image to a preset heat source list, and storing the center point coordinates of the moving human body heat source in the continuous video frame image;
and the second determining module is used for determining whether the non-moving human body exists in the fixed area according to the heat source list if the non-moving human body heat source exists.
9. The apparatus of claim 8, wherein the first determining module is specifically configured to:
performing the elimination operation of the unmovable heat source on the target video frame image by utilizing the video segment to obtain a first video frame image with the unmovable heat source eliminated;
performing heat source pixel point detection operation of a mobile heat source on the first video frame image, and determining heat source pixel points contained in the first video frame image;
and determining whether a moving human body heat source exists in the target video frame image according to the heat source pixel points contained in the first video frame image.
10. A computer readable storage medium storing a computer program, which when executed by a processor causes the processor to perform the steps of the method according to any one of claims 1 to 7.
CN202010903018.8A 2020-08-31 2020-08-31 Method and related device for detecting whether human body exists in fixed area Active CN112101151B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010903018.8A CN112101151B (en) 2020-08-31 2020-08-31 Method and related device for detecting whether human body exists in fixed area

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010903018.8A CN112101151B (en) 2020-08-31 2020-08-31 Method and related device for detecting whether human body exists in fixed area

Publications (2)

Publication Number Publication Date
CN112101151A CN112101151A (en) 2020-12-18
CN112101151B true CN112101151B (en) 2023-12-08

Family

ID=73756980

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010903018.8A Active CN112101151B (en) 2020-08-31 2020-08-31 Method and related device for detecting whether human body exists in fixed area

Country Status (1)

Country Link
CN (1) CN112101151B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004044683A2 (en) * 2002-11-06 2004-05-27 Simmonds Precision Products, Inc. Method for detection and recognition of fog presence within an aircraft compartment using video images
WO2009158494A1 (en) * 2008-06-26 2009-12-30 Lynntech, Inc. Method of searching for a thermal target
CN104735521A (en) * 2015-03-30 2015-06-24 北京奇艺世纪科技有限公司 Method and device for detecting rolling captions
CN106652465A (en) * 2016-11-15 2017-05-10 成都通甲优博科技有限责任公司 Method and system for identifying abnormal driving behavior on road
CN107707810A (en) * 2017-08-21 2018-02-16 广州紫川电子科技有限公司 Thermal source method for tracing, apparatus and system based on thermal infrared imager

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9959471B2 (en) * 2008-05-06 2018-05-01 Careview Communications, Inc. Patient video monitoring systems and methods for thermal detection of liquids

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004044683A2 (en) * 2002-11-06 2004-05-27 Simmonds Precision Products, Inc. Method for detection and recognition of fog presence within an aircraft compartment using video images
WO2009158494A1 (en) * 2008-06-26 2009-12-30 Lynntech, Inc. Method of searching for a thermal target
CN104735521A (en) * 2015-03-30 2015-06-24 北京奇艺世纪科技有限公司 Method and device for detecting rolling captions
CN106652465A (en) * 2016-11-15 2017-05-10 成都通甲优博科技有限责任公司 Method and system for identifying abnormal driving behavior on road
CN107707810A (en) * 2017-08-21 2018-02-16 广州紫川电子科技有限公司 Thermal source method for tracing, apparatus and system based on thermal infrared imager

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
云廷进 ; 郭永彩 ; 高潮 ; .基于图像局部区域梯度特征描述的红外人体识别算法.光学技术.2008,(03),全文. *
陈宇玺 ; 于乐兵 ; .夜间行人检测的红外及可见光视频融合方法.计算机工程与应用.2009,(24),全文. *

Also Published As

Publication number Publication date
CN112101151A (en) 2020-12-18

Similar Documents

Publication Publication Date Title
US10080513B2 (en) Activity analysis, fall detection and risk assessment systems and methods
CN112734731B (en) Livestock temperature detection method, device, equipment and storage medium
CN108764190B (en) Video monitoring method for off-bed and on-bed states of old people
WO2015174228A1 (en) Attitude estimation device, attitude estimation system, attitude estimation method, attitude estimation program, and computer-readable recording medium whereupon attitude estimation program is recorded
CN113269046B (en) High-altitude falling object identification method and system
CN113269809B (en) Multi-feature fusion related filtering target tracking method and computer equipment
CN112101151B (en) Method and related device for detecting whether human body exists in fixed area
JP7299692B2 (en) Image processing device, image processing system, image processing device control method, and program
CN111243229A (en) Old people falling risk assessment method and system
CN111612773B (en) Thermal infrared imager and real-time automatic blind pixel detection processing method
CN113392765A (en) Tumble detection method and system based on machine vision
CN111814612A (en) Target face detection method and related device thereof
CN114078603A (en) Intelligent endowment monitoring system and method, computer equipment and readable storage medium
CN112101104B (en) Human body presence detection method and related device
CN112102264A (en) Human body detection device
US8126212B2 (en) Method of detecting moving object
CN117073769A (en) Detection device for ship body posture in full-floating state
CN112050944B (en) Gate position determining method and related device
JP2022042304A (en) Stress estimation device, method, and program
CN112102249B (en) Method for detecting existence of human body and related device
JP5545977B2 (en) Image monitoring device
Spinola et al. Image processing for surface quality control in stainless steel production lines
CN109885560B (en) Cleaning method and device for infrared thermal image monitoring data of shale gas fracturing equipment
CN113671489A (en) State reminding method and device, electronic equipment and computer readable storage medium
CN112784703A (en) Multispectral-based personnel action track determination method

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