Motion tracking in mac osx using QT C++ and openCV