1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin
2018-07-17 19:26:50 +03:00
123 changed files with 7034 additions and 2453 deletions
+5 -1
View File
@@ -140,6 +140,7 @@ public:
double max;
minMaxLoc(gray_img, NULL, &max);
CV_Assert(max > 0);
Mat map;
log(gray_img + 1.0f, map);
@@ -429,12 +430,15 @@ public:
for(int i = 0; i < max_iterations; i++)
{
calculateProduct(p, product);
float alpha = rr / static_cast<float>(p.dot(product));
double dprod = p.dot(product);
CV_Assert(fabs(dprod) > 0);
float alpha = rr / static_cast<float>(dprod);
r -= alpha * product;
x += alpha * p;
float new_rr = static_cast<float>(r.dot(r));
CV_Assert(fabs(rr) > 0);
p = r + (new_rr / rr) * p;
rr = new_rr;