From 47411886496f1704ce78584c3b33d6b59fc6f862 Mon Sep 17 00:00:00 2001 From: hn-88 Date: Fri, 15 Dec 2023 09:21:10 +0530 Subject: [PATCH] troubleshooting crash checking if the Scalar should be 255 --- pan2fulldome.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pan2fulldome.cpp b/pan2fulldome.cpp index 24af185..810a827 100644 --- a/pan2fulldome.cpp +++ b/pan2fulldome.cpp @@ -240,8 +240,8 @@ cv::Mat equirectToFisheye(cv::Mat inputMat, int sky_threshold, int horizontal_ex // first create and initialize a mask, needs to be 8 bit 1 channel cv::Mat mask(dstsize, CV_8UC1, cv::Scalar(0)); // todo calculate the correct polynomial vertices - std::vector my_poly = {cv::Point(150, 100), cv::Point(300, 150), cv::Point(300, 310), cv::Point(150, 300)}; - cv::fillPoly(mask, my_poly, cv::Scalar::all(1)); + std::vector my_poly = {cv::Point(15, 10), cv::Point(30, 15), cv::Point(30, 70), cv::Point(15, 30)}; + cv::fillPoly(mask, my_poly, cv::Scalar::all(255)); cv::inpaint(dst, mask, dst, 3, cv::INPAINT_TELEA); return dst; }