Implementation and documentation of matchShapes mismatch (Bug #1801)


Added by Roland Richter almost 13 years ago. Updated almost 13 years ago.


Status:Done Start date:2012-04-15
Priority:Normal Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:imgproc, video
Target version:2.4.0
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

The documentation of matchShapes claims that, with all three methods, a sum over the seven moments is computed.

However, in case of method = CV_CONTOURS_MATCH_I3, matchShapes does this (matchcontours.cpp, lines 183ff):

mmm = fabs( (ama - amb) / ama );
if( result < mmm )
    result = mmm;

That is, a maximum rather than a sum is computed.

While I do not know which variant is correct, implementation and documentation of matchShapes should certainly match. (Pun intended).


Associated revisions

Revision 47ee844d
Added by Vadim Pisarevsky almost 13 years ago

fixed formula in matchShapes, method=CV_CONTOUR_MATCH_I3 (ticket #1801)

Revision bb0d88cf
Added by Roman Donchenko over 11 years ago

Merge pull request #1801 from vrabaud:master

Revision ef27ac37
Added by Roman Donchenko over 11 years ago

In the example in OpenCVConfig.cmake.in, explicitly add the include paths.

After #1801, the include directories are no longer added automatically,
so we should show the user how to do that.

History

Updated by Vadim Pisarevsky almost 13 years ago

thanks! fixed in r8184; PDFs and online version will be updated in a few days

  • Status changed from Open to Done
  • Target version set to 2.4.0
  • Assignee set to Vadim Pisarevsky

Also available in: Atom PDF