nul
This commit is contained in:
parent
3ee1902969
commit
604bceb8b6
27
ppg.cpp
27
ppg.cpp
|
|
@ -1,7 +1,34 @@
|
||||||
|
|
||||||
|
#include "opencv2/opencv.hpp"
|
||||||
|
#include "opencv2/videoio.hpp"
|
||||||
|
#include "opencv2/highgui.hpp
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
std::cout <<"PPG algorithm"<< std::endl;
|
std::cout <<"PPG algorithm"<< std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue