Scheme for regular substitution via VScode.
When encountering an incorrect version of OpenCV
-
- Find.
(find_package\(OpenCV).*
-
- Replace:
$1 REQUIRED)
-
- CV_GRAY2RGB
-
- Find:
CV_(.*GRAY[^)]*)
Replace:
cv::COLOR_$1
-
- CV_AA
- Replace:
CV_AA
-
- Replace:
cv::LINE_AA
-
- CV_CALIB_*
-
- Replace:
CV_(CALIB[^ ,)]*)
-
- Replace:
cv::$1
-
- CV_LOAD_IMAGE_UNCHANGED、CV_LOAD_IMAGE_GRAYSCALE
-
- Find:
CV_LOAD_IMAGE_([^ )]*)
-
- Replace:
cv::IMREAD_$1
-
- Most other issues, just add the header file
-
-
- chessboard.cc Error
- No such file or directory
-
#include<opencv/cv.h>
:
#include <opencv2/imgproc/imgproc_c.h>
#include <opencv2/highgui/highgui_c.h>