Skip to content

Commit e827a5b

Browse files
authored
Fix an error in the demo code for cv::Mat::forEach
1 parent 47ae5f1 commit e827a5b

File tree

1 file changed

+1
-1
lines changed
  • modules/core/include/opencv2/core

1 file changed

+1
-1
lines changed

modules/core/include/opencv2/core/mat.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1893,7 +1893,7 @@ class CV_EXPORTS Mat
18931893
18941894
// first. raw pointer access.
18951895
for (int r = 0; r < image.rows; ++r) {
1896-
Pixel* ptr = image.ptr<Pixel>(0, r);
1896+
Pixel* ptr = image.ptr<Pixel>(r, 0);
18971897
const Pixel* ptr_end = ptr + image.cols;
18981898
for (; ptr != ptr_end; ++ptr) {
18991899
ptr->x = 255;

0 commit comments

Comments
 (0)