Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Program uses too much CPU.. What can be done?

What can be done to reduce the CPU time of this OpenCV code. It keeps Crashing my program making it hard to test on.

http://pastebin.com/Tyh26xqA

I know there is a lot of code...

So here is an overview of the code: I start by using haarCascade to detect Face. when one has been detected the user press y to conform it has been found.

In the next state will GoodFeatures be found at which Lukas kanade is being used to track them with forward backward error estimation. By using Simple Stats I move the Mask at which the Lukas Kanade optical flow is applied.

For some reason it use a lot of CPU, And I can't seem to find any way of optimizing it... I think i have done the best I can.. I cannot see what else i can do..

Could OpenCV be used with CUDA?

Any help is appreciated.