Mat[Const]Iterator skips the last element when iterating over a Mat with a ROI. (Bug #1128)


Added by B P almost 14 years ago. Updated almost 13 years ago.


Status:Cancelled Start date:
Priority:High Due date:
Assignee:Vadim Pisarevsky % Done:

0%

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

Description

This is a regression in 2.2.

Variable sliceEnd is calculated incorrectly when m->isContinuous() evaluates to false.

c:\Program Files (x86)\OpenCV2.2\modules\core\src\matrix.cpp:2206
sliceEnd = sliceStart + (m->cols-1)*elemSize;

The fix:
"(m->cols-1)" should be "m->cols".


main.cpp - Demonstration of faulty behaviour (430 Bytes) B P, 2011-06-08 05:01 pm


Related issues

duplicates Bug #885: end() iterator wrong with ROI matrix header Done

Associated revisions

Revision 5d8af490
Added by Roman Donchenko over 11 years ago

Merge pull request #1128 from SpecLad:ocl-tr1

History

Updated by Vadim Pisarevsky almost 14 years ago

the code works correctly with the latest trunk snapshot. related ticket is #885

  • Status changed from Open to Done
  • (deleted custom field) set to duplicate

Updated by Andrey Kamaev almost 13 years ago

  • Status changed from Done to Cancelled

Also available in: Atom PDF