This commit is contained in:
majd.safitli 2023-02-24 10:58:14 +01:00
parent fb5cf16189
commit 16e5abc275
1 changed files with 16 additions and 0 deletions

16
ppg.cpp
View File

@ -8,6 +8,9 @@
#include "opencv2/highgui.hpp"
float FPS = 30.0;
bool isDiscardData = true;
int countDiscard = 0;
float DISCARD_DURATION;
int main()
{
@ -18,6 +21,19 @@ int main()
std::cerr << "[ERROR] Unable to open camera!" << std::endl;
return -2;
}
if (isDiscardData)
{
countDiscard++;
if (countDiscard == DISCARD_DURATION*FPS)
{
isDiscardData = false;
}
}
else
{
return 0;
}
while (true)
{