-1

I am working with a Face Recognition project and I want to create a "Register" method.

Register Method must be able to capture 10 faces with different angles. So, I need to capture 10 different image files, but I need to be 5 seconds after so they would have time to change the angle of their face.

I know how to capture 10 faces continuously, but I can't do it with delay of 5 seconds every next capture.

This is my code for capturing 10 image continuously:

for(int x = 0; x < 10; x++)
{
imgCapture = capture.QueryFrame();
}
julianconcepcion
  • 187
  • 3
  • 18
  • Just from a user perspective maybe try 3 seconds instead of 5, both would work but sitting there posing for a minute at a camera probably could get quite timely. Or maybe try less image captures? – Srb1313711 Mar 04 '14 at 17:30

1 Answers1

0

You could try using a timer with it's interval set to 5000 (5000 milliseconds which is 5 seconds):

int Snapshots = 0;

void Timer1_Tick()
{
    imgCapture = capture.QueryFrame();
    x++;
    if (x == 10) Timer1.Enabled = false;
}
davidsbro
  • 2,761
  • 4
  • 23
  • 33