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

This commit is contained in:
Fangjun KUANG 2017-02-18 10:14:29 +01:00 committed by GitHub
parent 47ae5f14f5
commit e827a5bd9e

View File

@ -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;