diff --git a/include/deltille/DetectorTools.h b/include/deltille/DetectorTools.h index fe6c9bb..70fb503 100644 --- a/include/deltille/DetectorTools.h +++ b/include/deltille/DetectorTools.h @@ -186,7 +186,7 @@ void stretchIntensities(cv::InputArray input, cv::OutputArray output); template void subpixel_marker(cv::Mat &img, const FloatPoint &pt, float sz, const cv::Scalar &color, int thickness = 1, - int lineType = CV_AA) { + int lineType = cv::LINE_AA) { const int shift = 16; const float ss = (1 << shift); cv::rectangle(img, cv::Point(int((pt.x - sz) * ss), int((pt.y - sz) * ss)), @@ -197,7 +197,7 @@ void subpixel_marker(cv::Mat &img, const FloatPoint &pt, float sz, template void subpixel_line(cv::Mat &img, const FloatPoint &pt1, const FloatPoint &pt2, const cv::Scalar &color, int thickness = 1, - int lineType = CV_AA) { + int lineType = cv::LINE_AA) { const int shift = 16; const float ss = (1 << shift); cv::line(img, cv::Point(int(pt1.x * ss), int(pt1.y * ss)), diff --git a/include/deltille/PolynomialSaddleDetectorContext.h b/include/deltille/PolynomialSaddleDetectorContext.h index d5e6043..d618db1 100644 --- a/include/deltille/PolynomialSaddleDetectorContext.h +++ b/include/deltille/PolynomialSaddleDetectorContext.h @@ -255,7 +255,7 @@ struct PolynomialSaddleDetectorContext { if (img.getMat().channels() == 3) // convert to a single channel first, keep original intensity range for // now... - cvtColor(img, gray_img, CV_RGB2GRAY); + cvtColor(img, gray_img, cv::COLOR_RGB2GRAY); else gray_img = img.getMat(); diff --git a/include/deltille/target_detector.h b/include/deltille/target_detector.h index b50cb2f..ad3c770 100644 --- a/include/deltille/target_detector.h +++ b/include/deltille/target_detector.h @@ -91,7 +91,7 @@ FindBoards(const cv::Mat &I, const cv::Size &board_size, case cv::DataType::type: return FindBoardsHelper( I, board_size, boards); - case cv::DataType::type: + case cv::DataType::type: return FindBoardsHelper( I, board_size, boards); case cv::DataType::type: diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 800b579..9de892b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -14,7 +14,7 @@ ## License along with this library; if not, write to the Free Software ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -find_package(OpenCV 3 CONFIG REQUIRED COMPONENTS core highgui imgproc imgcodecs) +find_package(OpenCV 4 CONFIG REQUIRED COMPONENTS core highgui imgproc imgcodecs) add_library(opencv INTERFACE IMPORTED) set_target_properties(opencv PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${OpenCV_INCLUDE_DIRS}"