Skip to content

Commit

Permalink
try catch debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
hn-88 authored Dec 15, 2023
1 parent aedac72 commit 93f7529
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pan2fulldome.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<cv::Point> 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;
}

Expand Down

0 comments on commit 93f7529

Please sign in to comment.