Commit e827a5bd authored by Fangjun KUANG's avatar Fangjun KUANG Committed by GitHub

Fix an error in the demo code for cv::Mat::forEach

parent 47ae5f14
......@@ -1893,7 +1893,7 @@ public:
// first. raw pointer access.
for (int r = 0; r < image.rows; ++r) {
Pixel* ptr = image.ptr<Pixel>(0, r);
Pixel* ptr = image.ptr<Pixel>(r, 0);
const Pixel* ptr_end = ptr + image.cols;
for (; ptr != ptr_end; ++ptr) {
ptr->x = 255;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment