diff --git a/modules/imgproc/test/test_imgwarp_strict.cpp b/modules/imgproc/test/test_imgwarp_strict.cpp index 59b851c45..064ba9356 100644 --- a/modules/imgproc/test/test_imgwarp_strict.cpp +++ b/modules/imgproc/test/test_imgwarp_strict.cpp @@ -679,8 +679,8 @@ void CV_Remap_Test::generate_test_data() MatIterator_ begin_x = mapx.begin(), end_x = mapx.end(); for ( ; begin_x != end_x; ++begin_x) { - begin_x[0] = static_cast(rng.uniform(static_cast(_n), std::max(src.cols + n - 1, 0))); - begin_x[1] = static_cast(rng.uniform(static_cast(_n), std::max(src.rows + n - 1, 0))); + (*begin_x)[0] = static_cast(rng.uniform(static_cast(_n), std::max(src.cols + n - 1, 0))); + (*begin_x)[1] = static_cast(rng.uniform(static_cast(_n), std::max(src.rows + n - 1, 0))); } if (interpolation != INTER_NEAREST)