mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 05:29:54 +08:00
Fix an error in the demo code for cv::Mat::forEach
This commit is contained in:
parent
47ae5f14f5
commit
e827a5bd9e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user