Compare commits

..

7 Commits

Author SHA1 Message Date
Darren GALLOIS fd6fd3202c amongus
Merge branch 'main' of https://gitarero.ecam.fr/darren.gallois/video_to_heartpulserate_cpp into main
2023-02-24 11:22:44 +01:00
Darren GALLOIS 2a2f27256e Merge branch 'darrenlebg' into main 2023-02-24 11:17:57 +01:00
Darren GALLOIS 0b1b4c6f2e oui le code 2023-02-24 11:17:03 +01:00
Darren GALLOIS d26b2bcb97 added the compiling stuff 2023-02-24 10:00:33 +01:00
Darren GALLOIS f0e8277fb2 algorithm to print a message 2023-02-24 09:37:37 +01:00
Darren GALLOIS 4ee0d4b758 ppg.cpp added 2023-02-24 09:25:15 +01:00
Darren GALLOIS 9ea6fb9385 new branch define 2023-02-24 09:08:49 +01:00
3 changed files with 49 additions and 1 deletions

View File

@ -6,6 +6,9 @@ j'adore le cplusplus, c'est vraiment trop bien !
convert a video to a heart pulse rate graph
C plusse plusse
Ici cest ma branche
there is a new branche called darrenleg

9
makefile Normal file
View File

@ -0,0 +1,9 @@
all: ppg
g++ ppg.o -o ppg.exe -L/usr/lib/x86_64-linux-gnu -lopencv_stitching -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dnn_objdetect -lopencv_dnn_superres -lopencv_dpm -lopencv_highgui -lopencv_face -lopencv_freetype -lopencv_fuzzy -lopencv_hdf -lopencv_hfs -lopencv_img_hash -lopencv_line_descriptor -lopencv_quality -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_shape -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_superres -lopencv_optflow -lopencv_surface_matching -lopencv_tracking -lopencv_datasets -lopencv_text -lopencv_dnn -lopencv_plot -lopencv_ml -lopencv_videostab -lopencv_videoio -lopencv_viz -lopencv_ximgproc -lopencv_video -lopencv_xobjdetect -lopencv_objdetect -lopencv_calib3d -lopencv_imgcodecs -lopencv_features2d -lopencv_flann -lopencv_xphoto -lopencv_photo -lopencv_imgproc -lopencv_core
ppg: ppg.cpp
g++ -c ppg.cpp -I/usr/include/opencv4/opencv -I/usr/include/opencv4
clean:
rm *.o
rm *.exe

36
ppg.cpp Normal file
View File

@ -0,0 +1,36 @@
#include <iostream>
#include "opencv2/opencv.hpp"
#include "opencv2/videoio.hpp"
#include "opencv2/highgui.hpp"
#define FPS 30.0
int main(){
std::cout<<"PPG, j'adore gitbash même si avec github desktop c'est mieux"<< std::endl;
cv::VideoCapture cap;
cap.open(0);
if (!cap.isOpened())
{
std::cerr << "[ERROR] Unable to open camera!" << std::endl;
return -2;
}
while (true)
{
// create a matrix to store the image from the cam
cv::Mat frame;
// wait for a new frame from camera and store it into 'frame'
cap.read(frame);
// check if we succeeded
if (frame.empty())
{
std::cerr << "[ERROR] blank frame grabbed" << std::endl;
break;
}
cv::imshow("Color", frame);
if (cv::waitKey(1000.0/FPS) >= 0)
{
break;
}
}
return 0;}