Merge pull request #25064 from vpisarev:em_5point_fix

Fix very slow compilation of five-point algorithm on some platforms (e.g. Qualcomm) #25064

Thanks to our big friend and long-term contributor for the patch!

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
pull/23334/merge
Vadim Pisarevsky 11 months ago committed by GitHub
parent 296a90ae01
commit 2d204243af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 12
      modules/calib3d/src/five-point.cpp

@ -36,6 +36,13 @@
namespace cv
{
// for some compilers it takes very long time to compile
// automatically generated code in EMEstimatorCallback::runKernel(),
// so we temporarily disable optimizations here
#if defined __hexagon__ && defined __clang__
#pragma clang optimize off
#endif
class EMEstimatorCallback CV_FINAL : public PointSetRegistrator::Callback
{
public:
@ -401,6 +408,11 @@ protected:
}
};
// restore optimizations (if any)
#if defined __hexagon__ && defined __clang__
#pragma clang optimize on
#endif
// Find essential matrix given undistorted points and two cameras.
static Mat findEssentialMat_( InputArray _points1, InputArray _points2,
InputArray cameraMatrix1, InputArray cameraMatrix2,

Loading…
Cancel
Save