CN111985297A - Human body existence detection method and device, storage medium and computer equipment - Google Patents

Human body existence detection method and device, storage medium and computer equipment Download PDF

Info

Publication number
CN111985297A
CN111985297A CN202010552505.4A CN202010552505A CN111985297A CN 111985297 A CN111985297 A CN 111985297A CN 202010552505 A CN202010552505 A CN 202010552505A CN 111985297 A CN111985297 A CN 111985297A
Authority
CN
China
Prior art keywords
image
heat source
target
human body
detection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010552505.4A
Other languages
Chinese (zh)
Inventor
金欢欢
尹海波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Shuliantianxia Intelligent Technology Co Ltd
Original Assignee
Shenzhen Shuliantianxia Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Shuliantianxia Intelligent Technology Co Ltd filed Critical Shenzhen Shuliantianxia Intelligent Technology Co Ltd
Priority to CN202010552505.4A priority Critical patent/CN111985297A/en
Publication of CN111985297A publication Critical patent/CN111985297A/en
Pending legal-status Critical Current

Links

Images

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/40Spoof detection, e.g. liveness detection
    • G06V40/45Detection of the body part being alive

Landscapes

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

Abstract

The embodiment of the invention discloses a human body existence detection method and device, a storage medium and computer equipment, wherein the method comprises the following steps: the method comprises the steps of obtaining a first image, wherein the first image is a live body detection image of a target position detected by thermal imaging equipment at a target moment, pixel values of all pixel points of the live body detection image are temperature values detected by the thermal imaging equipment, carrying out heat source detection on the first image based on a statistical abnormal point detection method to obtain a second image, filtering non-human heat sources smaller than a preset size in the second image to obtain a target image, and detecting whether a human body exists at the target moment at the target position according to the number of residual heat sources in the target image. The heat source that exists in the first image can be effectively discerned, and the small-size interference heat source in the heat source that can effectively the filtering discerns can effectively reduce the interference that small-size interference heat source caused under the scene of living in, improves the degree of accuracy that exists the detection to the human body.

Description

