Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The reason why I do not had the same output was related to the IQR code. Even when in the discussion with LBerger I stop using it still had an display in order to knows its value. The processing of the IQR require to sort the data. My mistake came from the Mat reference counting, I mean sorting the data inside the IQR function sorted then as well outside the function because I did not make a copy where it use to be necessary to do it.

By replacing in the IQR function:

sort(src, tmp_srt, SORT_ASCENDING | SORT_EVERY_ROW);

by:

Mat tmp_srt;
sort(src, tmp_srt, SORT_ASCENDING | SORT_EVERY_ROW);
src = tmp_srt;

makes everything working like it should :).