All Projects → pi-null-mezon → vpglib

pi-null-mezon / vpglib

Licence: other
Opencv extension that allows to capture PPG signal from the video of the human face

Programming Languages

C++
36643 projects - #6 most used programming language
QMake
1090 projects
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to vpglib

Pulse
❤️ A heart rate camera pulse detector written in Swift.
Stars: ✭ 53 (+6%)
Mutual labels:  pulse, heartrate
Rink Rs
Unit conversion tool and library written in rust
Stars: ✭ 242 (+384%)
Mutual labels:  measurements
Rspec Benchmark
Performance testing matchers for RSpec
Stars: ✭ 460 (+820%)
Mutual labels:  measurements
Openspeedmonitor
Open Source Web Performance Monitoring. Made by iteratec.
Stars: ✭ 119 (+138%)
Mutual labels:  measurements
Unitsnet
Makes life working with units of measurement just a little bit better.
Stars: ✭ 641 (+1182%)
Mutual labels:  measurements
Criterion
Microbenchmarking for Modern C++
Stars: ✭ 140 (+180%)
Mutual labels:  measurements
Cheap Ruler
Fast approximations for common geodesic measurements 🌐
Stars: ✭ 334 (+568%)
Mutual labels:  measurements
NeuroMorph
The NeuroMorph analysis and visualization toolkit
Stars: ✭ 57 (+14%)
Mutual labels:  measurements
React Performance Observer
Get performance measurements from React Fiber
Stars: ✭ 207 (+314%)
Mutual labels:  measurements
Nginx Lua Redis Rate Measuring
A lua library to provide distributed rate measurement using nginx + redis, you can use it to do a throttling system within many nodes.
Stars: ✭ 109 (+118%)
Mutual labels:  measurements
Render Timing For Unity
GPU time metric for Unity apps (currently limited to Android/GLES)
Stars: ✭ 97 (+94%)
Mutual labels:  measurements
Mycodo
An environmental monitoring and regulation system
Stars: ✭ 936 (+1772%)
Mutual labels:  measurements
Influxdb Client For Arduino
Simple library for sending measurements to an InfluxDB with a single network request. Supports ESP8266 and ESP32.
Stars: ✭ 176 (+252%)
Mutual labels:  measurements
Celero
C++ Benchmark Authoring Library/Framework
Stars: ✭ 593 (+1086%)
Mutual labels:  measurements
units
A run-time C++ library for working with units of measurement and conversions between them and with string representations of units and measurements
Stars: ✭ 114 (+128%)
Mutual labels:  measurements
Towel
Throw in the towel.
Stars: ✭ 333 (+566%)
Mutual labels:  measurements
Pysat
Generalized satellite and space science data processing and file management.
Stars: ✭ 72 (+44%)
Mutual labels:  measurements
Meter
Meter - is a simple micro-benchmarking tool for Android (and Java) projects. This is not a profiler, this is very small utility class that designed for making benchmarking easy. Nothing more. Alternative to Android Jetpack Benchmark.
Stars: ✭ 125 (+150%)
Mutual labels:  measurements
cheap-ruler-cpp
Fast approximations for common geodesic measurements
Stars: ✭ 32 (-36%)
Mutual labels:  measurements
LaserPulse
LaserPulse is a class for storing and handling time-frequency pulses, like for example femtosecond laser pulses
Stars: ✭ 36 (-28%)
Mutual labels:  pulse

VPGLIB

VPGLIB is the library for the blood pulse extraction from the video of the human face. HR measurement ranges from 55 bpm to 175 bpm and absolute error in most cases should be less than 5 bpm. Pay attention that ordinary PC is not certified as measurement tool, so measurement error could be high. Use library only at your own risk, no warranties are granted.

How to use:

#include <iostream>

using namespace std;

#include "vpg.h"

int main()
{
    cv::VideoCapture capture;
    // open default video capture device
    if(capture.open(0)) {
        // CASCADE_FILENAME is a path to haarcascade or lbpcascade file for the face detection
        vpg::FaceProcessor faceproc(CASCADE_FILENAME);
        // measure discretization period of the video
        float framePeriod = faceproc.measureFramePeriod(&capture);
        printf("measured frame period: %.2f ms",framePeriod);
        // create object that performs harmonic analysis of vpg-signal
        vpg::PulseProcessor pulseproc(framePeriod);
        cv::Mat frame;
        unsigned int k = 0; // frame counter
        float s = 0.0, t = 0.0; // 's' for vpg-signal count, 't' for actual frame time
        while(true) {
            if(capture.read(frame)) {
                // perform frame enrollment
                faceproc.enrollImage(frame, s, t);
                // update vpg-signal if face tracked
                if(faceproc.getFaceRect().area() > 0) {
                    pulseproc.update(s,t);
                    // draw rect for tracked face
                    cv::rectangle(frame,faceproc.getFaceRect(),cv::Scalar(127,255,127),1,CV_AA);
                    // periodically compute heart rate estimation
                    if(k % 64 == 0)
                        printf("\nHR measurement: %.0f bpm", pulseproc.computeFrequency());
                }
                cv::imshow("Video probe", frame);
            }
            // increment counter
            k++;
            // exit if user pressed 'escape'
            if( cv::waitKey(1) == 27 )
                break;
        }
    }
    return 0;
}

Dependencies:

  1. OpenCV

Designed by Alex A. Taranov, 2015, list of the project sources

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].