Mat[Const]Iterator skips the last element when iterating over a Mat with a ROI. (Bug #1128)
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".
Related issues
duplicates Bug #885: end() iterator wrong with ROI matrix header | Done |
Associated revisions
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