Human body existence detection method and device, storage medium and computer equipment
Technical Field
The invention relates to the technical field of image processing, in particular to a human body existence detection method and device, a storage medium and computer equipment.
Background
With the rapid development of social economy and the increasing enhancement of comprehensive national power, the living standard of people is gradually improved, the safety requirement for living is increased day by day, and the monitoring of living environment is an important part of living safety.
The infrared thermal imaging device can sense the temperature of an object in a monitored environment range, and is also applied to safety monitoring to detect whether a human body exists, however, in a residential environment, because a great number of small interference heat sources exist, such as a hot water kettle, a heating charger and the like, when the infrared thermal imaging device is used for detecting whether the human body exists, the small interference heat sources can bring interference, and the human body existence detection accuracy is low.
Disclosure of Invention
In view of the above, it is necessary to provide a human presence detection method, apparatus, computer device and storage medium for solving the problem of low accuracy of human presence detection caused by the presence of a small infectious heat source in the prior art.
In a first aspect, the present application provides a human presence detection method, the method comprising:
acquiring a first image, wherein the pixel value of each pixel point in the first image is a temperature value;
performing heat source detection on the first image by using an abnormal point detection method based on statistics to obtain a second image;
filtering the non-human heat source with the size smaller than the preset size in the second image to obtain a target image;
and detecting whether a human body exists in the first image or not according to the number of the residual heat sources in the target image.
Optionally, the statistically based anomaly detection method performs heat source detection on the first image to obtain a second image, including:
determining a pixel value threshold of an outlier in the first image according to a quartile method;
and traversing the first image, and setting the pixel value smaller than the pixel value threshold value in the first image to be zero to obtain the second image.
Optionally, the filtering the non-human heat source smaller than the preset size in the second image to obtain a target image includes:
and processing the second image by adopting an open operation method, and filtering out a non-human heat source with a size smaller than a preset size in the second image to obtain a target image.
Optionally, after the acquiring the first image, the method further includes:
determining a quantile numerical value corresponding to the first image at a preset quantile point;
and replacing the pixel value which is greater than the preset human body temperature value in the first image by using the quantile value to obtain a preprocessed first image.
Optionally, after the acquiring the first image, the method further includes:
and performing main feature reconstruction on the first image to obtain a reconstructed first image.
Optionally, the performing principal feature reconstruction on the first image to obtain a reconstructed first image includes:
singular value decomposition is carried out on the first image to obtain a diagonal matrix, a right singular matrix and a left singular matrix after decomposition;
carrying out reconstruction characteristic selection according to the diagonal matrix to obtain a target diagonal matrix;
and performing data reconstruction by using the target diagonal matrix, the right singular matrix and the left singular matrix to obtain a reconstructed first image.
Optionally, the detecting whether a human body exists in the first image according to the number of the remaining heat sources in the target image includes:
when the number of the residual heat sources in the target image is zero, determining that no human body exists in the first image;
and when the number of the residual heat sources in the target image is non-zero, determining that the human body exists in the first image.
In a second aspect, the present application provides a human presence detection apparatus, the apparatus comprising:
the acquisition module is used for acquiring a first image, and the pixel value of each pixel point in the first image is a temperature value;
the heat source detection module is used for carrying out heat source detection on the first image based on an abnormal point detection method of statistics to obtain a second image;
the filtering module is used for filtering the non-human heat source with the size smaller than the preset size in the second image to obtain a target image;
and the existence detection module is used for detecting whether a human body exists in the first image according to the number of the residual heat sources in the target image.
In a third aspect, an embodiment of the present application further provides a computer device, including a memory and a processor, where the memory stores a computer program, and the computer program, when executed by the processor, causes the processor to perform the following steps:
acquiring a first image, wherein the pixel value of each pixel point in the first image is a temperature value;
performing heat source detection on the first image by using an abnormal point detection method based on statistics to obtain a second image;
filtering the non-human heat source with the size smaller than the preset size in the second image to obtain a target image;
and detecting whether a human body exists in the first image or not according to the number of the residual heat sources in the target image.
In a fourth aspect, embodiments of the present application further provide a computer-readable storage medium storing a computer program, which when executed by a processor, causes the processor to perform the following steps:
acquiring a first image, wherein the pixel value of each pixel point in the first image is a temperature value;
performing heat source detection on the first image by using an abnormal point detection method based on statistics to obtain a second image;
filtering the non-human heat source with the size smaller than the preset size in the second image to obtain a target image;
and detecting whether a human body exists in the first image or not according to the number of the residual heat sources in the target image.
The embodiment of the invention has the following beneficial effects: the method comprises the steps of obtaining a first image, wherein the first image is a live body detection image of a target position detected by thermal imaging equipment at a target moment, the pixel value of each pixel point of the live body detection image is a temperature value detected by the thermal imaging equipment, carrying out heat source detection on the first image based on a statistical abnormal point detection method to obtain a second image, filtering out non-human heat sources smaller than a preset size in the second image to obtain a target image, and detecting whether a human body exists at the target moment at the target position according to the number of the residual heat sources in the target image. The method comprises the steps of carrying out heat source detection on a first image through an anomaly detection method based on statistics, enabling a heat source existing in the first image to be effectively identified, and filtering a non-human heat source smaller than a preset size in a second image, enabling a small interference heat source in the identified heat source to be effectively filtered, effectively reducing interference caused by the small interference heat source in a living scene, and improving accuracy of human body existence detection.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Wherein:
fig. 1 is a schematic flow chart of a human presence detection method in an embodiment of the present application;
FIG. 2 is another schematic flow chart of a human presence detection method according to an embodiment of the present application;
FIG. 3 is a flow chart illustrating a refinement step of step 203 in the embodiment of FIG. 2 of the present application;
FIG. 4a is a schematic diagram of a first image in an embodiment of the present application;
FIG. 4b is a schematic diagram of a reconstructed first image according to an embodiment of the present disclosure;
FIG. 4c is a schematic diagram of a second image in an embodiment of the present application;
FIG. 4d is a schematic diagram of a target image in an embodiment of the present application;
FIG. 5 is a schematic structural diagram of a human presence detection apparatus according to an embodiment of the present application;
fig. 6 is a block diagram of a computer device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without any inventive step, shall fall within the scope of the present invention.
Please refer to fig. 1, which is a schematic flow chart of a human presence detection method according to an embodiment of the present application, the method includes:
step 101, acquiring a first image, wherein the pixel value of each pixel point in the first image is a temperature value;
in the embodiment of the present application, the human presence detecting method is implemented by a human presence detecting device (hereinafter, simply referred to as a detecting device), where the detecting device is a program module and is stored in a storage medium of the device, and a processor in the device can call and operate the detecting device from the storage medium to implement the human presence detecting method. The apparatus in which the detection device is stored may be an apparatus having an image processing function.
The detection device acquires a first image, and the pixel value of each pixel point in the first image is a temperature value. Specifically, the first image may be an image captured by a thermal imaging device, the thermal imaging device obtains an image with a pixel value as a temperature value by using an infrared thermal imaging technology, the infrared thermal imaging technology uses a photoelectric technology to detect an infrared specific waveband signal radiated by an object, converts the signal into an image and a graph which can be distinguished by human vision, and can further calculate the temperature value, and the infrared thermal imaging technology enables a human to exceed a visual barrier and see a temperature distribution condition of the surface of the object. Most of the infrared thermal imaging technologies are used for detecting two wave bands of 3-5 microns of medium wave and 8-12 microns of long wave and calculating and displaying the surface temperature distribution of an object, and the two wave bands are mainly detected because of good penetration rate.
The thermal imaging device may be a low-resolution thermal imaging device, or may also be a high-resolution thermal imaging device, and in a possible implementation manner, the low-resolution thermal imaging device may be used to obtain the first image, or the high-resolution thermal imaging device may be used to obtain the second image, because both the low-resolution thermal imaging device and the high-resolution thermal imaging device have an advantage of good privacy, the low-resolution thermal imaging device and the high-resolution thermal imaging device may be effectively applied in a living scene, such as a home scene and an old home scene, so that the presence of a human body may be determined by using the human body presence detection method in the embodiment of the present application under the condition of protecting the privacy of a client. And this application embodiment is particularly useful for the asylum for the aged scene, can implement effective healthy safety control to the old man, promotes intellectuality.
If the first image is acquired by using a low-resolution thermal imaging device, the first image is a low-resolution human presence detection image, and if the first image is acquired by using a high-resolution thermal imaging device, the first image is a high-resolution human presence detection image.
Wherein, thermal imaging device includes infrared thermal imaging camera, and this infrared thermal imaging camera can install in the region that needs the control, and is preferred, can install the center at the top in the region that needs the control, and the perpendicular downwards image of shooing of infrared thermal imaging camera. For example, if monitoring of the toilet is required to determine whether a person is present in the toilet, the infrared thermal imaging camera may be mounted at a central location directly above the roof of the toilet, and may be at a height in the range of 2.3 meters to 3.3 meters from the ground.
In the embodiment of the present application, a single image is processed to detect whether a human body exists, and in addition, the human body existence can be detected through continuous multi-frame image images to determine the starting time, the ending time, the existing duration and the like of the human body existence under the condition that the human body exists. In this embodiment, if a low-resolution infrared thermal imaging camera is taken as an example, the sampling frame rate of the low-resolution infrared thermal imaging camera is 16, that is, the sampling rate is 16Hz, 16 images can be generated per second, each video includes 16 images, each image includes 32 × 24 pixel points, and the value of each pixel point is the temperature value of the corresponding position. If it is detected that the image at the time point a has a human body, all the images from the time point a to the time point B have the human body, and the image after the time point B does not have the human body, it may be determined that the starting point of the time when the human body exists is the time point a, the ending point is the time point B, and the duration is the time point B minus the time point a.
102, carrying out heat source detection on the first image by using an abnormal point detection method based on statistics to obtain a second image;
in the embodiment of the present application, the heat source detection may be performed on the first image based on a statistical abnormal point detection method, and the imaging point of the heat source in the first image is regarded as an abnormal point, that is, the abnormal point detected in the first image based on the statistical abnormal point detection method may be regarded as an imaging point of the heat source in the second image, so that the distribution of the imaging point of the heat source in the second image can be determined by the abnormal point detection method, and in the case of determining the distribution, the number, the size, and the position of the heat source existing in the second image may be determined.
103, filtering the non-human heat source with the size smaller than a preset size in the second image to obtain a target image;
and 104, detecting whether a human body exists in the first image according to the number of the residual heat sources in the target image.
In the embodiment of the application, after the heat source detection is performed on the first image to obtain the second image, the non-human heat source smaller than the preset size in the second image is filtered to obtain the target image.
The non-human heat source smaller than the preset size can be regarded as a small interference heat source, such as a kettle for heating, a cup filled with hot water, a charger for generating heat, a small pet and the like, and the small interference heat source has the characteristics of small and sparse imaging area, while in general, the human heat source has the characteristic of large and concentrated imaging area, so that the small interference heat source can be filtered in a filtering manner to leave the human heat source, and the target image can be obtained.
Further, whether a human body exists in the first image is detected according to the number of the remaining heat sources in the target image, specifically, whether the number of the remaining heat sources in the target image is zero is judged, when the number of the remaining heat sources in the target image is zero, it can be determined that the human body does not exist in the first image, and when the number of the remaining heat sources in the target image is non-zero, it can be determined that the human body exists in the first image.
In the embodiment of the application, a first image is obtained, the first image is a live body detection image of a target position detected by a thermal imaging device at a target moment, pixel values of pixel points of the live body detection image are temperature values detected by the thermal imaging device, heat source detection is performed on the first image based on a statistical abnormal point detection method to obtain a second image, a non-human heat source smaller than a preset size in the second image is filtered to obtain the target image, and whether a human body exists at the target moment at the target position is detected according to the number of residual heat sources in the target image. The heat source detection is carried out on the first image through an anomaly detection method based on statistics, so that the heat source existing in the first image can be effectively identified, and the non-human heat source smaller than the preset size in the second image is filtered, so that the small interference heat source in the identified heat source can be effectively filtered, the interference caused by the small interference heat source can be effectively reduced in a living scene, and the accuracy of human body existence detection is improved.
For better understanding of the technical solution in the embodiment of the present application, please refer to fig. 2, which is another schematic flow chart of the human presence detecting method in the embodiment of the present application, the method includes:
step 201, obtaining a first image, wherein a pixel value of each pixel point in the first image is a temperature value;
it can be understood that the content described in this step is similar to the content described in step 101 in the embodiment shown in fig. 1, and specific reference may be made to the related content in step 101 in the embodiment shown in fig. 1, which is not described herein again.
Step 202, preprocessing the first image to obtain a preprocessed first image;
in this embodiment of the present application, after the first image is acquired, preprocessing for reducing noise may be performed on the first image to obtain a preprocessed first image. Specifically, the pretreatment process comprises the following steps:
a1, determining a quantile numerical value corresponding to a preset quantile point of the first image;
and step B1, replacing the pixel value which is larger than the preset human body temperature value in the first image by the quantile value to obtain a preprocessed first image.
In order to better understand the technical solution in the embodiments of the present application, the following description will be made of the branch points.
The quantiles are also called percentile calculation, and refer to numerical points which divide the probability range of a random variable into several equal parts, and commonly used are median points (also called binary points or 50 quantiles), quartile points, percentile points and the like. The calculation principle is as follows:
the arrays are first sorted from small to large, and then i, j is calculated:
(n-1) × p/100 ═ i + j formula (1)
Wherein n is the number of elements in the array, the integer part of the calculation result is represented by i, the decimal part is represented by j, and p represents the quantile point. The final fractional value res corresponding to the p fractional sites is:
res ═ 1-j + array [ i ] + j array [ i +1] equation (2)
Where array [ i ] represents the i +1 th number in the array.
A specific example of the process for obtaining corresponding quantile values based on quantiles is as follows:
for an array [1,2,3,6,4,5,6,6,6,7,8,9], a quantile value corresponding to its 90 quantile point needs to be calculated, and first, the array is sorted from small to large to obtain [1,2,3,4,5,6,6,6,6,7, 8,9 ].
Substituting n-12 and p-90 into the above formula (1) is calculated as follows:
(n-1)*p/100=(12-1)*90/100=9.9
therefore, it can be determined that i is 9 and j is 0.9. Looking up the sorted array, it can be seen that array [ i ] ═ array [9] ═ 7, array [ i +1] ═ array [10] ═ 8, and substituting into the above formula (2), that the fractional value corresponding to the 90-fractional point of the above array is:
res=(1-j)*array[i]+j*array[i+1]=(1-0.9)*7+0.9*8=7.9
the above is an introduction to the concept of a split point.
In the embodiment of the present application, the quantile point is used, and specifically, in the process of preprocessing the first image, the quantile value corresponding to the preset quantile point of the first image is determined. For example, a quantile value corresponding to a 50 quantile point of the first image may be calculated. And after the quantile value is obtained, the quantile value can be used for replacing a pixel value which is larger than a preset human body temperature value in the first image, and the preprocessed first image is obtained.
In the embodiment of the present application, the quantile value corresponding to the preset quantile point is usually smaller than the preset human body temperature value, and the pixel value that is greater than the preset human body temperature value is replaced by the quantile value corresponding to the quantile point, so that the pixel value that obviously does not belong to the human body temperature in the first image can be removed, for example, the temperature of a kettle that just boils water may be 90 degrees, but the human body temperature has an upper limit and cannot reach 90 degrees.
Step 203, performing main feature reconstruction on the first image to obtain a reconstructed first image;
in the embodiment of the application, after the first image is preprocessed, main feature reconstruction may be further performed on the preprocessed first image to obtain a reconstructed first image, and stability of a pixel value in the first image is improved in a reconstruction manner, so as to further improve accuracy of human presence detection on the first image.
It should be noted that, in the embodiment shown in fig. 2, the preprocessing process in step 202 is performed first, and then the main feature reconstruction in step 203 is performed, in practical applications, there is no necessary precedence relationship between step 202 and step 203, and the main feature reconstruction in step 203 may be performed first, and then the preprocessing process in step 202 is performed, and further, in practical applications, whether to perform step 202, whether to perform step 203, for example, if the first image is an image obtained by a high-resolution imaging device, and is a high-resolution image, the high resolution image will typically have stable pixel values, and the performance of step 203 will have little effect, it may be chosen not to perform step 203 described above in the scenario where the first image is a high resolution image. If the first image is an image obtained based on a low-resolution imaging device, and is a low-resolution image, the pixel value of the low-resolution image is usually unstable, and particularly under the condition of a higher frame rate, the step 203 is executed to effectively improve the stability of the low-resolution image, so that the step 203 may be executed in a scene where the first image is a low-resolution image to obtain the first image with the pixel value having better stability, so as to improve the accuracy of human presence detection on the first image. Therefore, in practical applications, whether to execute step 202 and step 203, and the sequence of executing step 202 and step 203 may be determined according to actual needs, and are not limited herein. It is understood that, if step 202 is executed first and then step 203 is executed, the first image in step 203 is the preprocessed first image, and the first image in step 204 is the reconstructed first image. If step 203 is executed first, and then step 202 is executed, the first image is reconstructed to obtain a reconstructed first image, then the reconstructed first image is preprocessed to obtain a preprocessed first image, the first image in step 204 is the preprocessed first image, and other scenes can be analogized in sequence, and details are not repeated here.
In a possible implementation manner, the reconstruction of the main feature of the first image may be implemented based on singular value decomposition, and referring to fig. 3 in particular, the flowchart of the refining step of step 203 in the embodiment shown in fig. 2 is shown, and includes:
301, performing singular value decomposition on the first image to obtain a diagonal matrix, a right singular matrix and a left singular matrix after decomposition;
302, selecting reconstruction characteristics according to the diagonal matrix to obtain a target diagonal matrix;
and 303, performing data reconstruction by using the target diagonal matrix, the right singular matrix and the left singular matrix to obtain a reconstructed first image.
(1) Singular value decomposition
Singular Value Decomposition (SVD) is an important matrix Decomposition in linear algebra, and is a generalization of eigen Decomposition on arbitrary matrices. Specifically, the method comprises the following steps: the matrix can be considered as a linear transformation whose effect can include three types of effects, rotation, scaling and projection. Singular value decomposition is just one of the three effects of linear transformation, taking singular value decomposition of matrix a as an example: the A matrix is used for rotating a vector from the space of the set of orthogonal basis vectors of V to the space of the set of orthogonal basis vectors of U, and carrying out certain scaling on each direction, wherein the scaling factor is each singular value in the S. If the dimension ratio is large, it means that projection is also performed. It can be said that singular value decomposition decomposes the three effects of the original mixing of a matrix.
In the embodiment of the present application, singular value decomposition is performed on the first image to obtain a diagonal matrix, a right singular matrix, and a left singular matrix after decomposition, as follows:
Am×n=Um×mSm×nVn×n
wherein A ism×nRepresenting a first image, m × n representing a resolution of the first image, Um×mExpressed as a left singular matrix, Sm×nRepresenting a diagonal matrix, Vn×nRepresenting the right singular matrix. Wherein, the diagonal matrix Sm×nThe non-zero eigenvalues on the middle diagonal are arranged from top to bottom in descending order.
(2) Reconstruction feature selection
In the embodiment of the application, after singular value decomposition is performed on a first image, reconstruction feature selection is performed on a diagonal matrix obtained through decomposition, and a target diagonal matrix is obtained.
The proportion q of the main feature to the total feature can be obtained first, the proportion can be a preset value, and the diagonal matrix S obtained by decomposition is calculatedm×nThe sum k of the eigenvalues on the middle diagonal line, the selected eigenvalue is the diagonal matrix Sm×nAnd adding the minimum eigenvalue more than k x P to the medium eigenvalue from large to small to form the target diagonal matrix.
In particular, if the diagonal matrix Sm×nThe characteristic value on the middle diagonal is S ═ diag (a)1,a2,...,ar0., 0), the sum k of the feature values on the diagonal line and the threshold t obtained by the ratio q are (a)1+a2+...+ar)*q。
Traverse diagonal matrix Sm×nCharacteristic value on diagonal line, for maximum characteristic value a1If a1If the value is larger than or equal to the threshold value t, the reconstructed target diagonal momentArray is sr=diag(a1) If a1If the value is less than the threshold value t, a is calculated1+a2At a1+a2When the value is larger than or equal to the threshold value t, the target diagonal matrix after reconstruction is sr=diag(a1,a2) And so on for other cases. In general, if a1+a2+…+ac-1<t,a1+a2+…ac-1+acIf t is greater than or equal to t, the target diagonal matrix after reconstruction is
Figure RE-GDA0002725111050000111
(3) Reconstruction
In the embodiment of the application, after the target diagonal matrix is obtained, data reconstruction is performed by using the target diagonal matrix, the right singular matrix and the left singular matrix, so as to obtain a reconstructed first image.
In particular, the reconstructed first image
Figure BDA0002542247470000121
Comprises the following steps:
Figure BDA0002542247470000122
Um×ca matrix consisting of the first m rows and the first c columns of the left singular matrix is represented,
Figure BDA0002542247470000123
representing the target diagonal matrix, Vc×nAnd a matrix formed by the first c rows and the first n columns of the right singular matrix.
It can be understood that the low-resolution first image is unstable in pixel value due to the problems of low resolution and stability of the low-resolution thermal imaging apparatus, and the accuracy of human presence detection on the first image can be improved due to the stable pixel value, so that the above-mentioned main feature reconstruction method is preferably applied to the low-resolution first image for the purpose of obtaining an image with stable pixel value.
Different from wavelet reconstruction (filtering frequency characteristics belonging to noise), the singular value decomposition reconstruction method adopted by the invention is characterized in that the characteristics with higher characteristic variation degree are reserved from the variation degree of the characteristics, and then the reconstruction of the image is completed through the high variation characteristics, so that the stability of the pixel value in the reconstructed first image can be effectively improved.
204, carrying out heat source detection on the first image by using an abnormal point detection method based on statistics to obtain a second image;
in the embodiment of the invention, the imaging point of the heat source in the first image is taken as the abnormal point, and the detection of the imaging point of the heat source can be realized by utilizing a statistical abnormal point detection method. It should be noted that, the inventors have found through creative work on the basis of a large number of experiments that when no person enters the imaging area of the thermal imaging apparatus, the abnormal value detected by the abnormal point detection method based on statistics is caused by a small interfering heat source, so as to determine that the abnormal point detection method can be used for heat source detection, and since a human is also a heat source, the abnormal point detection method can also be detected.
Specifically, the above-mentioned abnormal point detection method based on statistics may specifically be a quartile method, and the manner of performing heat source detection based on the quartile method is as follows:
step a, determining a pixel value threshold of an abnormal point in the first image according to a quartile method;
and b, traversing the first image, and setting the pixel value smaller than the pixel value threshold value in the first image to be zero to obtain the second image.
In one possible implementation, the pixel value threshold for the outlier in the first image needs to be determined according to a quartile method. The method comprises the following specific steps:
a1, two different quantiles can be selected, for example 75 quantile and 25 quantile, and the quantile values corresponding to the two different quantiles can be calculated, for example,
Figure BDA0002542247470000131
a2, calculating the quartile difference between the two quantile values corresponding to the two different quantile points, such as:
Figure BDA0002542247470000132
Figure BDA0002542247470000133
a3, calculating the pixel value threshold of the outlier in the first image by using the quantile value corresponding to the 75 quantile point and the quartile difference, such as:
Figure BDA0002542247470000134
where h is a constant value, and may be, for example, 1.5.
And traversing the first image after obtaining the pixel value threshold, determining whether the pixel value of the traversed pixel point is greater than the pixel value threshold or not for the traversed pixel point, keeping the pixel value of the pixel point unchanged when the pixel value of the traversed pixel point is greater than or equal to the pixel value threshold, setting the pixel value of the pixel point to be 0 when the pixel value of the traversed pixel point is less than the pixel value threshold, and obtaining a second image after the traversing is finished. Thus, the second image may be obtained by traversing the first image, setting to zero the pixel values in the first image that are less than the pixel value threshold. It can be understood that the pixel value in the first image is a temperature value, and therefore, the pixel point detected by the pixel value threshold value and having the pixel value greater than the pixel value threshold value is an abnormal point, that is, an imaging point of the heat source, the imaging point of the heat source can be retained by comparing the pixel value detected by the pixel value threshold value with the pixel value threshold value, the pixel values of other pixel points are set to be zero, the non-zero pixel points in the finally obtained second image are all the imaging points of the heat source, and the division of the heat source can be realized through the distribution of the imaging points of the heat source.
Step 205, filtering the non-human heat source with the size smaller than the preset size in the second image to obtain a target image;
and step 206, detecting whether a human body exists in the first image according to the number of the residual heat sources in the target image.
In the embodiment of the present application, the non-human heat source smaller than the preset size may be regarded as a small interfering heat source, such as a kettle for heating, a cup for containing hot water, a charger for generating heat, a small pet, and the like, and the small interfering heat source has a characteristic of small and sparse imaging area, whereas in general, the human heat source has a characteristic of large and concentrated imaging area, so that the small interfering heat source may be filtered out by filtering to leave the human heat source, and the target image is obtained.
When filtering out a small interference heat source, considering that the interference heat source has the characteristics of small and sparse imaging area, and the human heat source has the characteristics of large and concentrated imaging area, the open operation method can be specifically adopted to process the second image, and the non-human heat source smaller than the preset size in the second image is filtered out to obtain the target image.
The open operation method comprises a process of corrosion and expansion, so that the aim of filtering the non-human heat source smaller than the preset size is fulfilled.
Further, whether a human body exists in the first image is detected according to the number of the remaining heat sources in the target image obtained after the operation method is turned on, specifically, whether the number of the remaining heat sources in the target image is zero is judged, when the number of the remaining heat sources in the target image is zero, it can be determined that the human body does not exist in the first image, and when the number of the remaining heat sources in the target image is non-zero, it can be determined that the human body exists in the first image. Or, because the heat source is characterized by the imaging point of the heat source, after the heat source detection process, the value of the imaging point of the heat source in the obtained second image is a nonzero value, the values of other pixel points are all zero, and after the second image is subjected to the opening operation, the imaging point of the small interference heat source is filtered, and the pixel value of the imaging point is zero, therefore, the value of the imaging point of the residual heat source in the obtained target image is a nonzero value, the values of other pixel points are zero, whether a nonzero pixel value exists in the target image can be judged, if the nonzero pixel value exists, it is determined that a human body exists in the first image, and if the nonzero pixel value does not exist, it is determined that a human body does not exist in the first image.
In the embodiment of the application, the first image is preprocessed, so that a heat source obviously not belonging to a human body can be filtered, the interference on human body existence detection is reduced, the stability of the pixel value of the image can be effectively improved through a main feature reconstruction mode, the accuracy on human body existence detection is improved, furthermore, the heat source detection is carried out on the first image through an anomaly detection method based on statistics, so that the heat source existing in the first image can be effectively identified, the non-human heat source smaller than a preset size in the second image is subjected to filtering processing, so that a small interference heat source in the identified heat source can be effectively filtered, the interference caused by the small interference heat source can be effectively reduced in a living scene, and the accuracy on human body existence detection is further improved.
In order to better understand the technical solution in the embodiment of the present invention, a specific application scenario will be described below.
Please refer to fig. 4a, which is a schematic diagram of a first image obtained by a low-resolution thermal imaging device in an embodiment of the present application, where the resolution of the first image is 24 × 32, the length of the data is 768 arrays (pixel points), the 768 data are temperature value distributions in an imaging range of the low-resolution thermal imaging device, and a pixel value of the first image may be recorded as am×nWherein m is 24 and n is 32.
The first image is preprocessed to obtain a preprocessed first image, and main features of the preprocessed first image are further reconstructed to obtain a reconstructed first image, please refer to fig. 4b, which is a schematic diagram of the reconstructed first image.
For the reconstructed first image, performing heat source detection on the reconstructed first image by using a quartile method to obtain a second image Bm×nPlease refer to fig. 4c, which is a schematic diagram of a second image in the embodiment of the present application, and as can be seen from fig. 4c, the second image includes 3 heat sources, the largest heat source includes 25 pixels, and the smallest heat source includes oneEach pixel point, and the heat source with the middle size comprises 4 pixel points.
After the second image is obtained, filtering the second image by using an on operation method, wherein a non-human heat source with a size smaller than a preset size is filtered, specifically:
first, for the second image Bm×nThe etching operation was carried out with a core size of 3 x 3 and a step shift of (1,1), i.e. a step shift of 1 in both the transverse and longitudinal directions.
After the etching operation, the etched picture is subjected to an expansion operation, wherein the size of a kernel used for the expansion is 3 × 3, and the moving step size is (1,1), namely the moving step size in the transverse direction and the moving step size in the longitudinal direction are both 1.
Referring to fig. 4d, which is a schematic diagram of a target image according to an embodiment of the present invention, comparing fig. 4c and fig. 4d, a heat source composed of 4 pixels in fig. 4c and a heat source including 1 pixel are filtered, which is a small interference heat source, and the largest heat source remains, which is a human heat source, so that it is determined that a human body exists in the first image.
In the embodiment of the application, the first image is preprocessed, so that a heat source which is obviously not a human can be removed, the stability of a pixel value can be effectively enhanced through a main characteristic reconstruction mode, further, abnormal point detection is performed through abnormal degrees of imaging points based on the heat source in the image, the heat source in the image can be effectively detected, a small interference heat source is filtered through an open operation mode, whether a human body exists in the first image can be effectively detected, the interference of the small interference heat source is avoided, and the detection accuracy is improved. The scheme is preferably applied to a living scene, particularly an old people home scene, and can be effectively applied to monitoring the safety of old people.
Please refer to fig. 5, which is a schematic structural diagram of a human presence detecting device in an embodiment of the present application, the device includes:
an obtaining module 501, configured to obtain a first image, where a pixel value of each pixel in the first image is a temperature value;
a heat source detection module 502, configured to perform heat source detection on the first image based on a statistical outlier detection method to obtain a second image;
a filtering module 503, configured to filter a non-human heat source smaller than a preset size in the second image to obtain a target image;
a presence detection module 504, configured to detect whether a human body is present in the first image according to the number of remaining heat sources in the target image.
It should be noted that, the contents of the obtaining module 501, the heat source detecting module 502, the filtering module 503 and the existence detecting module 504 may refer to the contents described in fig. 1 to fig. 3, which are not described herein again. In the embodiment of the application, a first image is obtained, the first image is a live body detection image of a target position detected by a thermal imaging device at a target moment, pixel values of pixel points of the live body detection image are temperature values detected by the thermal imaging device, heat source detection is performed on the first image based on a statistical abnormal point detection method to obtain a second image, a non-human heat source smaller than a preset size in the second image is filtered to obtain a target image, and whether a human body exists at the target moment at the target position is detected according to the number of remaining heat sources in the target image. The heat source detection is carried out on the first image through an anomaly detection method based on statistics, so that the heat source existing in the first image can be effectively identified, and the non-human heat source smaller than the preset size in the second image is filtered, so that the small interference heat source in the identified heat source can be effectively filtered, the interference caused by the small interference heat source can be effectively reduced in a living scene, and the accuracy of human body existence detection is improved.
FIG. 6 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be a terminal, or may be a server. As shown in fig. 6, the computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program that, when executed by the processor, causes the processor to implement the age identification method. A computer program may also be stored in the internal memory, which when executed by the processor causes the processor to perform the age identification method. Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is proposed, comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of:
acquiring a first image, wherein the pixel value of each pixel point in the first image is a temperature value;
performing heat source detection on the first image by using an abnormal point detection method based on statistics to obtain a second image;
filtering the non-human heat source with the size smaller than the preset size in the second image to obtain a target image;
and detecting whether a human body exists in the first image or not according to the number of the residual heat sources in the target image.
In one embodiment, a computer-readable storage medium is proposed, in which a computer program is stored which, when executed by a processor, causes the processor to carry out the steps of:
acquiring a first image, wherein the pixel value of each pixel point in the first image is a temperature value;
performing heat source detection on the first image by using an abnormal point detection method based on statistics to obtain a second image;
filtering the non-human heat source with the size smaller than the preset size in the second image to obtain a target image;
and detecting whether a human body exists in the first image or not according to the number of the residual heat sources in the target image.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile 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), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A human presence detection method, the method comprising:
acquiring a first image, wherein the pixel value of each pixel point in the first image is a temperature value;
performing heat source detection on the first image by using an abnormal point detection method based on statistics to obtain a second image;
filtering the non-human heat source with the size smaller than the preset size in the second image to obtain a target image;
and detecting whether a human body exists in the first image or not according to the number of the residual heat sources in the target image.
2. The method of claim 1, wherein the statistically based anomaly detection method performs heat source detection on the first image to obtain a second image, comprising:
determining a pixel value threshold of an outlier in the first image according to a quartile method;
and traversing the first image, and setting the pixel value smaller than the pixel value threshold value in the first image to be zero to obtain the second image.
3. The method of claim 1, wherein the filtering the non-human heat source smaller than a preset size in the second image to obtain a target image comprises:
and processing the second image by adopting an open operation method, and filtering out a non-human heat source smaller than a preset size in the second image to obtain a target image.
4. The method of any of claims 1 to 3, wherein the acquiring the first image further comprises:
determining a quantile numerical value corresponding to the first image at a preset quantile point;
and replacing the pixel value which is greater than the preset human body temperature value in the first image by using the quantile value to obtain a preprocessed first image.
5. The method of any of claims 1 to 3, wherein the acquiring the first image further comprises:
and performing main feature reconstruction on the first image to obtain a reconstructed first image.
6. The method of claim 5, wherein the performing principal feature reconstruction on the first image to obtain a reconstructed first image comprises:
singular value decomposition is carried out on the first image to obtain a diagonal matrix, a right singular matrix and a left singular matrix after decomposition;
carrying out reconstruction characteristic selection according to the diagonal matrix to obtain a target diagonal matrix;
and performing data reconstruction by using the target diagonal matrix, the right singular matrix and the left singular matrix to obtain a reconstructed first image.
7. The method according to any one of claims 1 to 3, wherein the detecting whether the human body exists in the first image according to the number of the remaining heat sources in the target image comprises:
when the number of the residual heat sources in the target image is zero, determining that no human body exists in the first image;
and when the number of the residual heat sources in the target image is non-zero, determining that a human body exists in the first image.
8. A human presence detection apparatus, characterized in that the apparatus comprises:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a first image, and the pixel value of each pixel point in the first image is a temperature value;
the heat source detection module is used for carrying out heat source detection on the first image based on an abnormal point detection method of statistics to obtain a second image;
the filtering module is used for filtering the non-human heat source with the size smaller than the preset size in the second image to obtain a target image;
and the existence detection module is used for detecting whether a human body exists in the first image according to the number of the residual heat sources in the target image.
9. A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 7.
10. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 7.
CN202010552505.4A 2020-06-16 2020-06-16 Human body existence detection method and device, storage medium and computer equipment Pending CN111985297A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010552505.4A CN111985297A (en) 2020-06-16 2020-06-16 Human body existence detection method and device, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010552505.4A CN111985297A (en) 2020-06-16 2020-06-16 Human body existence detection method and device, storage medium and computer equipment

