Inconsistent behaviour and documentation for returned checkRange position (Bug #1496)


Added by galkin-vv - over 13 years ago. Updated almost 13 years ago.


Status:Done Start date:
Priority:Low Due date:
Assignee:Marina Kolpakova % Done:

0%

Category:core
Target version:2.4.0
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

The documentation for checkRange in source:trunk/opencv/modules/core/doc/operations_on_arrays.rst says:

If some values are out of range,
position of the first outlier is stored in pos (when pos != NULL).

But the implementation in source:trunk/opencv/modules/core/src/mathfuncs.cpp uses minMaxLoc for non-floating case, so the resulted position in the case of failed check correspond to minimum/maximium position instead of documented first out-of-range.
This problem prohibits the use of checkRange for searching for "first out of range element in the sequence"


Associated revisions

Revision 32b9bc1d
Added by Marina Kolpakova almost 13 years ago

fixed bug for #1496 and correctness tests for function CheckRange

Revision e1f55c3f
Added by Alexander Smorkalov over 11 years ago

Merge pull request #1496 from shawke:patch-1

History

Updated by Alexander Shishkov almost 13 years ago

  • Target version deleted ()

Updated by Alexander Shishkov almost 13 years ago

  • Priority changed from Normal to Low

Updated by Alexander Shishkov almost 13 years ago

  • Assignee deleted (Vadim Pisarevsky)

Updated by Marina Kolpakova almost 13 years ago

  • Assignee set to Marina Kolpakova

Updated by Marina Kolpakova almost 13 years ago

Thanks for reporting!

Function had not appropriate behavior. Implementation has been modified in r7708

  • Status changed from Open to Done

Updated by Alexander Shishkov almost 13 years ago

  • Target version set to 2.4.0

Also available in: Atom PDF