Merge pull request #17417 from vpisarev:fix_fitellipse
authorVadim Pisarevsky <vadim.pisarevsky@gmail.com>
Mon, 1 Jun 2020 18:01:20 +0000 (21:01 +0300)
committerGitHub <noreply@github.com>
Mon, 1 Jun 2020 18:01:20 +0000 (18:01 +0000)
commit8abb312c2076a13987a116666ecd760efbb823e2
tree941bd33ca3560c367bff270f996c8b6c69184eb0
parentadcb943f6176bce50594e1650beb5244f849d539
Merge pull request #17417 from vpisarev:fix_fitellipse

* improved fitEllipse and fitEllipseDirect accuracy in singular or close-to-singular cases (see issue #9923)

* scale points using double precision

* added normalization to fitEllipseAMS as well; fixed Java test case by raising the tolerance (it's unclear what is the correct result in this case).

* improved point perturbation a bit. make the code a little bit more clear

* trying to fix Java fitEllipseTest by slightly raising the tolerance threshold

* synchronized C++ version of Java's fitEllipse test

* removed trailing whitespaces
modules/imgproc/misc/java/test/ImgprocTest.java
modules/imgproc/src/shapedescr.cpp
modules/imgproc/test/test_fitellipse.cpp