Little piece of OpenCv not optimized yet