Publications (1)

Publication Number Publication Date
CN111985297A true CN111985297A (en) 2020-11-24

Family

ID=73442216

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010552505.4A Pending CN111985297A (en) 2020-06-16 2020-06-16 Human body existence detection method and device, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN111985297A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112785759A (en) * 2021-01-22 2021-05-11 支付宝(杭州)信息技术有限公司 System and method for passenger flow statistics

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150233771A1 (en) * 2012-10-26 2015-08-20 Fujitsu Limited Temperature measurement system and abnormality detection method
CN109447478A (en) * 2018-10-31 2019-03-08 中国科学院遥感与数字地球研究所 A kind of industrial thermal pollution area extracting method based on eight period in arithmetric
CN109948613A (en) * 2019-03-22 2019-06-28 国网重庆市电力公司电力科学研究院 A kind of Infrared image recognition and device of arrester
CN111079695A (en) * 2019-12-30 2020-04-28 北京华宇信息技术有限公司 Human body key point detection and self-learning method and device
CN111092891A (en) * 2019-12-20 2020-05-01 杭州安恒信息技术股份有限公司 Method, system and related device for detecting abnormal point in network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150233771A1 (en) * 2012-10-26 2015-08-20 Fujitsu Limited Temperature measurement system and abnormality detection method
CN109447478A (en) * 2018-10-31 2019-03-08 中国科学院遥感与数字地球研究所 A kind of industrial thermal pollution area extracting method based on eight period in arithmetric
CN109948613A (en) * 2019-03-22 2019-06-28 国网重庆市电力公司电力科学研究院 A kind of Infrared image recognition and device of arrester
CN111092891A (en) * 2019-12-20 2020-05-01 杭州安恒信息技术股份有限公司 Method, system and related device for detecting abnormal point in network
CN111079695A (en) * 2019-12-30 2020-04-28 北京华宇信息技术有限公司 Human body key point detection and self-learning method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
EFTIM ZDRAVEVSKI: "Improving Activity Recognition Accuracy in Ambient-Assisted Living Systems by Automated Feature Engineering", IEEE ACCESS, 21 March 2017 (2017-03-21) *
郝丽春;孟庆岩;葛小三;张颖;胡蝶;张琳琳;唐子欣;: "一种基于八分位法的工业热污染区提取方法", 遥感技术与应用, no. 02, 20 April 2020 (2020-04-20) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112785759A (en) * 2021-01-22 2021-05-11 支付宝(杭州)信息技术有限公司 System and method for passenger flow statistics

