X-Git-Url: https://git.ao2.it/experiments/opencv_trail_effect.git/blobdiff_plain/79d57b3dedad2f0ae675bacc63470a5af1a176e6..648650d64c6777240f5e9e8ba5b005e7b6f415c3:/Segmentation.hpp diff --git a/Segmentation.hpp b/Segmentation.hpp index 5e87326..9ad76d7 100644 --- a/Segmentation.hpp +++ b/Segmentation.hpp @@ -51,8 +51,8 @@ public: cv::Mat gray_frame; cv::Mat frame_mask; - cvtColor(frame, gray_frame, CV_RGB2GRAY); - cv::threshold(gray_frame, frame_mask, threshold, 255, CV_THRESH_TOZERO); + cvtColor(frame, gray_frame, cv::COLOR_RGB2GRAY); + cv::threshold(gray_frame, frame_mask, threshold, 255, cv::THRESH_TOZERO); return frame_mask; } @@ -84,7 +84,7 @@ public: pMOG2->apply(frame, foreground_mask, 0); cv::erode(foreground_mask, foreground_mask, cv::Mat()); cv::dilate(foreground_mask, foreground_mask, cv::Mat()); - cv::threshold(foreground_mask, foreground_mask, 0, 255, CV_THRESH_OTSU); + cv::threshold(foreground_mask, foreground_mask, 0, 255, cv::THRESH_OTSU); cv::medianBlur(foreground_mask, foreground_mask, 9); return foreground_mask;