How opencv 4.x API is different from previous version?

前端 未结 3 2037
别那么骄傲
别那么骄傲 2021-02-07 06:08

I noted that opencv 4 is released and one difference is that API changed to be c++11 compliant.

What this really means?

How should I change my codes to be compat

3条回答
  •  渐次进展
    2021-02-07 06:50

    According to OpenCV 4.0.0, you don't have to make any significant modifications (most likely any at all) to your source codes, unless you are using some C API which has been removed.

    As already stated

    OpenCV is now C++11 library and requires C++11-compliant compiler

    To use c++11, clang version 3.3 and higher is required with flag -std=c++11. Same for g++ 4.3 and higher.

    It allows them to use std::string instead of cv::String, and other c++11 features. But don't worry, cv::String will still work, but is now allias for std::string. Similliar for smart pointers, etc.

提交回复
热议问题