compatibility with latest opencv version