Ask Your Question

Revision history [back]

Why Scalar does not work?

Following code results in build success, but no window. Without "m = Scalar(0);", it creates black window. Why including Scalar does not work?

int main() {

Mat m = Mat::zeros(200,200,CV_8UC1);
m = Scalar(0);

imshow("m", m);
waitKey();

}