Upgrade OpenCV project to latest version

2019-06-24 14:01发布

问题:

I have a C++ logo detection project which uses OpenCV 2.3.1. I need to upgrade this project to OpenCV 3.0. For example instead of using (I actually mean replacing) IplImage I would like to use cv::Mat. I know that everything will not be automatically upgraded without some manual coding.

Question: I would like to know if there is any way to at least do some of the work automatically, by using a software or third party library.

回答1:

I recently had to upgrade an old OpenCV project to make use of some extra features offered in 2.4.* versions (coming from version 2.2). There is no tool or library that will help you detect what you need to change. I had to upgrade and then fix certain parts of my code that used functions that had changed slightly.

A really neat resource you can use is this: API changes/compatibility report for the OpenCV library

It allows you to check the backward compatibility % between versions and see the main changes introduced in each library version. So you can use this to fix every conflict you see once you update the library to the version you want.