What can be done to reduce the CPU time of this OpenCV code. It keeps Crashing my program making it hard to test on.
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.