1 | initial version |
same compiler / os here, 2 simple modifications made it pass:
typedef cv::Point3_<uint8_t> Pixel;
// Parallel execution with function object.
struct Operator {
void operator ()(Pixel &pixel, const int * position) const {
pixel.x = 255;
}
};
int main(int argc, char** argv) {
Mat image(1920, 1080, CV_8UC3);
image.forEach<Pixel>(Operator());
return 0;
}
2 | No.2 Revision |
same compiler / os here, 2 simple modifications made it pass:
const
: typedef cv::Point3_<uint8_t> Pixel;
// Parallel execution with function object.
struct Operator {
void operator ()(Pixel &pixel, const int * position) const {
pixel.x = 255;
}
};
int main(int argc, char** argv) {
Mat image(1920, 1080, CV_8UC3);
image.forEach<Pixel>(Operator());
return 0;
}