make code compile with OpenCV3