Reverted back to OpenCV 2.4.5. Refactoring: application logic moved to the logic class.