Wrong iterator work when iteration through non-continious matrix (Bug #87)


Added by Ivan Astafyev about 15 years ago. Updated almost 13 years ago.


Status:Cancelled Start date:
Priority:High Due date:
Assignee:- % Done:

0%

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

Description

If I have iterator on non-continious matrix i can't use '!=' operator to check that end is reached:

cv::Mat m(100, 100, cv::DataType<uchar>);
cv::Rect r(10, 10, 10, 10);

cv::Mat roi = m(roi);

for (cv::MatIterator_<uchar> it = roi.begin<uchar>(); it != roi.end<uchar>(); ++it)
{
// do something...
}

std::cout << "This is never been printed...";

My fix in attached file.


bugfix.patch (621 Bytes) Ivan Astafyev, 2010-01-22 12:48 pm


Related issues

duplicates Bug #72: Mat_<_Tp>::end() iterator pointer yields wrong address fo... Done

Associated revisions

Revision 77258680
Added by Marina Kolpakova over 12 years ago

Merge pull request #87 from jet47:cmd-parser-fix

History

Updated by Ivan Astafyev about 15 years ago

Duplicates #72

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

Updated by anonymous - about 15 years ago

thanks! your patch is applied in r2613

Updated by Andrey Kamaev almost 13 years ago

  • Status changed from Done to Cancelled

Also available in: Atom PDF