Skip to content

Commit

Permalink
trying creating mask with rectangle instead of fillpoly
Browse files Browse the repository at this point in the history
  • Loading branch information
hn-88 authored Dec 15, 2023
1 parent ff40f9e commit 362a1af
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pan2fulldome.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,11 @@ cv::Mat equirectToFisheye(cv::Mat inputMat, int sky_threshold, int horizontal_ex
try {
std::vector<cv::Point> my_poly = {cv::Point(outputw/2 - outputw/20,outputw), cv::Point(outputw/2 + outputw/20,outputw), cv::Point(outputw/2 + outputw/20,outputw/2), cv::Point(outputw/2 - outputw/20,outputw/2)};
//cv::fillPoly(InputOutputArray img, InputArrayOfArrays pts, const Scalar & color)
cv::fillPoly(mask, my_poly, cv::Scalar::all(255));
//cv::fillPoly(mask, my_poly, cv::Scalar::all(255));
// void cv::rectangle(InputOutputArray img, Point pt1, Point pt2, const Scalar & color)
cv::rectangle(mask, cv::Point(outputw/2 - outputw/20,outputw), cv::Point(outputw/2 + outputw/20,outputw/2), cv::Scalar(255) );
} catch (...) {
std::cout << "Exception occurred in fillPoly!" << std::endl;
std::cout << "Exception occurred in creating mask!" << std::endl;
return dst;
}
try {
Expand Down

0 comments on commit 362a1af

Please sign in to comment.