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();
}
1 | initial version |
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();
}