CN109770885A - A kind of examing heartbeat fastly method based on preview frame - Google Patents
A kind of examing heartbeat fastly method based on preview frame Download PDFInfo
- Publication number
- CN109770885A CN109770885A CN201910226962.1A CN201910226962A CN109770885A CN 109770885 A CN109770885 A CN 109770885A CN 201910226962 A CN201910226962 A CN 201910226962A CN 109770885 A CN109770885 A CN 109770885A
- Authority
- CN
- China
- Prior art keywords
- frame
- heart rate
- face
- camera
- bvp
- 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
Links
Abstract
The examing heartbeat fastly method based on preview frame that the invention discloses a kind of, this method respectively detects face or finger tip using mobile phone camera, when when using face datection, open equipment, call front camera, make face's face mobile phone camera, it is ensured that include face information in sequence of frames of video collected;When using finger tip detection, equipment is opened, rear camera is called, finger tip is covered on rear camera;In the one-dimension array for being 500 by the frame sequence deposit length of camera acquisition;While circle collection is to continuous preview frame, processing data are simultaneously saved, and start to calculate when reaching 256 frame;Start continuous heart rate detection.The present invention fetters problem for the complicated for operation and limbs of contact heart rate measurement, this method is without using electrode or sensor contacts human body, only it can be detected heart rate by regular handset, detection efficiency and the usage experience of testee are effectively improved, prolonged rhythm of the heart and disease prevention are suitable for.
Description
Technical field
It is specifically a kind of based on the fast of preview frame the present invention relates to video image processing application and heart rate detection field
Fast heart rate detection method.
Background technique
With the development of computer technology and universal, more and more computer theories are related to medical domain, are applied to
The links such as medical diagnosis and routine health monitoring, have played powerful booster action for the progress of medicine.Heart rate is reflection
One of index of human health status, and judge most basic one of the physical signs of cardiovascular disease.The clinical heart traditionally
Rate detection means needs multiple positions of the 12 lead line contact human body using electrocardiograph, trivial operations, the degree of automation
It is not high, there are higher professional knowledge requirement, the heart rate detection not being suitable under common scenarios to user.
Photoplethysmography (Photoplethysmography, PPG) is to carry out the heart using computer vision technique
Rate detects most basic method, it passes through light emitting diode subcutaneously tissue emissions feux rouges, and feux rouges is by subcutaneous capillary network
In hemoglobin absorption, reflect or be transmitted to the photistor of the other end, signal is after treatment and in arterial blood
Amount of hemoglobin be positively correlated, by measure intensity of reflected light, trace volumetric blood pulse (Blood volume
Pulse, BVP) after signal, it can directly calculate heart rate.
There is a kind of contactless heart rate detection method using general network camera at present, this method utilizes independent element
Three average color traces are separated into three Ji Yuan letters by analysis (Independent Component Analysis, ICA)
Number, by the power Spectral Estimation heart rate for analyzing second base source signal.However, second Ji Yuan of ICA output can not table
Show PPG signal.
The above method can accurately measure heart rate value by contactless video method under certain scene, still
Calculating process is excessively very long, and for tested personnel, excessively high time cost will be with non-contact detection method bring
Convenience offsets, and impracticable.There are many more other heart rate detection methods, such as acquire data using video method, first
By shooting video, video is reprocessed, BVP waveform is obtained and carries out calculating heart rate.But handle recording and the processing time of video
It is longer, it is not nearly enough quick, while also needing to will receive image or video acquisition field using USB camera or IP Camera
The limitation of scape.
Summary of the invention
The examing heartbeat fastly method based on preview frame that the technical problem to be solved in the present invention is to provide a kind of, this method benefit
Video acquisition is carried out with smart phone, can simply, efficiently obtain heart rate Value Data.
Examing heartbeat fastly method based on preview frame of the invention includes the following steps:
The acquisition of step 1) video frame, takes Smartphone device, is carried out respectively to face or finger tip using mobile phone camera
Detection calls front camera, makes face's face mobile phone camera, it is ensured that acquired when using face datection, opening equipment
Sequence of frames of video in include face information;When using finger tip detection, equipment is opened, rear camera is called, finger tip is covered
It covers on rear camera;
The frame sequence of camera acquisition is stored in the one-dimension array that length is 500 by step 2) data prediction;Circulation
While collecting continuous preview frame, handles data and save, start to calculate when reaching 256 frame;
Step 3) rate calculation starts continuous heart rate detection, specifically includes:
The input of step 3.1) data, in the one-dimension array that length is 500, circle collection is same to continuous preview frame
When, it handles data and saves, start to calculate when reaching 256 frame;20 frame of each counting period, present frame are expressed as cnt, array
It is taken as { cnt -255, cnt } and substitutes into calculating;
Selected, the face recognition algorithms provided using Google of step 3.2) ROI region, carry out face inspection to each frame
It surveys, obtains region vector Rect (x, y, w, h) only comprising face information, as ROI region, wherein Rect indicates a matrix
Region, the initial vertex of x and y representing matrix, the length and width of w and h representing matrix select green logical when doing pixel averagely
Road is calculated;
Step 3.3) adds image rendering, when from camera readjustment to preview frame, adds one layer of rendering automatically using algorithm,
The rendering that a pale red (#FF5151) is added when face, improves the pixel value of RGB channel, while reducing background interference;Finger tip
Mono- pale red (#FFB5B5) rendering of Shi Tianjia, reduces the pixel value in red green channel, prevents from being saturated;
Step 3.4) spectra calculation heart rate obtains heart rate value by calculating BVP [x] [y] [i];
Step 3.5) takes average calculating heart rate: by calculating average heart rate array, obtaining heart rate value.
In step 1), the preposition peak of currently used equipment, 25fps frame per second are set by the parameter of mobile phone camera
And RGB color domain, take G path computation.
Step 3.4) specifically includes:
Step 3.4.1) the BVP value of all pixels point of the i-th frame (i=1,2,3 ... S) is summed, obtain one-dimensional BVP
Semaphore B [i], the semaphore can be with secondary indication BVP signals;
Step 3.4.2) Fast Fourier Transform (FFT) is carried out to B, obtain its power spectrum PBvp:
F (t)=fft (B (t));
PBvp(t)=| F (t) |2;
Wherein, fft is Fast Fourier Transform (FFT) function;
Step 3.4.3) heart rate value HRCalculating:
T=max { PBvp(t)};
Wherein, fpsThe frame per second of video.
Step 3.5) specifically includes:
Step 3.5.1) all real-time heart rate value additions are averaged;
Step 3.5.2) array is traversed, the real-time heart rate value that will be greater than average value 10 is left out, and the reality of average value 10 will be less than
When heart rate value leave out;
Step 3.5.3) average calculating heart rate value is taken again.
The principle of the present invention and advantageous effect are analyzed below.
Android phone equipment can be used in the present invention, and camera is controlled using Android program and carries out adopting for preview frame
Collection.It is divided into both direction in acquisition, one is calling Front camera to acquire face information, carry out face can be synchronized in collection process
Detection, it is ensured that include face information in sequence of frames of video collected;Another kind is to call rearmounted camera acquisition finger tip information.It adopts
Collect 500 frame informations to be calculated.The number of statistics frame, also can be dynamic to reject in the detection process according to the variation of pixel value
Fall the frame (finger tip or face shake) of interference after collecting 256 frame preview frames, carries out rate calculation.Every 20 frame calculates
Primary heart rate in real time simultaneously saves.Finally obtain a heart rate value sequence.Calculate average value.And weed out higher than average value 10 and low
10 value (being considered interference information value, it may be possible to as caused by the shake of hand or face).Recalculate heart rate average value.Both
It obtains a result.
The present invention proposes a kind of based on preview frame for the complicated for operation and limbs constraint problem of contact heart rate measurement
Examing heartbeat fastly method.The technology only can be detected by regular handset without using electrode or sensor contacts human body
Heart rate.Detection efficiency and the usage experience of testee are effectively improved, prolonged rhythm of the heart and disease prevention are suitable for.
The present invention provides two kinds of detection modes, face and finger tip.It is calculated using preview frame, does not need recorded video, saved
Time, improve calculating speed.
Present invention employs multi-thread design structures, introduce the thought of concurrent operation, use in the readjustment part of camera
Sub thread, effectively raises arithmetic speed, so that contactless heart rate detection technology is had better usage experience, improves
The practical significance of the technology.
Detailed description of the invention
Invention is further described in detail with reference to the accompanying drawings and detailed description:
Fig. 1 is the schematic process flow diagram of the method for the present invention.
Specific embodiment
Referring to attached drawing, the examing heartbeat fastly method of the invention based on preview frame includes the following steps:
The acquisition of step 1) video frame, takes Smartphone device, is carried out respectively to face or finger tip using mobile phone camera
Detection calls front camera, makes face's face mobile phone camera, it is ensured that acquired when using face datection, opening equipment
Sequence of frames of video in include face information;When using finger tip detection, equipment is opened, rear camera is called, finger tip is covered
It covers on rear camera;
The frame sequence of camera acquisition is stored in the one-dimension array that length is 500 by step 2) data prediction;Circulation
While collecting continuous preview frame, handles data and save, start to calculate when reaching 256 frame;
Step 3) rate calculation starts continuous heart rate detection, specifically includes:
The input of step 3.1) data, in the one-dimension array that length is 500, circle collection is same to continuous preview frame
When, it handles data and saves, start to calculate when reaching 256 frame;20 frame of each counting period, present frame are expressed as cnt, array
It is taken as { cnt -255, cnt } and substitutes into calculating;
Selected, the face recognition algorithms provided using Google of step 3.2) ROI region, carry out face inspection to each frame
It surveys, obtains region vector Rect (x, y, w, h) only comprising face information, (Region Of Interest feels emerging as ROI
Interesting region) region, wherein Rect indicates a matrix area, the initial vertex of x and y representing matrix, the length of w and h representing matrix
And width, select green channel to be calculated when doing pixel averagely;
Step 3.3) adds image rendering, when from camera readjustment to preview frame, adds one layer of rendering automatically using algorithm,
The rendering that a pale red (#FF5151) is added when face, improves the pixel value of RGB channel, while reducing background interference;Finger tip
Mono- pale red (#FFB5B5) rendering of Shi Tianjia, reduces the pixel value in red green channel, prevents from being saturated;
Step 3.4) spectra calculation heart rate obtains heart rate value by calculating BVP [x] [y] [i];
Step 3.5) takes average calculating heart rate: by calculating average heart rate array, obtaining heart rate value.
In step 1), the preposition peak of currently used equipment, 25fps frame per second are set by the parameter of mobile phone camera
And RGB color domain, take G path computation.
Step 3.4) specifically includes:
Step 3.4.1) the BVP value of all pixels point of the i-th frame (i=1,2,3 ... S) is summed, obtain one-dimensional BVP
Semaphore B [i], the semaphore can be with secondary indication BVP signals;
Step 3.4.2) Fast Fourier Transform (FFT) is carried out to B, obtain its power spectrum PBvp:
F (t)=fft (B (t));
PBvp(t)=| F (t) |2;
Wherein, fft is Fast Fourier Transform (FFT) function;
Step 3.4.3) heart rate value HRCalculating:
T=max { PBvp(t)};
Wherein, fpsThe frame per second of video.
Step 3.5) specifically includes:
Step 3.5.1) all real-time heart rate value additions are averaged;
Step 3.5.2) array is traversed, the real-time heart rate value that will be greater than average value 10 is left out, and the reality of average value 10 will be less than
When heart rate value leave out;
Step 3.5.3) average calculating heart rate value is taken again.
The principle of the present invention and advantageous effect are analyzed below.
Android phone equipment can be used in the present invention, and camera is controlled using Android program and carries out adopting for preview frame
Collection.It is divided into both direction in acquisition, one is calling Front camera to acquire face information, carry out face can be synchronized in collection process
Detection, it is ensured that include face information in sequence of frames of video collected;Another kind is to call rearmounted camera acquisition finger tip information.It adopts
Collect 500 frame informations to be calculated.The number of statistics frame, also can be dynamic to reject in the detection process according to the variation of pixel value
Fall the frame (finger tip or face shake) of interference after collecting 256 frame preview frames, carries out rate calculation.Every 20 frame calculates
Primary heart rate in real time simultaneously saves.Finally obtain a heart rate value sequence.Calculate average value.And weed out higher than average value 10 and low
10 value (being considered interference information value, it may be possible to as caused by the shake of hand or face).Recalculate heart rate average value.Both
It obtains a result.
The present invention proposes a kind of based on preview frame for the complicated for operation and limbs constraint problem of contact heart rate measurement
Examing heartbeat fastly method.The technology only can be detected by regular handset without using electrode or sensor contacts human body
Heart rate.Detection efficiency and the usage experience of testee are effectively improved, prolonged rhythm of the heart and disease prevention are suitable for.
The present invention provides two kinds of detection modes, face and finger tip.It is calculated using preview frame, does not need recorded video, saved
Time, improve calculating speed.
Present invention employs multi-thread design structures, introduce the thought of concurrent operation, use in the readjustment part of camera
Sub thread, effectively raises arithmetic speed, so that contactless heart rate detection technology is had better usage experience, improves
The practical significance of the technology.
In conclusion the present invention is not limited to above-mentioned specific embodiments.Those skilled in the art are not departing from skill of the present invention
Under the premise of art scheme, several changes or modification can be done, above-mentioned change or modification each fall within protection scope of the present invention.
Claims (4)
1. a kind of examing heartbeat fastly method based on preview frame, it is characterized in that including the following steps:
The acquisition of step 1) video frame, takes Smartphone device, is detected respectively to face or finger tip using mobile phone camera,
When using face datection, opening equipment, front camera is called, makes face's face mobile phone camera, it is ensured that view collected
It include face information in frequency frame sequence;When using finger tip detection, equipment is opened, rear camera is called, finger tip is covered on
On rear camera;
The frame sequence of camera acquisition is stored in the one-dimension array that length is 500 by step 2) data prediction;Circle collection
While to continuous preview frame, processing data are simultaneously saved, and start to calculate when reaching 256 frame;
Step 3) rate calculation starts continuous heart rate detection, specifically includes:
The input of step 3.1) data, in the one-dimension array that length is 500, while circle collection is to continuous preview frame,
Processing data simultaneously save, and start to calculate when reaching 256 frame;20 frame of each counting period, present frame are expressed as cnt, and array takes
It substitutes into and calculates for { cnt -255, cnt };
Selected, the face recognition algorithms provided using Google of step 3.2) ROI region, are carried out Face datection to each frame, obtained
To the region vector Rect (x, y, w, h) for only including face information, as ROI region, wherein Rect indicates a matrix area,
The initial vertex of x and y representing matrix, the length and width of w and h representing matrix select green channel when doing pixel averagely
It is calculated;
Step 3.3) adds image rendering, when from camera readjustment to preview frame, adds one layer of rendering, face automatically using algorithm
The rendering of mono- pale red (#FF5151) of Shi Tianjia, improves the pixel value of RGB channel, while reducing background interference;Add when finger tip
Add pale red (#FFB5B5) rendering, reduces the pixel value in red green channel, prevent from being saturated;
Step 3.4) spectra calculation heart rate obtains heart rate value by calculating BVP [x] [y] [i];
Step 3.5) takes average calculating heart rate: by calculating average heart rate array, obtaining heart rate value.
2. the examing heartbeat fastly method based on preview frame as described in claim 1, it is characterized in that in step 1), by mobile phone
The parameter of camera is set as the preposition peak of currently used equipment, 25fps frame per second and RGB color domain, takes the channel G meter
It calculates.
3. the examing heartbeat fastly method based on preview frame as described in claim 1, it is characterized in that the step 3.4) is specific
Include:
Step 3.4.1) the BVP value of all pixels point of the i-th frame (i=1,2,3 ... S) is summed, obtain one-dimensional BVP signal
It measures B [i], which can be with secondary indication BVP signal;
Step 3.4.2) Fast Fourier Transform (FFT) is carried out to B, obtain its power spectrum PBvp:
F (t)=fft (B (t)) (3)
PBvp(t)=| F (t) |2 (4)
Wherein, fft is Fast Fourier Transform (FFT) function;
Step 3.4.3) heart rate value HRCalculating:
T=max { PBvp(t)} (5)
Wherein, fpsThe frame per second of video.
4. the examing heartbeat fastly method based on preview frame as described in claim 1, it is characterized in that the step 3.5) is specific
Include:
Step 3.5.1) all real-time heart rate value additions are averaged;
Step 3.5.2) array is traversed, the real-time heart rate value that will be greater than average value 10 is left out, and the real-time heart of average value 10 will be less than
Rate value is left out;
Step 3.5.3) average calculating heart rate value is taken again.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910226962.1A CN109770885A (en) | 2019-03-25 | 2019-03-25 | A kind of examing heartbeat fastly method based on preview frame |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910226962.1A CN109770885A (en) | 2019-03-25 | 2019-03-25 | A kind of examing heartbeat fastly method based on preview frame |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109770885A true CN109770885A (en) | 2019-05-21 |
Family
ID=66490416
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910226962.1A Pending CN109770885A (en) | 2019-03-25 | 2019-03-25 | A kind of examing heartbeat fastly method based on preview frame |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109770885A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113397519A (en) * | 2021-08-05 | 2021-09-17 | 季华实验室 | Cardiovascular health state detection device |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014064575A2 (en) * | 2012-10-23 | 2014-05-01 | Koninklijke Philips N.V. | Device and method for obtaining vital sign information of a living being |
CN103826532A (en) * | 2011-08-22 | 2014-05-28 | Isis创新有限公司 | Remote monitoring of vital signs |
CN105989357A (en) * | 2016-01-18 | 2016-10-05 | 合肥工业大学 | Human face video processing-based heart rate detection method |
CN106491114A (en) * | 2016-10-25 | 2017-03-15 | Tcl集团股份有限公司 | A kind of heart rate detection method and device |
CN107211165A (en) * | 2015-01-09 | 2017-09-26 | 艾斯适配有限公司 | Devices, systems, and methods for automatically delaying video display |
CN107330945A (en) * | 2017-07-05 | 2017-11-07 | 合肥工业大学 | A kind of examing heartbeat fastly method based on video |
CN107392177A (en) * | 2017-08-05 | 2017-11-24 | 江西中医药大学 | A kind of human body identification verification method and its device |
US10076250B2 (en) * | 2015-06-14 | 2018-09-18 | Facense Ltd. | Detecting physiological responses based on multispectral data from head-mounted cameras |
CN108883294A (en) * | 2015-10-15 | 2018-11-23 | 医科达有限公司 | System and method for monitoring structure motion in entire radiotherapy |
CN108932783A (en) * | 2018-09-19 | 2018-12-04 | 南京邮电大学 | A kind of access control system towards big flow scene based on two-dimension human face identification |
CN109480808A (en) * | 2018-09-27 | 2019-03-19 | 深圳市君利信达科技有限公司 | A kind of heart rate detection method based on PPG, system, equipment and storage medium |
-
2019
- 2019-03-25 CN CN201910226962.1A patent/CN109770885A/en active Pending
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103826532A (en) * | 2011-08-22 | 2014-05-28 | Isis创新有限公司 | Remote monitoring of vital signs |
WO2014064575A2 (en) * | 2012-10-23 | 2014-05-01 | Koninklijke Philips N.V. | Device and method for obtaining vital sign information of a living being |
CN107211165A (en) * | 2015-01-09 | 2017-09-26 | 艾斯适配有限公司 | Devices, systems, and methods for automatically delaying video display |
US10076250B2 (en) * | 2015-06-14 | 2018-09-18 | Facense Ltd. | Detecting physiological responses based on multispectral data from head-mounted cameras |
CN108883294A (en) * | 2015-10-15 | 2018-11-23 | 医科达有限公司 | System and method for monitoring structure motion in entire radiotherapy |
CN105989357A (en) * | 2016-01-18 | 2016-10-05 | 合肥工业大学 | Human face video processing-based heart rate detection method |
CN106491114A (en) * | 2016-10-25 | 2017-03-15 | Tcl集团股份有限公司 | A kind of heart rate detection method and device |
CN107330945A (en) * | 2017-07-05 | 2017-11-07 | 合肥工业大学 | A kind of examing heartbeat fastly method based on video |
CN107392177A (en) * | 2017-08-05 | 2017-11-24 | 江西中医药大学 | A kind of human body identification verification method and its device |
CN108932783A (en) * | 2018-09-19 | 2018-12-04 | 南京邮电大学 | A kind of access control system towards big flow scene based on two-dimension human face identification |
CN109480808A (en) * | 2018-09-27 | 2019-03-19 | 深圳市君利信达科技有限公司 | A kind of heart rate detection method based on PPG, system, equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
王盛波: "基于视频实时持续心率检测及可视化", 《中国优秀硕士学位论文全文数据库(医药卫生科技辑)》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113397519A (en) * | 2021-08-05 | 2021-09-17 | 季华实验室 | Cardiovascular health state detection device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Li et al. | The obf database: A large face video database for remote physiological signal measurement and atrial fibrillation detection | |
US10004410B2 (en) | System and methods for measuring physiological parameters | |
Wang et al. | A comparative survey of methods for remote heart rate detection from frontal face videos | |
Fan et al. | Robust blood pressure estimation using an RGB camera | |
CN106580301B (en) | A kind of monitoring method of physiological parameter, device and handheld device | |
CN110384491A (en) | A kind of heart rate detection method based on common camera | |
CN106073729B (en) | The acquisition method of photoplethysmographic signal | |
CN104545864B (en) | Psychological regulation method and apparatus | |
US20130096439A1 (en) | Method and system for contact-free heart rate measurement | |
CN105989357A (en) | Human face video processing-based heart rate detection method | |
KR101738278B1 (en) | Emotion recognition method based on image | |
Gudi et al. | Efficient real-time camera based estimation of heart rate and its variability | |
Qiao et al. | Measuring heart rate and heart rate variability with smartphone camera | |
CN106793962A (en) | Method and apparatus for continuously estimating human blood-pressure using video image | |
CN107330945A (en) | A kind of examing heartbeat fastly method based on video | |
CN109497977A (en) | Human heart rate and method for detecting blood oxygen saturation and device | |
WO2021164350A1 (en) | Method and device for generating photoplethysmography signal | |
CN111938622B (en) | Heart rate detection method, device and system and readable storage medium | |
WO2019173283A1 (en) | Method and apparatus for non-invasive hemoglobin level prediction | |
Malasinghe et al. | A comparative study of common steps in video-based remote heart rate detection methods | |
CN109770885A (en) | A kind of examing heartbeat fastly method based on preview frame | |
WO2021111436A1 (en) | System and method for physiological measurements from optical data | |
CN112294282A (en) | Self-calibration method of emotion detection device based on RPPG | |
US11324406B1 (en) | Contactless photoplethysmography for physiological parameter measurement | |
Zhuang et al. | Remote blood pressure measurement via spatiotemporal mapping of a short-time facial video |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20190521 |
|
WD01 | Invention patent application deemed withdrawn after publication |