ppg.cpp
This commit is contained in:
parent
fb5cf16189
commit
16e5abc275
16
ppg.cpp
16
ppg.cpp
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue