Closed kmactavish closed 9 years ago
After profiling, turns out OpenCV Mat construction / destruction / expressions are taking 85% of the CPU time. I think I'll need to port that code to some other library, and Eigen seems like the best candidate.
Using cv::Matx
and cv::Vec
my runtime is now reasonable.
Unfortunately, these classes are only functional in OpenCV 2.4 and later, so support will need to be dropped for OpenCV < 2.4 when this code is integrated.
I believe this issue can be closed.
Good find, great to keep it only openCV dependent. As for the version, I think when we move to openCV3.0 we will probably have to force dependence on 3.0 in any case. Happy to close this issue too.
In an effort to improve efficiency, some of my in-progress code may benefit from using Eigen matrix math vs OpenCV matrix math. A lot of this would be the manipulation of small vectors / matrices of sizes < 5, making OpenCV agonizingly slow.
For discussion