1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Merge branch 4.x

This commit is contained in:
Alexander Smorkalov
2024-02-16 18:45:22 +03:00
26 changed files with 441 additions and 89 deletions
+11
View File
@@ -593,4 +593,15 @@ void cv::fisheye::undistortImage(InputArray distorted, OutputArray undistorted,
cv::remap(distorted, undistorted, map1, map2, INTER_LINEAR, BORDER_CONSTANT);
}
bool cv::fisheye::solvePnP( InputArray opoints, InputArray ipoints,
InputArray cameraMatrix, InputArray distCoeffs,
OutputArray rvec, OutputArray tvec, bool useExtrinsicGuess,
int flags, TermCriteria criteria)
{
Mat imagePointsNormalized;
cv::fisheye::undistortPoints(ipoints, imagePointsNormalized, cameraMatrix, distCoeffs, noArray(), cameraMatrix, criteria);
return cv::solvePnP(opoints, imagePointsNormalized, cameraMatrix, noArray(), rvec, tvec, useExtrinsicGuess, flags);
}
} // namespace cv
+3
View File
@@ -169,6 +169,9 @@ public:
int getRealRoots (const std::vector<double> &coeffs, std::vector<double> &real_roots) override {
if (coeffs.empty())
return 0;
for (auto c : coeffs)
if (cvIsNaN(c) || cvIsInf(c))
return 0;
Poly input(coeffs);
if (input.degree() < 1)
return 0;