From 93f7529970af661b23a47ee1a6788a9f2c80fd12 Mon Sep 17 00:00:00 2001 From: hn-88 Date: Fri, 15 Dec 2023 11:07:22 +0530 Subject: [PATCH] try catch debugging --- pan2fulldome.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pan2fulldome.cpp b/pan2fulldome.cpp index f2bc702..1c6da26 100644 --- a/pan2fulldome.cpp +++ b/pan2fulldome.cpp @@ -241,9 +241,19 @@ cv::Mat equirectToFisheye(cv::Mat inputMat, int sky_threshold, int horizontal_ex cv::Mat mask(dstsize, CV_8UC1, cv::Scalar(0)); // todo calculate the correct polynomial vertices [160,130],[350,130],[250,300] // width 10% of outputw, height 50% of outputw + try { std::vector my_poly = {cv::Point(outputw/20,outputw), cv::Point(outputw/10,outputw), cv::Point(outputw/20,outputw/2), cv::Point(outputw/10,outputw/2)}; cv::fillPoly(mask, my_poly, cv::Scalar::all(255)); + } catch { + cout << "Exception occurred in fillPoly!" << endl; + return dst; + } + try { cv::inpaint(dst, mask, dst2, 3, cv::INPAINT_TELEA); + } catch { + cout << "Exception occurred in inpaint!" << endl; + return dst; + } return dst2; }