CN112101104B - Human body presence detection method and related device - Google Patents

Human body presence detection method and related device Download PDF

Info

Publication number
CN112101104B
CN112101104B CN202010792951.2A CN202010792951A CN112101104B CN 112101104 B CN112101104 B CN 112101104B CN 202010792951 A CN202010792951 A CN 202010792951A CN 112101104 B CN112101104 B CN 112101104B
Authority
CN
China
Prior art keywords
pixel
heat source
target
image frame
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010792951.2A
Other languages
Chinese (zh)
Other versions
CN112101104A (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 CN202010792951.2A priority Critical patent/CN112101104B/en
Publication of CN112101104A publication Critical patent/CN112101104A/en
Application granted granted Critical
Publication of CN112101104B publication Critical patent/CN112101104B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/48Matching video sequences

Landscapes

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

Abstract

The embodiment of the invention discloses a human body presence detection method and a related device, wherein the method comprises the following steps: and acquiring a thermal imaging video, wherein the thermal imaging video comprises continuous image frames with preset frames, the last frame of the thermal imaging video is a current image frame, pixel values of all pixel points in the image frames contained in the thermal imaging video are temperature values, detecting heat source pixel points of the current image frame according to the thermal imaging video and a preset sigma criterion to obtain a target image frame containing the detected heat source pixel points, and determining whether a human body exists in the current image frame according to the heat source pixel points contained in the target image frame. By using the thermal imaging video and a preset sigma criterion, the heat source pixel point detection is carried out on the current image frame, so that the self-adaptive denoising of the gradual heat source in the environment can be effectively realized, the change of the environment can be effectively adapted, the accuracy of the heat source pixel point detection is improved, and the accuracy of the human body presence detection is further improved.

Description

Human body presence detection method and related device
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a human presence detection method and a related device.
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, in living environments, there may be some disturbance heat sources, for example, gradual heat sources caused by environmental gradual changes of sunlight irradiation, temperature adjustment of air conditioners, etc., and the gradual heat sources present in these environments may affect the accuracy of detecting whether a human body is present or not using an infrared thermal imaging apparatus.
Disclosure of Invention
The invention mainly aims to provide a human body existence detection method and a related device, which can improve the accuracy of human body existence detection.
To achieve the above object, a first aspect of the present invention provides a human presence detection method, the method comprising:
acquiring a thermal imaging video, wherein the thermal imaging video comprises continuous image frames with preset frames, the last frame of the thermal imaging video is a current image frame, and pixel values of all pixel points in the image frame are temperature values;
detecting heat source pixel points of the current image frame according to the thermal imaging video and a preset sigma criterion to obtain a target image frame, wherein the target image frame comprises the detected heat source pixel points;
and determining whether a human body exists in the current image frame according to the heat source pixel points contained in the target image frame.
To achieve the above object, a second aspect of the present invention provides a human presence detection device, 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 thermal imaging video, the thermal imaging video comprises continuous image frames with preset frames, the last frame of the thermal imaging video is a current image frame, and pixel values of all pixel points in the image frame are temperature values;
the detection module is used for detecting the heat source pixel points of the current image frame according to the thermal imaging video and a preset sigma criterion to obtain a target image frame, wherein the target image frame comprises the detected heat source pixel points;
and the determining module is used for determining whether a human body exists in the current image frame according to the heat source pixel points contained in the target image frame.
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 steps of:
acquiring a thermal imaging video, wherein the thermal imaging video comprises continuous image frames with preset frames, the last frame of the thermal imaging video is a current image frame, and pixel values of all pixel points in the image frame are temperature values;
detecting heat source pixel points of the current image frame according to the thermal imaging video and a preset sigma criterion to obtain a target image frame, wherein the target image frame comprises the detected heat source pixel points;
and determining whether a human body exists in the current image frame according to the heat source pixel points contained in the target image frame.
The embodiment of the invention has the following beneficial effects:
the invention provides a human body presence detection method, which comprises the following steps: and acquiring a thermal imaging video, wherein the thermal imaging video comprises continuous image frames with preset frames, the last frame of the thermal imaging video is a current image frame, pixel values of all pixel points in the image frames contained in the thermal imaging video are temperature values, detecting heat source pixel points of the current image frame according to the thermal imaging video and a preset sigma criterion to obtain a target image frame containing the detected heat source pixel points, and determining whether a human body exists in the current image frame according to the heat source pixel points contained in the target image frame. By using the thermal imaging video and a preset sigma criterion, the heat source pixel point detection is carried out on the current image frame, so that the self-adaptive denoising of the gradual heat source (such as solar irradiation, air conditioner and the like) in the environment can be effectively realized, the change of the environment can be effectively adapted, the heat source pixel point detection accuracy is improved, and the human body presence detection accuracy 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 human presence detection method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a human presence detection method according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating the refinement step of step 203 in the embodiment of FIG. 2 according to the present invention;
FIG. 4 is a flow chart illustrating the refinement step of step 204 in the embodiment of FIG. 2 according to the present invention;
FIG. 5 is a flow chart illustrating additional steps of the embodiment shown in FIGS. 1 and 2;
fig. 6 is a schematic structural diagram of a human body presence detecting device 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.
Referring to fig. 1, a flow chart of a human presence detection method according to an embodiment of the invention is shown, and the method includes:
step 101, acquiring a thermal imaging video, wherein the thermal imaging video comprises continuous image frames with preset frames, the last frame of the thermal imaging video is a current image frame, and pixel values of all pixel points in the image frame are temperature values;
in the embodiment of the present invention, the above-mentioned human body presence detection method is implemented by a human body presence detection device, where the human body presence detection device is a program module, and is stored in a readable storage medium of a computer device, and a processor in the computer device may read and operate the above-mentioned human body presence detection device from the readable storage medium, so as to implement the above-mentioned human body presence detection method.
In the embodiment of the invention, a thermal imaging video is acquired, wherein the thermal imaging video is obtained by shooting by using thermal infrared imaging equipment, the thermal infrared imaging equipment uses an infrared thermal imaging technology, the infrared thermal imaging technology can detect an infrared specific wave band signal of thermal radiation of an object based on a photoelectric technology, the signal can be converted into an image which can be distinguished by human vision, and a temperature value is further calculated, so that the thermal imaging video comprises continuous image frames, and the pixel value of each pixel point in the image frames 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.
When the human body presence detection method in the embodiment of the present invention is executed, a thermal imaging video including image frames of consecutive preset frames may be used, and the last frame of the thermal imaging video is the current frame. The thermal imaging video may be captured by a thermal infrared imaging device, which may capture with a preset frame rate and resolution, for example, with a frame rate of 16, i.e., with a frequency of 16Hz, such that 16 image frames may be generated per second. The resolution is 32×24, so that each frame of image frame contains 32×24 pixels, and the pixel value of each pixel is a temperature value. It is understood that in order to make the photographed image range as large as possible, the thermal infrared imaging apparatus may be installed directly above the space to be photographed, for example, if the thermal infrared imaging apparatus is installed in a bathroom, it may be installed in the center directly above the roof of the bathroom such that the photographing angle of the thermal infrared imaging apparatus is vertically downward, and preferably, the installation height of the thermal infrared imaging apparatus is 2.5m to 3.3m.
It can be understood that in the embodiment of the present invention, whether a human body exists may be detected in real time, or whether a human body exists may be detected for a period of historical video, for better understanding, a video frame that needs to detect whether a human body exists is referred to as a current image frame, and the current image frame is the last frame of the acquired thermal imaging video. In addition, the preset number of frames included in the thermal imaging video may be determined based on specific needs, and may be set to 300000 frames, for example.
It should be noted that, the thermal imaging video related to the embodiment of the present invention is a video shot by the thermal infrared imaging device under the condition of fixed shooting angle.
Step 102, detecting heat source pixel points of a current image frame according to a thermal imaging video and a preset sigma criterion to obtain a target image frame, wherein the target image frame comprises the detected heat source pixel points;
in normal distribution, sigma (sigma) represents standard deviation, μ represents mean, x=u is symmetry axis of normal distribution graph in standard two-dimensional coordinate system, the above sigma (sigma) criterion is used to represent probability of numerical distribution, and may be any one of 1sigma criterion to 6sigma criterion, taking 3sigma criterion as an example, which represents probability of 0.9974 that numerical distribution is in (μ -3σ, μ+3σ), and y value corresponding to x in standard coordinate system is considered to be almost all concentrated in (μ -3σ, μ+3σ) interval.
In the embodiment of the invention, the thermal imaging video is a video shot by the thermal infrared imaging device under the condition of fixed shooting angle, so that the pixel values of the pixel points contained in each image frame in the thermal imaging video are in accordance with normal distribution, the pixel values of the pixel points contained in each image frame in the thermal imaging video meet the 3sigma criterion, are not influenced by environmental gradual change, and adapt to environmental change. Therefore, the heat source pixel point detection can be performed on the current image frame based on the thermal imaging video and the 3sigma criterion, so as to obtain a target image frame, wherein the target image frame contains the detected heat source pixel point. The heat source pixel points refer to pixel points corresponding to the heat source in the image frame, the pixel values of the heat source pixel points are usually regarded as abnormal values, and the heat source pixel points are not in accordance with the 3sigma criterion.
Step 103, determining whether a human body exists in the current image frame according to the heat source pixel points contained in the target image frame.
In the embodiment of the invention, the heat source pixel point detection is carried out on the current image frame by using the thermal imaging video and the preset sigma criterion, so that the self-adaptive denoising of the gradual heat source (such as solar irradiation, air conditioner and the like) in the environment can be effectively realized, the change of the environment can be effectively adapted, the accuracy of the heat source pixel point detection is improved, and the accuracy of the human body presence detection is further improved.
For better understanding of the technical solution in the embodiment of the present invention, please refer to fig. 2, which is another flow chart of a human body presence detection method in the embodiment of the present invention, including:
step 201, acquiring a thermal imaging video, wherein the thermal imaging video comprises continuous image frames with preset frames, the last frame of the thermal imaging video is a current image frame, and pixel values of all pixel points in the image frame are temperature values;
in the embodiment of the present invention, the content related to step 201 is similar to the content related to step 101 in the embodiment shown in fig. 1, and the description related to step 101 in the embodiment shown in fig. 1 may be specifically referred to, which is not repeated here.
Further, the thermal imaging video may be a history data list with a preset length, each time an image frame is acquired by the thermal infrared imaging device, the image frame is added to the history data list, and since the length of the history data list is limited, when the history data list is full, the earliest image frame in the history data list is deleted every time an image frame is added.
Step 202, calculating a target pixel point in a current image frame, wherein the pixel value mean value and the standard deviation value of the pixel points at the same position in each image frame contained in the thermal imaging video are used as the pixel value mean value and the standard deviation value of the target pixel point, and the target pixel point is any pixel point in the current image frame;
step 203, based on the sigma criterion, obtaining a pixel value of the target pixel in the target image frame according to the average value, the standard deviation value and the pixel value of the target pixel in the current image frame, and determining whether the target pixel is a heat source pixel based on the pixel value of the target pixel;
in the embodiment of the invention, for a target pixel point in a current image frame, a pixel value average value and a standard deviation value of pixel points which are the same as the target pixel point in each image frame included in the thermal imaging video can be calculated and used as the pixel value average value and the standard deviation value of the target pixel point, wherein the target pixel point is any pixel point in the current image frame.
For better understanding, taking an example that the resolution of the thermal imaging video is 24×32, each image frame in the thermal imaging video contains 768 pixels, the method can be used to firstThe thermal imaging video is subjected to array conversion to be L n×768 N represents the number of image frames in the thermal imaging video, and in the array, one image frame represents one row, and a row contains a column of 768 pixels of the image frame. At the same time, the current frame image can also be subjected to array conversion, namely A 768 The array is represented by only one row, and the row contains 768 columns, each column corresponding to a pixel value of a pixel point in the current frame image.
Taking the target pixel point as the ith pixel point in the current frame image as an example, for A i Can be applied to L n×768 The i-th column of the model is subjected to mean value solving, and the obtained mean value is A i For A i Can then use L n×768 The standard deviation value of the ith column is solved, and the obtained standard deviation value is A i Wherein i ranges from 1 to 768, and according to the method, the pixel value mean value and the standard deviation value of each pixel point in the current frame image can be obtained.
Further, based on the sigma criterion, according to the average value and the standard deviation of the pixel value of the target pixel point and the pixel value of the target pixel point in the current image frame, the pixel value of the target pixel point in the target image frame is obtained, and whether the target pixel point is a heat source pixel point is determined based on the pixel value of the target pixel point.
Specifically, referring to fig. 3, a flowchart of a refinement step of step 203 in the embodiment of fig. 2 of the present invention includes:
step 301, subtracting a pixel value average value of the target pixel points from a pixel value of the target pixel points in the current image frame, and subtracting a standard deviation value of the target pixel points with a preset multiple to obtain a residual pixel value of the target pixel points;
step 302, determining a pixel value of the target pixel point in the target image frame according to the remaining pixel values, and determining whether the target pixel point is a heat source pixel point based on the pixel value of the target pixel point.
For step 301, in a possible implementation manner, a 3 sign criterion may be used to calculate a residual pixel value of the target pixel, where the residual pixel value is a pixel value of the target pixel in the current frame, the average value of the pixel values of the residual pixel is subtracted, and the standard deviation value of the target pixel is subtracted by 3 times, and the remaining value is taken as the residual pixel value of the target pixel, and specifically expressed as follows:
b i =A i -mean(L i×768 ,axis=0)-3×std(L i×768 ,axis=0)
wherein b i Representing the remaining pixel value of the ith target pixel point, A i Represents the pixel value of the ith target pixel point in the current frame image, mean (L i×768 Axis=0) represents the pixel value average value of the i-th target pixel point, std (L i×768 Axis=0) represents the standard deviation of the i-th target pixel point.
The method can be used for determining the residual pixel value of the target pixel point, further, the pixel value of the target pixel point in the target image frame can be determined according to the residual pixel value, and whether the target pixel point is a heat source pixel point or not is determined based on the pixel value of the target pixel point.
Specifically, when the residual pixel value is greater than a preset threshold value, determining that the pixel value of the target pixel point in the target image frame is a first numerical value, and the target pixel point is a heat source pixel point; and when the residual pixel value is smaller than or equal to a preset threshold value, determining that the pixel value of the target pixel point in the target image frame is a second value, and the target pixel point is a non-heat source pixel point. The first value may be 1, the second value may be 0, and the binarization processing may be performed based on the remaining pixel values, where the preset threshold may be 0, that is, when the remaining pixel value is greater than 0, the pixel value of the target pixel in the target image frame is determined to be 1 and be the heat source pixel, and when the remaining pixel value is less than or equal to 0, the pixel value of the target pixel in the target image frame is determined to be 0 and be the non-heat source pixel. It can be understood that when the above 3sigma criterion is used, when the remaining pixel value of the target pixel is greater than 0, it indicates that the target pixel does not meet the 3sigma criterion and belongs to an abnormal pixel.
For ease of understanding, based on continuing the description taking the example that the resolution of the thermal imaging video in step 203 is 24×32, an array B composed of the remaining pixels of the current frame image may be obtained 768 The array B 768 The expression formula of (2) is as follows:
B 768 =A 768 -mean(L n×768 ,axis=0)-3×std(L n×768 ,axis=0)
wherein mean (A n×768 Axis=0) represents array L n×768 Is an array of pixel value means (is an array of 768 dimensions), std (L n×768 Axis=0) represents array L n×768 Is an 768-dimensional array.
Then to array B 768 Judging the residual pixel value of each column, when the value is larger than 0, recharging the value to be 1, when the value is smaller than 0, resetting the value to be 0, and obtaining a new array C 768 The array is subjected to dimension transformation to be transformed into a form of 24 x 32, and the target image frame can be obtained.
Step 204, determining whether a human body exists in the current image frame according to the heat source pixel points contained in the target image frame.
In the embodiment of the invention, after the target image frame containing the heat source pixel points is obtained, whether a human body exists in the current image frame is determined.
Referring to fig. 4, a flowchart of a refinement step of step 204 in an embodiment of the present invention is shown, where step 204 specifically includes:
step 401, determining position coordinate values of each heat source pixel point in a target image frame;
step 402, determining a heat source density value of each heat source pixel according to the position coordinate value of each heat source pixel, wherein the heat source density value represents the number of the heat source pixels in a preset range with the heat source pixel as the center;
step 403, determining whether a human body exists in the current frame image according to the heat source density value of each heat source pixel point.
In the embodiment of the present invention, the position coordinate value of each heat source pixel point in the target image frame may be determined first, where the position coordinate value may be determined based on the rows and columns of the heat source pixel point in the target image frame, for example, if the resolution of the target image frame is 24×32, which indicates that the target image frame includes 24 rows and 32 columns, the position coordinate value of the heat source pixel point may be determined to be (a 1, a 2), where a1 represents the row where the heat source pixel point is located, and a2 represents the column where the heat source pixel point is located.
Further, a heat source density value of each heat source pixel point is determined according to the position coordinate value of each heat source pixel point, wherein the heat source density value represents the number of the heat source pixel points in a preset range with the heat source pixel point as the center, and whether a human body exists in the current frame image is determined according to the heat source density value of each heat source pixel point. The heat source density value may be used to distinguish the type of the heat source in the target frame image, such as whether a small-sized infected heat source is included (a small-sized interfering heat source generally refers to a heat source of a small-sized object such as a water heater, a small animal, etc.), whether a human body is included, etc.
In one possible implementation, the manner of obtaining the heat source density value of the heat source pixel point may be as follows:
step d1, calculating distances between the target heat source pixel points and other heat source pixel points except the target heat source pixel points in the target image frame respectively to obtain a distance set of the target heat source pixel points, wherein the target heat source pixel points are any heat source pixel point in the target image frame;
and d2, determining the distance number of the distance values smaller than or equal to the preset distance threshold value in the distance set, and determining the distance number as the heat source density value of the target heat source pixel point.
In order to better understand the technical solution in the embodiment of the present invention, an example is described where the target image frame includes 20 heat source pixel points, the number of the 20 heat source pixel points is 1 to 20, for each heat source pixel point, the heat source density value of each heat source pixel point will be determined, for the heat source pixel point 1, the distances between each heat source pixel point 1 and the heat source pixel point 2 to the heat source pixel point 20 will be calculated, a distance set 1 of the heat source pixel point 1 is obtained, the distance set includes e2, e3, … …, e20, e2 represents the distance value between the heat source pixel point 1 and the heat source pixel point 2, e20 represents the distance value between the heat source pixel point 1 and the heat source pixel point 20, and the other similar steps are further performed, the preset distance threshold is used for determining the distance number of the distance value between the heat source pixel point 1 and the heat source pixel point 1, where the distance value between the heat source pixel point 1 and the heat source pixel point 2 is less than or equal to the preset distance threshold is the center, if the distance number of the distance value between the heat source pixel point 1 and the heat source pixel point 2 is M, and the density of the heat source pixel point 1 is not calculated in such a manner.
In the embodiment of the invention, the heat source density value of the heat source pixel point is used for distinguishing the human body from the small interfering heat source, and the heat source density value of the human body is larger and the density value of the small interfering heat source is smaller under the normal condition.
Specifically, the target number of heat source pixel points in the target image frame, where the heat source density value is greater than or equal to the preset density threshold, may be determined. When the number of the target images is larger than or equal to a preset value, determining that a human body exists in the current frame image, and when the number of the target images is smaller than the preset value, determining that the human body does not exist in the current frame image. It can be understood that, since the secret density value of the heat source is a pixel for distinguishing whether the pixel of the heat source is a human heat source, as long as the density value of the heat source of one pixel of the heat source is greater than the preset density threshold, it indicates that a human body is present, that is, the preset value is preferably 1.
In the embodiment of the invention, the small-sized infected heat source can be effectively filtered, the interference of the small-sized interference heat source on the detection of the human body is reduced, and the misjudgment rate is reduced by calculating the heat source density value of the heat source pixel point and comparing the heat source density value with the preset density threshold value.
Optionally, under the condition that the human body exists in the current frame image, whether the human body exists for too long or not can be further determined, if so, an alarm needs to be given, and the scheme is preferably applied to home scenes, nursing home scenes and the like so as to give an alarm in time when abnormal conditions can occur to weak groups such as old people, children and the like.
Referring to fig. 5, a flow chart of an additional step of the embodiment of fig. 1 and 2 according to the embodiment of the present invention includes:
step 501, if it is determined that a human body exists in the current image frame, adding a timestamp of the current image frame to a timestamp list, wherein the timestamp list includes timestamps of continuous multi-frame image frames, and each frame of image frame detects that the human body exists;
step 502, determining a time difference between a first time stamp and a last time stamp in a time stamp list;
and step 503, outputting a human body overtime stay alarm when the time difference is greater than or equal to a preset time threshold.
A time stamp list for storing time stamps of consecutive multi-frame image frames each of which detects the presence of a human body may be previously set, the initial state of the time stamp list being empty, and the image frame in which the presence of the human body is determined being added to the time stamp list each time the presence of the human body is detected. For example, if N image frames are already stored in the timestamp list, it indicates that human bodies are detected in all the N image frames, and the N image frames are continuous image frames, when the next frame of the N image frames, i.e., the n+1 image frames, is determined to have human bodies according to the technical scheme in the embodiment of the present invention, the n+1 image frames are also stored in the timestamp list, and if it is determined that no human bodies exist, the timestamp list is emptied. By setting the time stamp list, it is possible to determine the length of time when the presence of the human body is detected, and further determine whether a human body timeout stay alert is required.
Specifically, in the embodiment of the invention, when it is determined that the current image frame has a human body, the time stamp of the current image frame is added to the time stamp list, and the time difference between the first time stamp and the last time stamp in the time stamp list is determined, when the time difference is greater than or equal to the preset duration threshold, the time difference indicates that the human body residence time has reached the warning standard, a human body overtime residence alarm is output, and various output modes of the human body overtime residence alarm are adopted, for example, the method can be used for sending a short message to a specified telephone number, making a call, and the like, or can be used for controlling an alarm to send an alarm sound. In practical application, the output mode of the alarm for stopping overtime of the human body can be set according to specific requirements, and the method is not limited herein.
In the embodiment of the invention, the thermal imaging video and the preset sigma criterion are used for detecting the heat source pixel points of the current image frame, so that the influence of the gradual heat source in the environment can be removed based on the sigma criterion, the heat source pixel points such as a human body heat source, a small interference heat source and the like can be effectively realized, the accuracy of the identified heat source pixel points is high, and the accuracy of human body existence detection can be improved. And furthermore, by utilizing the heat source density value of the heat source pixel points, the human body heat source and the small-sized interference heat source can be effectively distinguished, and the accuracy of human body presence detection is further improved. In addition, the time length for detecting the existence of the human body can be determined by setting the time stamp list, so that whether the overtime alarm of the human body stay is required to be performed or not is determined based on the time length, the method is particularly suitable for home scenes and nursing homes, and the safety of the human body can be ensured.
Referring to fig. 6, a schematic structural diagram of a human presence detection device according to an embodiment of the invention includes:
an obtaining module 601, configured to obtain a thermal imaging video, where the thermal imaging video includes image frames of a continuous preset frame number, and a last frame of the thermal imaging video is a current image frame, and pixel values of each pixel point in the image frame are temperature values;
the detection module 602 is configured to detect a heat source pixel point of the current image frame according to the thermal imaging video and a preset sigma criterion, so as to obtain a target image frame, where the target image frame includes the detected heat source pixel point;
a determining module 603, configured to determine whether a human body exists in the current image frame according to the heat source pixel points included in the target image frame.
In the embodiment of the present invention, the content of the obtaining module 601, the detecting module 602, and the determining module 603 may refer to the related content in the embodiment of the method, which is not described herein.
In the embodiment of the invention, the heat source pixel point detection is carried out on the current image frame by using the thermal imaging video and the preset sigma criterion, so that the self-adaptive denoising of the gradual heat source (such as solar irradiation, air conditioner and the like) in the environment can be effectively realized, the change of the environment can be effectively adapted, the accuracy of the heat source pixel point detection is improved, and the accuracy of the human body presence detection is further improved.
In one embodiment, a computer-readable storage medium is provided, storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
acquiring a thermal imaging video, wherein the thermal imaging video comprises continuous image frames with preset frames, the last frame of the thermal imaging video is a current image frame, and pixel values of all pixel points in the image frame are temperature values;
detecting heat source pixel points of the current image frame according to the thermal imaging video and a preset sigma criterion to obtain a target image frame, wherein the target image frame comprises the detected heat source pixel points;
and determining whether a human body exists in the current image frame according to the heat source pixel points contained in the target image frame.
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 the various 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 above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (7)

1. A human presence detection method, the method comprising:
acquiring a thermal imaging video, wherein the thermal imaging video comprises continuous image frames with preset frames, the last frame of the thermal imaging video is a current image frame, and pixel values of all pixel points in the image frame are temperature values;
detecting heat source pixel points of the current image frame according to the thermal imaging video and a preset sigma criterion to obtain a target image frame, wherein the target image frame comprises the detected heat source pixel points;
determining whether a human body exists in the current image frame according to the heat source pixel points contained in the target image frame;
and detecting the heat source pixel point of the current image frame according to the thermal imaging video and a preset sigma criterion to obtain a target image frame, wherein the method comprises the following steps:
calculating a target pixel point in the current image frame, wherein the target pixel point is any pixel point in the current image frame, and the pixel value average value and the standard deviation value of the pixel points at the same position in each image frame contained in the thermal imaging video are used as the pixel value average value and the standard deviation value of the target pixel point;
based on the sigma criterion, obtaining a pixel value of the target pixel in the target image frame according to a pixel value average value and a standard deviation value of the target pixel and a pixel value of the target pixel in the current image frame, and determining whether the target pixel is the heat source pixel based on the pixel value of the target pixel;
the step of obtaining the pixel value of the target pixel in the target image frame according to the average value and the standard deviation of the pixel value of the target pixel and the pixel value of the target pixel in the current image frame based on the sigma criterion, and determining whether the target pixel is the heat source pixel based on the pixel value of the target pixel comprises the following steps:
subtracting the average value of the pixel values of the target pixel points from the pixel values of the target pixel points in the current image frame, and subtracting the standard deviation value of the target pixel points with a preset multiple to obtain the residual pixel values of the target pixel points;
determining a pixel value of the target pixel point in the target image frame according to the residual pixel values, and determining whether the target pixel point is a heat source pixel point or not based on the pixel value of the target pixel point;
wherein the determining, according to the remaining pixel values, the pixel value of the target pixel point in the target image frame, and determining, based on the pixel value of the target pixel point, whether the target pixel point is a heat source pixel point, includes:
when the residual pixel value is larger than a preset threshold value, determining that the pixel value of the target pixel point in the target image frame is a first numerical value, and the target pixel point is the heat source pixel point;
and when the residual pixel value is smaller than or equal to the preset threshold value, determining that the pixel value of the target pixel point in the target image frame is a second value, and the target pixel point is a non-heat source pixel point.
2. The method of claim 1, wherein determining whether a human body is present in the current image frame based on the heat source pixel points contained in the target image frame comprises:
determining position coordinate values of each heat source pixel point in the target image frame;
determining a heat source density value of each heat source pixel point according to the position coordinate value of each heat source pixel point, wherein the heat source density value represents the number of the heat source pixel points in a preset range taking the heat source pixel point as the center;
and determining whether a human body exists in the current frame image according to the heat source density value of each heat source pixel point.
3. The method of claim 2, wherein determining a heat source density value for each of the heat source pixels based on the position coordinate values for each of the heat source pixels comprises:
calculating distances between a target heat source pixel point and other heat source pixel points except the target heat source pixel point in the target image frame 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 target image frame;
and determining the distance number of the distance values smaller than or equal to a preset distance threshold value in the distance set, and determining the distance number as the heat source density value of the target heat source pixel point.
4. The method of claim 2, wherein determining whether a human body is present in the current frame image according to the heat source density value of each heat source pixel point comprises:
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 target image frame;
when the number of targets is greater than or equal to a preset value, determining that a human body exists in the current frame of image frames;
and when the target number is smaller than the preset value, determining that no human body exists in the current frame image.
5. The method of claim 1, wherein determining whether a human body is present in the current image frame based on the heat source pixel points included in the target image frame further comprises:
if the fact that the human body exists in the current image frame is determined, adding the time stamp of the current image frame into a time stamp list, wherein the time stamp list comprises time stamps of continuous multi-frame image frames, and each frame of image frame detects the existence of the human body;
determining a time difference between a first time stamp and a last time stamp in the list of time stamps;
and outputting a human body overtime stay alarm when the time difference is greater than or equal to a preset duration threshold value.
6. A human presence detection device, 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 thermal imaging video, the thermal imaging video comprises continuous image frames with preset frames, the last frame of the thermal imaging video is a current image frame, and pixel values of all pixel points in the image frame are temperature values;
the detection module is used for detecting the heat source pixel points of the current image frame according to the thermal imaging video and a preset sigma criterion to obtain a target image frame, wherein the target image frame comprises the detected heat source pixel points;
the determining module is used for determining whether a human body exists in the current image frame according to the heat source pixel points contained in the target image frame;
the detection module is further configured to calculate a target pixel point in the current image frame, and the target pixel point is any one pixel point in the current image frame, where the pixel value mean and the standard deviation of the pixel points at the same position in each image frame included in the thermal imaging video are used as the pixel value mean and the standard deviation of the target pixel point;
based on the sigma criterion, obtaining a pixel value of the target pixel in the target image frame according to a pixel value average value and a standard deviation value of the target pixel and a pixel value of the target pixel in the current image frame, and determining whether the target pixel is the heat source pixel based on the pixel value of the target pixel;
the detection module is further configured to subtract a mean value of pixel values of the target pixel points from a pixel value of the target pixel points in the current image frame, and subtract a standard deviation value of the target pixel points by a preset multiple to obtain a remaining pixel value of the target pixel points;
determining a pixel value of the target pixel point in the target image frame according to the residual pixel values, and determining whether the target pixel point is a heat source pixel point or not based on the pixel value of the target pixel point;
the detection module is further configured to determine that a pixel value of the target pixel point in the target image frame is a first value and the target pixel point is the heat source pixel point when the remaining pixel value is greater than a preset threshold value;
and when the residual pixel value is smaller than or equal to the preset threshold value, determining that the pixel value of the target pixel point in the target image frame is a second value, and the target pixel point is a non-heat source pixel point.
7. 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 5.
CN202010792951.2A 2020-08-06 2020-08-06 Human body presence detection method and related device Active CN112101104B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010792951.2A CN112101104B (en) 2020-08-06 2020-08-06 Human body presence detection method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010792951.2A CN112101104B (en) 2020-08-06 2020-08-06 Human body presence detection method and related device

Publications (2)

Publication Number Publication Date
CN112101104A CN112101104A (en) 2020-12-18
CN112101104B true CN112101104B (en) 2024-04-09

Family

ID=73752992

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010792951.2A Active CN112101104B (en) 2020-08-06 2020-08-06 Human body presence detection method and related device

Country Status (1)

Country Link
CN (1) CN112101104B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114636235A (en) * 2022-03-07 2022-06-17 青岛海信日立空调系统有限公司 Air conditioner and control method thereof

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106303157A (en) * 2016-08-31 2017-01-04 广州市百果园网络科技有限公司 A kind of vedio noise reduction processing method and vedio noise reduction processing means
WO2017005062A1 (en) * 2015-07-07 2017-01-12 深圳Tcl数字技术有限公司 Image frame playing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9036902B2 (en) * 2007-01-29 2015-05-19 Intellivision Technologies Corporation Detector for chemical, biological and/or radiological attacks

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017005062A1 (en) * 2015-07-07 2017-01-12 深圳Tcl数字技术有限公司 Image frame playing method and device
CN106303157A (en) * 2016-08-31 2017-01-04 广州市百果园网络科技有限公司 A kind of vedio noise reduction processing method and vedio noise reduction processing means

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
黄翰瑜 ; .监控视频中人体特殊行为的检测方法研究――以撞墙行为为例.电视技术.2013,(07),全文. *

Also Published As

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

Similar Documents

Publication Publication Date Title
EP1936576A1 (en) Camera tampering detection
CN112101104B (en) Human body presence detection method and related device
US20230162397A1 (en) Temperature correction method, device and system
CN107122743B (en) Security monitoring method and device and electronic equipment
KR20210132380A (en) The system and the method for detecting fire based on thermal and real images
CN111461078A (en) Anti-fishing monitoring method based on computer vision technology
US20130162834A1 (en) Integrated video quantization
CN112036279A (en) Intelligent building monitoring method and system
CN112037176A (en) Human presence detection device
CN105469054A (en) Model construction method of normal behaviors and detection method of abnormal behaviors
CN110542482B (en) Blind pixel detection method and device and electronic equipment
CN113483896A (en) Power equipment temperature measuring method and device, computer equipment and storage medium
CN115272952A (en) Safety monitoring method, device and system for new energy capital construction and storage medium
CN112101151B (en) Method and related device for detecting whether human body exists in fixed area
CN114550256A (en) Method, device and equipment for detecting tiny target and computer readable medium
CN113393628A (en) Intelligent monitoring alarm method, system, intelligent terminal and storage medium
CN115474038A (en) Camera shielding detection method and device, electronic equipment and storage medium
CN113405664B (en) Temperature measurement method, temperature measurement equipment and machine-readable storage medium
CN112073652A (en) Position locating device
CN113155292A (en) Face temperature measurement method, face temperature measurement instrument and storage medium
CN112050944B (en) Gate position determining method and related device
US20230147316A1 (en) Forest fire detection systemand method capable of determining whether events are same
TWI569212B (en) Image recognition method
CN112180792B (en) Alarm processing method and device for photovoltaic system and monitoring equipment
CN111225178A (en) Video monitoring method and system based on object detection

Legal Events

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