Ask Your Question
0

Adjust waitkey in Ubuntu

asked 2013-05-13 05:22:22 -0600

I confess to knowing nothing whatever about opencv but I needed to install it (2.3) in Ubuntu 12.04 in order to run a headtracking prog. using webcam. The problem is that the image is very laggy & as far as I can ascertain this is because the Waitkey value needs to be adjusted. But how?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-05-14 04:10:51 -0600

You need to retrieve the source code of your program, go to the line of code that calls the command waitKey('intValue') and change the internal value to an amount of milliseconds you want to perform a wait.

However, be aware that this waiting is mostly to give the window the change to call its internal repaint method, in order to visualize everything correctly. Probably the cause of your slower framerate is either

  • A too large resolution frame as input to the algorithm
  • An exhaustive algorithm for tracking, not able to get a higher framerate

I do not believe that waitKey, which has mostly a value of like 30 milliseconds, would be the bad guy here.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-05-13 05:22:22 -0600

Seen: 461 times

Last updated: May 14 '13