Hi Steve,
I have this printed in the console:
OpenCV(4.7.0-dev) Error: Assertion failed ((unsigned)i1 < (unsigned)size.p[1]) in cv::Mat::ptr, file C:\opencv-4.x\Build-4.x\install\include\opencv2\core\mat.inl.hpp, line 752
Which makes me think that I simply try to fetch a pointer to an element that does not exist in the image Mat.
I got this as exception message in IDE:
Unhandled exception at 0x00007FF8C697FDEC in ImageFileFiltering.exe: Microsoft C++ exception: cv::Exception at memory location 0x0000006A7CAFE7A0.
And the PC points to line 1294 of C:\opencv-4.x\opencv-4.x\modules\core\src\system.cpp
which is the error processing function that printed the above message to console I think.