CN113920119B - Heart rate and respiration analysis processing method based on thermal imaging technology - Google Patents

Heart rate and respiration analysis processing method based on thermal imaging technology Download PDF

Info

Publication number
CN113920119B
CN113920119B CN202111524772.1A CN202111524772A CN113920119B CN 113920119 B CN113920119 B CN 113920119B CN 202111524772 A CN202111524772 A CN 202111524772A CN 113920119 B CN113920119 B CN 113920119B
Authority
CN
China
Prior art keywords
heart rate
image
region
respiration
sequence
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
CN202111524772.1A
Other languages
Chinese (zh)
Other versions
CN113920119A (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.)
Nanjing Jingyi Security System Technology Co ltd
Original Assignee
Nanjing Jingyi Security System 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 Nanjing Jingyi Security System Technology Co ltd filed Critical Nanjing Jingyi Security System Technology Co ltd
Priority to CN202111524772.1A priority Critical patent/CN113920119B/en
Publication of CN113920119A publication Critical patent/CN113920119A/en
Application granted granted Critical
Publication of CN113920119B publication Critical patent/CN113920119B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0012Biomedical image inspection
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/02Detecting, measuring or recording pulse, heart rate, blood pressure or blood flow; Combined pulse/heart-rate/blood pressure determination; Evaluating a cardiovascular condition not otherwise provided for, e.g. using combinations of techniques provided for in this group with electrocardiography or electroauscultation; Heart catheters for measuring blood pressure
    • A61B5/024Detecting, measuring or recording pulse rate or heart rate
    • A61B5/02416Detecting, measuring or recording pulse rate or heart rate using photoplethysmograph signals, e.g. generated by infrared radiation
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/08Detecting, measuring or recording devices for evaluating the respiratory organs
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7203Signal processing specially adapted for physiological signals or for diagnostic purposes for noise prevention, reduction or removal
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7253Details of waveform analysis characterised by using transforms
    • A61B5/7257Details of waveform analysis characterised by using transforms using Fourier transforms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10048Infrared image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20032Median filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20048Transform domain processing
    • G06T2207/20056Discrete and fast Fourier transform, [DFT, FFT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30004Biomedical image processing
    • G06T2207/30101Blood vessel; Artery; Vein; Vascular
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Landscapes

  • Health & Medical Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Public Health (AREA)
  • Surgery (AREA)
  • Veterinary Medicine (AREA)
  • Animal Behavior & Ethology (AREA)
  • Physiology (AREA)
  • Biophysics (AREA)
  • Pathology (AREA)
  • Biomedical Technology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Molecular Biology (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Cardiology (AREA)
  • Artificial Intelligence (AREA)
  • Psychiatry (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Radiology & Medical Imaging (AREA)
  • Quality & Reliability (AREA)
  • Pulmonology (AREA)
  • Mathematical Physics (AREA)
  • Measuring And Recording Apparatus For Diagnosis (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a heart rate and respiration analysis processing method based on a thermal imaging technology, which comprises the steps of acquiring sequence images; generating a foreground target in a foreground region according to the obtained region of interest and the background for segmenting the sequence image; carrying out face detection on the foreground target to obtain a face interesting region; obtaining a human face blood vessel region through gray value conversion, and averaging the gray values of the human face blood vessel region to form an initial dynamic heart rate waveform based on a time sequence; and acquiring power spectrums of the heart rate signal and the respiratory signal by using a classical spectrum and a Fourier transform-based periodic method to obtain a heart rate value and a respiratory value. At the initial stage of acquiring the sequence images, the problem that the image segmentation is not facilitated due to the fuzzy information of the edge of the foreground target caused by the inevitable inclusion of a lot of interference noise in the sequence images due to the factors such as the internal noise of the existing thermal imaging instrument, different external environments, the subject and the like is solved by preprocessing the sequence images.

Description

Heart rate and respiration analysis processing method based on thermal imaging technology
Technical Field
The invention relates to the technical field of signal processing, in particular to a heart rate and respiration analysis processing method based on a thermal imaging technology.
Background
It is known that heart rate and respiration measurement is mainly used in medical image monitoring and nursing, and the vital sign measurement method for patient is electrocardio signal method (representing the apparatus is electrocardiogram machine), and the daily detection method is pressure oscillation method, photoelectric measurement method, bioelectricity method (using wrist type, finger clip type, etc.), and these measurement methods are all contact measurement methods.
For example, the contact measurement method requires direct or indirect contact with a specific part of the skin of a tester and keeps still, which brings inconvenience and limitation to heart rate detection of special people (large-area skin damage, allergy to detection equipment, postoperative people, infants and mental patients with infectious diseases and uncontrollable own behaviors); meanwhile, the requirement on a tester is high, and the requirement is only limited to the situation that the human body is relatively static and relaxed, and meanwhile, the error of the measurement result is large due to improper operation method; in the prior art, an ultrasonic technology detection method and a microwave or millimeter wave-based biological radar detection method in the research of non-contact vital sign methods are active electromagnetic wave signals which are harmful to human bodies after long-term use, and the IPPG method is very sensitive to the change of light intensity.
On the contrary, the research on the non-contact measurement method is also more and more abundant with the addition of more and more researchers, and can be roughly classified into a detection method based on ultrasonic technology, a detection method based on microwave or millimeter wave biological radar, and a detection method based on Image, wherein the detection method based on Image can be further specifically classified into a visible light Image based imaging type photo plethysmography (IPPG) and a vital sign detection method based on thermographic infrared thermal imaging technology.
The infrared thermal imager is a passive and passive receiving device (for example, a radar emits electromagnetic waves, an echo signal reflected by an object when the electromagnetic waves encounter the object is an active device, the infrared thermal imager does not actively emit signals and only receives signals), can image (especially can image at night), has the unique advantages of extracting target characteristics (specific characteristics of the human face are blurred compared with visible light imaging, privacy is protected), temperature information can be obtained, and the like, is not influenced by severe environment and light intensity, and can realize all-weather measurement all day long.
Based on the above, the invention provides a method for acquiring heart rate and respiratory information by acquiring a human face video, converting the temperature change of facial blood vessels into periodic change of gray values and displaying the periodic change of the gray values into a time sequence signal, wherein the method is based on the temperature change of a human body measurement area and is not influenced by the intensity of light rays, and meanwhile, the problems that the result of vital sign measurement by the thermal imaging technology is extremely unstable and the accuracy rate is low due to poor resolution and more noise of images acquired by the thermal imaging technology are solved.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a heart rate and respiration analysis processing method based on a thermal imaging technology to solve the problems in the background technology.
In order to achieve the purpose, the invention is realized by the following technical scheme: a heart rate and respiration analysis processing method based on a thermal imaging technology comprises the following steps:
the method comprises the steps of firstly, obtaining a sequence image based on image acquisition equipment;
secondly, segmenting the acquired sequence image to obtain a sequence image interesting region and a background so as to generate a foreground target in a foreground region;
thirdly, carrying out face detection on the foreground target based on the OpenCv function to obtain a face interesting region in the foreground region;
fourthly, segmenting blood vessels and a background in a human face interesting region through gray value conversion to obtain a human face blood vessel region, averaging the gray levels of the human face blood vessel region to form an initial dynamic heart rate waveform based on a time sequence, and meanwhile averaging the gray levels of a region where nostrils are located in the human face interesting region to form an initial dynamic respiration waveform based on the time sequence;
fifthly, filtering the initial dynamic heart rate waveform and the initial dynamic respiration waveform respectively to obtain a denoised and denoised heart rate signal and a denoised respiration signal;
and sixthly, acquiring power spectrums of the heart rate signal and the respiratory signal by using a classical spectrum and a Fourier transform-based periodic method to obtain a heart rate value and a respiratory value.
As an improvement to the method for analyzing and processing heart rate and respiration based on thermal imaging technology in the present invention, after the sequence of images is acquired and before the sequence of images is segmented, the sequence of images also needs to be preprocessed:
s1-1, performing median filtering on the sequence image, wherein the specific processing mode of performing median filtering on the sequence image is as follows: acquiring each pixel value in the field of the point marked as the region of interest in the sequence image, and replacing the median value of each pixel value with the point marked as the region of interest to remove noise while preventing the edge information in the region of interest from being damaged;
s1-2, adjusting the image contrast of the sequence image based on histogram equalization, wherein the specific implementation process of histogram equalization is as follows: and adjusting the gray value distribution based on the accumulation function, and adjusting the gray intervals distributed in a relatively centralized manner in the sequence image to be uniformly distributed in the whole gray range so as to avoid the disadvantage of image segmentation caused by fuzzy edge information.
As an improvement to the method for analyzing and processing heart rate and respiration based on the thermal imaging technology in the present invention, in the second step, the specific implementation of generating the foreground object includes boundary feature contour extraction in combination with background subtraction and morphology processing methods, where the specific implementation of extracting the foreground object is as follows:
firstly, detecting a cv2.findContours function and a GMG algorithm of background subtraction based on an image contour, and using corrosion expansion to a point which has noise and is marked as a region of interest to obtain an expanded image;
secondly, performing binarization threshold processing based on a python + opencv configuration file;
and finally, eliminating points inside and outside the outline area where the expanded image is located, wherein the specifically eliminated points are points marked as hairs or eyes, so that the one-frame effect of target tracking of the GMG algorithm of background subtraction is achieved.
As an improvement of the method for analyzing and processing the heart rate and the respiration based on the thermal imaging technology, in the third step, a face detection recognition model is established based on a Dlib library in an OpenCv function to obtain a face region of interest, wherein training feature information of the face detection recognition model is 81 feature detection points provided based on the Dlib library, so that mapping of each face feature information in the face region of interest is obtained based on the face detection recognition model, key point detection of the face feature information is closer to a real face, and the problem of shaking of the key points is avoided.
As an improvement of the heart rate and respiration analysis processing method based on the thermal imaging technology, in the fourth step, obtaining the blood vessel region of the human face is realized based on a method combining an anisotropic diffusion filter and top hat segmentation, and is used for enhancing the edge contrast of the blood vessel region of the human face, and the specific calculation method is as follows:
assuming that the image is I, the iterative formula of discrete AD is:
Figure 164190DEST_PATH_IMAGE001
in the formula ItFor the image of the t-th iteration, It+1Is the image of the t +1 th iteration, t is the iteration number, Nx,y,Sx,y,Ex,y,Wx,yThe method comprises the following steps that four different directions are respectively adopted, c is a diffusion coefficient, ∇ is a gradient operator, and lambda is a coefficient, wherein c controls diffusion speed in the corresponding direction, lambda controls smoothness, the larger the numerical value is, the smoother the image is, and the edge is difficult to keep;
in Nx,y,Sx,y,Ex,y,Wx,yAnd calculating the partial derivative of the current pixel in four directions to obtain a divergence formula in four directions:
Figure 841290DEST_PATH_IMAGE002
in the formula Ix,yThe pixel points with coordinates (x, y) in the image I are obtained;
cNx,y,cSx,y,cEx,y,cWx,ythe diffusion coefficients in four directions are represented, and therefore,
the diffusion coefficient calculation formula in four directions is as follows:
Figure 390083DEST_PATH_IMAGE003
in the formula, K is a conductivity, and the larger the value of the conductivity K, the smoother the image.
As an improvement of the method for analyzing and processing heart rate and respiration based on thermal imaging technology in the present invention, in the fifth step, the step of filtering the initial dynamic heart rate waveform and the initial dynamic respiration waveform includes:
s5-1, carrying out detrending filtering on the time sequence based on HP filtering, and verifying stationarity by using an ADF stationarity test method;
s5-2, selecting a band-pass filter with a heart rate range with an upper cut-off frequency of 40 times/min and a lower cut-off frequency of 200 times/min; meanwhile, a band-pass filter with the respiratory range of 10 times/min at the upper cut-off frequency and 30 times/min at the lower cut-off frequency is selected to filter random data.
As an improvement of the method for analyzing and processing heart rate and respiration based on thermal imaging technology in the present invention, in the fifth step, the step of filtering the initial dynamic heart rate waveform and the initial dynamic respiration waveform further includes:
s5-3, decomposing the initial dynamic heart rate waveform with noise and the initial dynamic respiration waveform into IMF components with limited frequency dominance by using a VMD decomposition algorithm;
s5-4, respectively carrying out wavelet decomposition and threshold denoising on each IMF component obtained by decomposition;
s5-5, reconstructing IMF components subjected to wavelet decomposition and threshold denoising, converting a frequency domain to view the respiratory frequency and the heart rate frequency corresponding to the maximum peak value and outputting a heart rate signal and a respiratory signal.
As an improvement of the method for analyzing and processing heart rate and respiration based on the thermal imaging technology, in the sixth step, in the process of obtaining the power spectrum of the heart rate signal and the respiration signal by using the classical spectrum and the periodic method based on the fourier transform to obtain the heart rate value and the respiration value, the peak value of the power spectrum corresponds to the signal frequency, and the signal frequency at this time is the heart rate frequency, wherein the expression relationship between the heart rate frequency and the signal frequency corresponding to the peak value is as follows:
HR=FMAXt, wherein, FMAXThe frequency corresponding to the maximum amplitude of the power spectrum, t is the time period, the reference value is 65bpm, and the measurement error is +1。
Compared with the prior art, the invention has the beneficial effects that:
firstly, in the initial stage of acquiring a sequence image, preprocessing the sequence image to eliminate the problem that the edge information of a foreground target is fuzzy and is not beneficial to image segmentation due to the fact that a plurality of interference noises are inevitably mixed in the sequence image caused by factors such as internal noise of equipment of the existing thermal imaging instrument, different external environments, a subject and the like; secondly, in order to avoid the problems that the position change of the foreground target is very tiny and almost no change can be seen by human eyes, the deformation occurs due to too high speed in the motion process, the light ray problem with change exists in the environment of video acquisition and the like, which are difficult points for extracting the foreground target and even lead to the problem that the target object cannot be extracted, the method of extracting the boundary characteristic contour is adopted and combined with the methods of background subtraction, morphological processing and the like to extract the foreground target; thirdly, a face recognition model is established by adopting an OpenCv function with simple algorithm and small time consumption, so that the requirement of detecting key points of the face to be closer to the face is met to the maximum extent, and meanwhile, the problem of shaking of the key points is solved better; and finally, extracting each interested region of the face detection region, acquiring the heart rate and respiratory signals after noise reduction by adopting a VMD and wavelet threshold denoising combined algorithm, and acquiring a heart rate value and a respiratory value based on a periodic method of Fourier transform, thereby realizing the measurement of the heart rate and respiratory value of the target population in a non-contact state.
Drawings
The disclosure of the present invention is illustrated with reference to the accompanying drawings. It is to be understood that the drawings are designed solely for purposes of illustration and not as a definition of the limits of the invention, for which like reference numerals are used to indicate like parts. Wherein:
fig. 1 is a schematic flow chart illustrating an implementation of a heart rate and respiration analysis processing method based on a thermal imaging technology according to an embodiment of the present invention;
FIG. 2 is a schematic illustration of an initial dynamic heart rate waveform based on a time series as taken in one embodiment of the invention;
FIG. 3 is a schematic diagram of an initial dynamic respiration waveform taken over a time series in one embodiment of the invention;
fig. 4 is a schematic flow chart of obtaining a denoised heart rate signal and a denoised respiratory signal based on a VMD and wavelet threshold denoising joint algorithm according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating a prior art raw heart rate signal without filtering according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating an unprocessed residual signal according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating a heart rate signal decomposed by a VMD algorithm and denoising with a wavelet threshold according to an embodiment of the present invention;
FIG. 8 is a diagram illustrating a respiratory signal decomposed by a VMD algorithm and denoising of a wavelet threshold according to an embodiment of the present invention;
FIG. 9 is a diagram illustrating a scenario interface according to an embodiment of the present invention;
fig. 10 is a schematic diagram of a sequence of images without histogram equalization processing according to an embodiment of the present invention;
fig. 11 is a schematic diagram of a sequence image after histogram equalization processing according to an embodiment of the present invention;
FIG. 12 is a first schematic diagram illustrating a method for obtaining an expanded image by erosion expansion of a point marked as a region of interest in a sequence image according to an embodiment of the present invention;
fig. 13 is a second schematic diagram of applying erosion dilation to the points marked as the region of interest in the sequence image to obtain a dilated image according to an embodiment of the present invention.
Detailed Description
It is easily understood that according to the technical solution of the present invention, a person skilled in the art can propose various alternative structures and implementation ways without changing the spirit of the present invention. Therefore, the following detailed description and the accompanying drawings are merely illustrative of the technical aspects of the present invention, and should not be construed as all of the present invention or as limitations or limitations on the technical aspects of the present invention.
As an understanding of the technical concept and the realization principle of the present invention: the blood is continuously promoted to flow in blood vessels of the whole body in the stretching and contracting periodic beating process of the heart of the human body, the periodic activity of the heart can cause the change of the heat radiation capacity, and the thermal infrared imaging converts the temperature change of the blood vessels of the face into the periodic change of gray values through acquiring a video of the face of the human body and displays the periodic change of the gray values into time sequence signals to acquire heart rate and respiration information. Therefore, the temperature of the molten metal is controlled,
as shown in fig. 1, the present invention provides a technical solution based on the thermal infrared imaging technology and based on the temperature change of the measurement area of the human body (without the influence of the light intensity): a heart rate and respiration analysis processing method based on a thermal imaging technology comprises the following steps:
the first step, based on the image capturing device, obtaining a sequence image, and it should be noted that, in the prior art, factors such as device internal noise of the used image capturing device (infrared thermal imager), different external environments, and the subject themselves cause a lot of interference noise inevitably mixed in a thermal image sequence, which causes a blur of foreground target edge information and is not beneficial to image segmentation, and based on this, after obtaining the sequence image and before segmenting the sequence image, the sequence image also needs to be preprocessed, aiming at eliminating the problem that factors such as device internal noise of the existing thermal imager, different external environments, and the subject themselves cause a lot of interference noise inevitably mixed in the sequence image, which causes a blur of foreground target edge information and is not beneficial to image segmentation:
s1-1, performing median filtering on the sequence image, wherein the specific processing mode of performing median filtering on the sequence image is as follows: obtaining each pixel value in the field where the point marked as the region of interest in the sequence image is located, and replacing a median value of each pixel value with the point marked as the region of interest, wherein the median value is used for denoising while considering that the edge information in the region of interest is not damaged, and it can be understood that a calculation formula for performing median filtering is as follows:
g = mean [ (x-1, y-1) + f (x, y-1) + f (x +1, y-1) + f (x-1, y) + f (x, y) + f (x +1, y) + f (x-1, y +1) + f (x, y +1) + f (x +1, y +1) ], as shown in tables 1 to 2, which is a processing mode for median filtering the sequence image in practical use:
10 9 4 7 2
4 31 12 23 30
5 43 1 32 8
54 7 3 43 4
23 76 56 45 9
table 1 (target image);
10 9 4 7 2
4 31 12 23 30
5 43 23 32 8
54 7 3 43 4
23 76 56 45 9
table 2 (median filtered images);
s1-2, as shown in fig. 10-11, the image contrast of the sequence image needs to be adjusted based on histogram equalization, wherein the histogram equalization is implemented by the following steps: and adjusting the gray value distribution based on the accumulation function, and adjusting the gray intervals distributed in a relatively centralized manner in the sequence image to be uniformly distributed in the whole gray range so as to avoid the disadvantage of image segmentation caused by fuzzy edge information.
Secondly, segmenting the acquired sequence image to obtain a sequence image interesting region and a background to generate a foreground object in the foreground region, wherein the segmentation of the sequence image interesting region from the background in the sequence image is a main task of foreground region extraction and is also a method for rapidly acquiring and highlighting the interesting region, because a lot of problems are mixed in the actual acquisition process of the video including the human face, for example, the position change of the foreground object is very tiny, almost human eyes can not see the change, the deformation occurs due to the too fast speed in the motion process, the light problem with the change in the environment of video acquisition is the difficulty of extracting the foreground object, even the object can not be extracted, based on the above,
the invention provides a method for extracting a foreground target from a video sequence (sequence image) by adopting boundary characteristic contour extraction combined with background subtraction and morphological processing, so that the specific implementation mode for extracting the foreground target is as follows:
firstly, based on the GMG algorithm of image contour detection cv2.findContours function and background subtraction, using erosion expansion to the points which have noise and are marked as the region of interest, obtaining an expanded image, as shown in FIGS. 12-13;
secondly, performing binarization threshold processing based on a python + opencv configuration file;
and finally, eliminating points inside and outside the outline area where the expanded image is located, wherein the specifically eliminated points are points marked as hairs or eyes, so that the one-frame effect of target tracking of the GMG algorithm of background subtraction is achieved.
Thirdly, based on the two technical concepts, after the foreground object is obtained, the face is detected in the foreground area, and the region of interest needs to be selected from the face area in the continuous video image (sequence image), so as to remove the influence of the non-face area such as the body and the like on the detection result, and satisfy the requirement of displaying the dynamic heart rate and the respiratory information of the subject in the current video (image) in real time, therefore, the method is not suitable for adopting the test mode of delaying the measurement result due to the complex algorithm and serious time consumption in the actual measurement process, and based on the above,
as an embodiment of the present invention, it is proposed to perform face detection on a foreground object based on an OpenCv function to obtain a face roi in a foreground region, and it can be understood that the face detection aims at: an ROI (region of interest) region is obtained on the basis of human face characteristic points, meanwhile, because the characteristics of human face edges, eyes and the like obtained by a thermal imager are fuzzy, and a detection target is easy to lose by a characteristic point-based method used for human face detection, the influence of background on the human face detection needs to be reduced by preprocessing, the edge contrast is enhanced by histogram equalization, the automatic human face alignment is further realized when the human face deflects, the human face region can still be identified when partial characteristic points of the human face are shielded, a method for detecting the human face key points by using a detection identification model provided by Dlib in an OpenCv function can detect the human face in a dynamic video sequence diagram and extract the facial characteristics of the human face, so that the eyes, the nose, the mouth and the like of the human face are used as identifiable characteristic training models and the mapping of each characteristic point is obtained, the advantages of strong inclusion and better solving the problem of key point jitter by using key point detection closer to the human face are achieved, for this purpose,
the face detection recognition model is established to obtain a face interesting region, and it should be noted that training feature information of the face detection recognition model is 81 feature detection points provided based on a Dlib library, so that mapping of each face feature information in the face interesting region is obtained based on the face detection recognition model, key point detection of the face feature information is closer to a real face, and the problem of shaking of key points is avoided.
Fourthly, after obtaining the region of interest in the face region, it is necessary to extract the frontal blood vessel region in the region of interest to obtain the dynamic heart rate waveform of the subject, as shown in fig. 2, it should be noted that the ROI (region of interest) selected at the position of the frontal blood vessel region not only includes the pixel region where the arterial blood vessel is located, but also has a relative background pixel, and the measurement principle is as follows: the human skin temperature directly on the blood vessel is higher than the average skin temperature of the position adjacent to the blood vessel, the blood vessel position of a video sequence chart obtained by an infrared thermal imager represents a relatively bright area, the blood vessel position is converted into a gray value blood vessel which has larger difference with the background, therefore, the pure blood vessel characteristic can be extracted from the selected initial forehead ROI area as the final interested area according to the principle, the method of combining an anisotropic diffusion filter and high-hat segmentation is used for extracting the human face blood vessel area, the blood vessel in the human face interested area is segmented with the background through gray value conversion to obtain the human face blood vessel area, the gray value of the human face blood vessel area is averaged to form an initial dynamic heart rate waveform based on a time sequence, meanwhile, the gray value of the area where the nostril in the human face interested area is located is averaged to form an initial dynamic respiration waveform based on the time sequence, as shown in figure 3 of the drawings,
based on the above technical concept, the human face blood vessel region is realized by a method based on the combination of an anisotropic diffusion filter and top hat segmentation, and is used for enhancing the edge contrast of the human face blood vessel region, it can be understood that the anisotropic diffusion filter (AD, P-M diffusion), the P-M diffusion is different from other methods in that each frame of image is regarded as a heat field, each pixel point in the image is regarded as a heat flow in a flow direction, it can be known from the heat flow principle that molecules with high heat quantity flow to a low heat quantity region, and the specific calculation method is as follows:
assuming that the image is I, the iterative formula of discrete AD is:
Figure 743704DEST_PATH_IMAGE001
in the formula ItFor the image of the t-th iteration, It+1Is the image of the t +1 th iteration, t is the iteration number, Nx,y,Sx,y,Ex,y,Wx,yThe method comprises the following steps that four different directions are respectively adopted, c is a diffusion coefficient, ∇ is a gradient operator, and lambda is a coefficient, wherein c controls diffusion speed in the corresponding direction, lambda controls smoothness, the larger the numerical value is, the smoother the image is, and the edge is difficult to keep;
in Nx,y,Sx,y,Ex,y,Wx,yAnd calculating the partial derivative of the current pixel in four directions to obtain a divergence formula in four directions:
Figure 807475DEST_PATH_IMAGE002
in the formula Ix,yThe pixel points with coordinates (x, y) in the image I are obtained;
cNx,y,cSx,y,cEx,y,cWx,ythe diffusion coefficients in four directions are represented, and therefore,
the diffusion coefficient calculation formula in four directions is as follows:
Figure 537533DEST_PATH_IMAGE004
in the formula, K is a conductivity, and the larger the value of the conductivity K, the smoother the image.
As shown in fig. 5-6, in the fifth step, the initial dynamic heart rate waveform and the initial dynamic respiration waveform are respectively filtered to obtain the denoised and denoised heart rate signal and respiration signal, based on which,
the step of filtering the initial dynamic heart rate waveform and the initial dynamic respiration waveform comprises:
s5-1, carrying out detrending filtering on the time sequence based on HP filtering, and verifying stationarity by using an ADF stationarity test method;
s5-2, on one hand, selecting a band-pass filter with a heart rate range with an upper cut-off frequency of 40 times/min and a lower cut-off frequency of 200 times/min, it will be appreciated that the heart rate range for normal adults in the resting state is (60-100) beats/min, but the heart rate can be different due to different ages, sexes and other physiological conditions, the respiratory frequency range of normal adults in a calm state is 12-20 times/min, meanwhile, considering the existence of abnormal values with too low heart rate or too high heart rate, the respiration 10 and 30 belong to threshold values deviating from the cognitive range in 40 to 200 times/min of the heart rate under the general condition, and if the heart rate is 40 to 200 and the respiration is 10 to 30, the human heart stops suddenly, and based on the threshold values, the band-pass filter in the set range can effectively filter random data which cannot occur; on the other hand, the band-pass filters with the respiratory ranges of 10 times/min at the upper cut-off frequency and 30 times/min at the lower cut-off frequency are selected at the same time, and it can be understood that the respiratory frequency ranges of normal adults are (12-20) times/min, so that random data which cannot appear can be effectively filtered by adopting the band-pass filters with the set ranges;
as shown in fig. 4, 7 and 8, a VMD and wavelet threshold denoising joint algorithm is adopted to obtain a denoised and denoised heart rate signal and respiration signal: s5-3, decomposing the initial dynamic heart rate waveform with noise and the initial dynamic respiration waveform into IMF components with limited frequency dominance by using a VMD decomposition algorithm; s5-4, respectively performing wavelet decomposition and threshold denoising on each IMF component obtained by decomposition, wherein the method is based on S5-3 and S5-4, and aims to better filter frequencies close to the maximum power peak value in a way of directly using wavelet threshold denoising on an initial signal waveform, so that the heart rate result is more accurate and tends to be stable (the transformation amplitude is reduced), and the stability is improved; s5-5, reconstructing IMF components subjected to wavelet decomposition and threshold denoising, converting a frequency domain to view the respiratory frequency and the heart rate frequency corresponding to the maximum peak value and outputting a heart rate signal and a respiratory signal.
Sixthly, acquiring power spectrums of the heart rate signal and the respiratory signal by using a classical spectrum and a Fourier transform-based periodic method to obtain a heart rate value and a respiratory value, wherein it can be understood that the heart rate value is generally calculated by two methods: time domain calculation and frequency domain calculation: time domain calculation: by calculating the number of peaks per unit time, for example: the heart rate in the period is [ (n-1)/t ]. multidot.60 as n wave peaks in the time t, the principle is that one wave peak is generated in one heart beating period (stretching and shrinking), and the heart rate value can be obtained by calculating the number of the wave peaks in 60 s; and (3) calculating a frequency domain: and analyzing the heart rate through the acquired power spectrum, namely finding a power peak value in the power spectrum, wherein the frequency f corresponds to the power peak value, and the heart rate is f 60.
As an embodiment of the present invention, as shown in fig. 9, in a process of obtaining a heart rate value and a respiration value by using a classical spectrum and obtaining power spectra of a heart rate signal and a respiration signal based on a fourier transform periodic method, a peak value of the power spectra corresponds to a signal frequency, and the signal frequency at this time is a heart rate frequency, wherein an expression relationship between the heart rate frequency and the signal frequency corresponding to the peak value is as follows: HR = FMAXT, wherein, FMAXFor the frequency corresponding to the maximum amplitude of the power spectrum, t is the time period, the reference value is 65bpm, and the measurement error is +1, for example, the frequency F corresponding to the maximum amplitudeMAX=1.1hz, the heart rate value is HR = FMAXT =1.1 × 60=66bpm, the reference value then being 65bpm, the measurement error being +1, as shown in the following table: unit root test results:
Figure 989768DEST_PATH_IMAGE005
the technical scope of the present invention is not limited to the above description, and those skilled in the art can make various changes and modifications to the above-described embodiments without departing from the technical spirit of the present invention, and such changes and modifications should fall within the protective scope of the present invention.

Claims (7)

1. A heart rate and respiration analysis processing method based on a thermal imaging technology is characterized by comprising the following steps: the method comprises the following steps:
the method comprises the steps of firstly, obtaining a sequence image based on image acquisition equipment;
secondly, segmenting the acquired sequence image to obtain a sequence image interesting region and a background so as to generate a foreground target in a foreground region;
thirdly, carrying out face detection on the foreground target based on the OpenCv function to obtain a face interesting region in the foreground region;
fourthly, segmenting blood vessels and a background in a human face interesting region through gray value conversion to obtain a human face blood vessel region, averaging the gray levels of the human face blood vessel region to form an initial dynamic heart rate waveform based on a time sequence, and meanwhile averaging the gray levels of a region where nostrils are located in the human face interesting region to form an initial dynamic respiration waveform based on the time sequence; wherein the content of the first and second substances,
the obtaining of the human face blood vessel region is realized based on a method combining an anisotropic diffusion filter and high-hat segmentation, and is used for enhancing the edge contrast of the human face blood vessel region, and the specific calculation mode is as follows:
assuming that the image is I, the iterative formula of discrete AD is:
Figure 263891DEST_PATH_IMAGE001
in the formula ItFor the image of the t-th iteration, It+1Is the image of the t +1 th iteration, t is the iteration number, Nx,y,Sx,y,Ex,y,Wx,yRespectively four different directions, c is the diffusion coefficient, ∇ is the gradient operator, λ is the coefficient, where,
c, controlling the diffusion speed in the corresponding direction, controlling the smoothness by lambda, wherein the larger the numerical value is, the smoother the image is, and the more difficult the edge is to be reserved;
in Nx,y,Sx,y,Ex,y,Wx,yAnd calculating the partial derivative of the current pixel in four directions to obtain a divergence formula in four directions:
Figure 62083DEST_PATH_IMAGE002
in the formula Ix,yThe pixel points with coordinates (x, y) in the image I are obtained;
cNx,y,cSx,y,cEx,y,cWx,ythe diffusion coefficients in four directions are represented, and therefore,
the diffusion coefficient calculation formula in four directions is as follows:
Figure 792141DEST_PATH_IMAGE003
in the formula, K is a conductivity coefficient, and the larger the conductivity coefficient K value is, the smoother the image is;
fifthly, filtering the initial dynamic heart rate waveform and the initial dynamic respiration waveform respectively to obtain a denoised and denoised heart rate signal and a denoised respiration signal;
and sixthly, acquiring power spectrums of the heart rate signal and the respiratory signal by using a classical spectrum and a Fourier transform-based periodic method to obtain a heart rate value and a respiratory value.
2. A method for analyzing and processing heart rate and respiration based on thermal imaging technology as claimed in claim 1, wherein: after the sequence of images is acquired and before the sequence of images is segmented, the sequence of images also needs to be preprocessed:
s1-1, performing median filtering on the sequence image, wherein the specific processing mode of performing median filtering on the sequence image is as follows: acquiring each pixel value in the field of the point marked as the region of interest in the sequence image, and replacing the median value of each pixel value with the point marked as the region of interest to remove noise while preventing the edge information in the region of interest from being damaged;
s1-2, adjusting the image contrast of the sequence image based on histogram equalization, wherein the specific implementation process of histogram equalization is as follows: and adjusting the gray value distribution based on the accumulation function, and adjusting the gray intervals distributed in a relatively centralized manner in the sequence image to be uniformly distributed in the whole gray range so as to avoid the disadvantage of image segmentation caused by fuzzy edge information.
3. A method for processing heart rate and respiration analysis based on thermal imaging technology according to claim 1 or 2, wherein: in the second step, the specific implementation of generating the foreground object includes boundary feature contour extraction combined with a background subtraction method and a morphological processing method, wherein the specific implementation of extracting the foreground object is as follows:
firstly, detecting a cv2.findContours function and a GMG algorithm of background subtraction based on an image contour, and using corrosion expansion to a point which has noise and is marked as a region of interest to obtain an expanded image;
secondly, performing binarization threshold processing based on a python + opencv configuration file;
and finally, eliminating points inside and outside the outline area where the expanded image is located, wherein the specifically eliminated points are points marked as hairs or eyes, so that the one-frame effect of target tracking of the GMG algorithm of background subtraction is achieved.
4. A method for analyzing and processing heart rate and respiration based on thermal imaging technology as claimed in claim 1, wherein: and thirdly, establishing a face detection recognition model based on a Dlib library in an OpenCv function to obtain a face interesting region, wherein training feature information of the face detection recognition model is 81 feature detection points provided based on the Dlib library, so that the mapping of each face feature information in the face interesting region obtained based on the face detection recognition model is achieved, the key point detection of the face feature information is closer to a real face, and the problem of shaking of key points is avoided.
5. A method for analyzing and processing heart rate and respiration based on thermal imaging technology as claimed in claim 1, wherein: in the fifth step, the step of filtering the initial dynamic heart rate waveform and the initial dynamic respiration waveform includes:
s5-1, carrying out detrending filtering on the time sequence based on HP filtering, and verifying stationarity by using an ADF stationarity test method;
s5-2, selecting a band-pass filter with a heart rate range with an upper cut-off frequency of 40 times/min and a lower cut-off frequency of 200 times/min; meanwhile, a band-pass filter with the respiratory range of 10 times/min at the upper cut-off frequency and 30 times/min at the lower cut-off frequency is selected to filter random data.
6. The method for analyzing and processing heart rate and respiration based on the thermal imaging technology as claimed in claim 5, wherein: in the fifth step, the step of filtering the initial dynamic heart rate waveform and the initial dynamic respiration waveform further includes:
s5-3, decomposing the initial dynamic heart rate waveform with noise and the initial dynamic respiration waveform into IMF components with limited frequency dominance by using a VMD decomposition algorithm;
s5-4, respectively carrying out wavelet decomposition and threshold denoising on each IMF component obtained by decomposition;
s5-5, reconstructing IMF components subjected to wavelet decomposition and threshold denoising, converting a frequency domain to view the respiratory frequency and the heart rate frequency corresponding to the maximum peak value and outputting a heart rate signal and a respiratory signal.
7. A method for analyzing and processing heart rate and respiration based on thermal imaging technology as claimed in claim 1, wherein: in the sixth step, in the process of obtaining the heart rate value and the respiration value by using the classical spectrum and a periodic method based on fourier transform to obtain the power spectrum of the heart rate signal and the respiration signal, the peak value of the power spectrum corresponds to the signal frequency, and the signal frequency at the moment is the heart rate frequency, wherein the expression relationship between the heart rate frequency and the signal frequency corresponding to the peak value is as follows:
HR=FMAXt, wherein, FMAXThe frequency corresponding to the maximum amplitude of the power spectrum, t is the time period, the reference value is 65bpm, and the measurement error is + 1.
CN202111524772.1A 2021-12-14 2021-12-14 Heart rate and respiration analysis processing method based on thermal imaging technology Active CN113920119B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111524772.1A CN113920119B (en) 2021-12-14 2021-12-14 Heart rate and respiration analysis processing method based on thermal imaging technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111524772.1A CN113920119B (en) 2021-12-14 2021-12-14 Heart rate and respiration analysis processing method based on thermal imaging technology

Publications (2)

Publication Number Publication Date
CN113920119A CN113920119A (en) 2022-01-11
CN113920119B true CN113920119B (en) 2022-03-18

Family

ID=79249185

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111524772.1A Active CN113920119B (en) 2021-12-14 2021-12-14 Heart rate and respiration analysis processing method based on thermal imaging technology

Country Status (1)

Country Link
CN (1) CN113920119B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI828160B (en) * 2022-05-24 2024-01-01 國立陽明交通大學 Analyzing method of cilia images
CN116912783B (en) * 2023-09-14 2023-12-26 苏州中科苏净生物技术有限公司 State monitoring method and system of nucleic acid detection platform

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106504235A (en) * 2016-10-18 2017-03-15 北京博瑞彤芸文化传播股份有限公司 Rhythm of the heart method based on image procossing
CN110279402A (en) * 2019-07-31 2019-09-27 杭州泽铭睿股权投资有限公司 A kind of imaging method of veins beneath the skin optical video image
CN111839519A (en) * 2020-05-26 2020-10-30 合肥工业大学 Non-contact respiratory frequency monitoring method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106504235A (en) * 2016-10-18 2017-03-15 北京博瑞彤芸文化传播股份有限公司 Rhythm of the heart method based on image procossing
CN110279402A (en) * 2019-07-31 2019-09-27 杭州泽铭睿股权投资有限公司 A kind of imaging method of veins beneath the skin optical video image
CN111839519A (en) * 2020-05-26 2020-10-30 合肥工业大学 Non-contact respiratory frequency monitoring method and system

Also Published As

Publication number Publication date
CN113920119A (en) 2022-01-11

Similar Documents

Publication Publication Date Title
Wang et al. A comparative survey of methods for remote heart rate detection from frontal face videos
CN110269600B (en) Non-contact video heart rate detection method based on multivariate empirical mode decomposition and combined blind source separation
CN113920119B (en) Heart rate and respiration analysis processing method based on thermal imaging technology
Feng et al. Motion artifacts suppression for remote imaging photoplethysmography
Wu et al. Motion resistant image-photoplethysmography based on spectral peak tracking algorithm
Casado et al. Face2PPG: An unsupervised pipeline for blood volume pulse extraction from faces
Zhang et al. Simultaneous detection of blink and heart rate using multi-channel ICA from smart phone videos
CN110706826A (en) Non-contact real-time multi-person heart rate and blood pressure measuring method based on video images
CN111243739A (en) Anti-interference physiological parameter telemetering method and system
CN111387959A (en) Non-contact physiological parameter detection method based on IPPG
Hamedani et al. Spatio-temporal filtering of thermal video sequences for heart rate estimation
Al-Naji et al. Remote measurement of cardiopulmonary signal using an unmanned aerial vehicle
Ernst et al. Optimal color channel combination across skin tones for remote heart rate measurement in camera-based photoplethysmography
Wu et al. Camera-based heart rate measurement using continuous wavelet transform
CN111938622B (en) Heart rate detection method, device and system and readable storage medium
Zhao et al. Visual heart rate estimation and negative feedback control for fitness exercise
Chen et al. Modulation model of the photoplethysmography signal for vital sign extraction
Cheng et al. Remote heart rate measurement from near-infrared videos based on joint blind source separation with delay-coordinate transformation
Cho et al. Reduction of motion artifacts from remote photoplethysmography using adaptive noise cancellation and modified HSI model
Luguern et al. Remote photoplethysmography combining color channels with SNR maximization for respiratory rate assessment
Li et al. Comparison of region of interest segmentation methods for video-based heart rate measurements
Ryu et al. A measurement of illumination variation-resistant noncontact heart rate based on the combination of singular spectrum analysis and sub-band method
He et al. Remote Photoplethysmography Heart Rate Variability Detection Using Signal to Noise Ratio Bandpass Filtering
Sahin et al. Non-Contact Heart Rate Monitoring from Face Video Utilizing Color Intensity
CN114246570B (en) Near-infrared heart rate detection method by fusing peak signal-to-noise ratio and Peerson correlation coefficient

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