Devision by 0 in KL Divergence (Bugfix #3556)


Added by Gleb Sternharz about 11 years ago. Updated about 11 years ago.


Status:Done Start date:2014-02-17
Priority:Normal Due date:
Assignee:Gleb Sternharz % Done:

100%

Category:flann
Target version:-
Affected version:2.4.8 (latest release) Operating System:Windows
Difficulty:Easy HW Platform:x64
Pull request:https://github.com/Itseez/opencv/pull/2354

Description

In File
\modules\flann\include\opencv2\flann\dist.h, line 744

            if (* b != 0) {  // Line 744 is currently "if (* a != 0) {" 
                ResultType ratio = (ResultType)(*a / *b);
                if (ratio>0) {
                    result += *a * log(ratio);
                }
            }

Associated revisions

Revision 2b30759a
Added by Vadim Pisarevsky about 10 years ago

Merge pull request #3556 from rokm:semicolon-warnings

History

Updated by Kirill Kornyakov about 11 years ago

Gleb, could you please work on a pull request?

http://code.opencv.org/projects/opencv/wiki/How_to_contribute

  • Assignee set to Gleb Sternharz
  • Category set to flann

Updated by Kirill Kornyakov about 11 years ago

  • Status changed from New to Open
  • Difficulty set to Easy

Updated by Kirill Kornyakov about 11 years ago

  • Status changed from Open to Done

Also available in: Atom PDF