Similar Documents

Publication Publication Date Title
Yi et al. Sharpness-aware low-dose CT denoising using conditional generative adversarial network
Wang et al. Face hallucination via weighted adaptive sparse regularization
CN104021532B (en) A kind of image detail enhancement method of infrared image
CN111199523B (en) Power equipment identification method, device, computer equipment and storage medium
JP5331486B2 (en) Method and apparatus for improving resolution of digital image
Garcia et al. Multi-resolution compressive spectral imaging reconstruction from single pixel measurements
CN110827201A (en) Generative confrontation network training method and device for high-dynamic-range image super-resolution reconstruction
Raza et al. IR-MSDNet: Infrared and visible image fusion based on infrared features and multiscale dense network
CN113160087B (en) Image enhancement method, device, computer equipment and storage medium
CN110689509B (en) Video super-resolution reconstruction method based on cyclic multi-column 3D convolution network
CN114529456B (en) Super-resolution processing method, device, equipment and medium for video
CN114092459A (en) Power equipment thermal fault diagnosis method, equipment and medium based on decision-level fusion
CN112381727A (en) Image denoising method and device, computer equipment and storage medium
CN111754429B (en) Motion vector post-processing method and device, electronic equipment and storage medium
CN112767291A (en) Visible light image and infrared image fusion method and device and readable storage medium
CN111445487B (en) Image segmentation method, device, computer equipment and storage medium
CN111353955A (en) Image processing method, device, equipment and storage medium
CN111985297A (en) Human body existence detection method and device, storage medium and computer equipment
Kekre et al. Review on image fusion techniques and performance evaluation parameters
Wei et al. Effects of lossy compression on remote sensing image classification based on convolutional sparse coding
WO2017107395A1 (en) Image processing method and system
CN111445411B (en) Image denoising method, image denoising device, computer equipment and storage medium
Wu et al. MixNet: Towards Effective and Efficient UHD Low-Light Image Enhancement
Yang et al. Fast multisensor infrared image super-resolution scheme with multiple regression models
CN111582013A (en) Ship retrieval method and device based on gray level co-occurrence matrix characteristics

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