Commit a6d64e25 authored by Roman Donchenko's avatar Roman Donchenko Committed by OpenCV Buildbot

Merge pull request #2354 from gleb-sternharz:Branch_2.4.8

parents a0bb74a0 f85aa929
...@@ -706,7 +706,7 @@ struct KL_Divergence ...@@ -706,7 +706,7 @@ struct KL_Divergence
Iterator1 last = a + size; Iterator1 last = a + size;
while (a < last) { while (a < last) {
if (* a != 0) { if (* b != 0) {
ResultType ratio = (ResultType)(*a / *b); ResultType ratio = (ResultType)(*a / *b);
if (ratio>0) { if (ratio>0) {
result += *a * log(ratio); result += *a * log(ratio);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment