您可以使用
rows和
cols:
cout << "Width : " << src.cols << endl;cout << "Height: " << src.rows << endl;
或
size():
cout << "Width : " << src.size().width << endl;cout << "Height: " << src.size().height << endl;

您可以使用
rows和
cols:
cout << "Width : " << src.cols << endl;cout << "Height: " << src.rows << endl;
或
size():
cout << "Width : " << src.size().width << endl;cout << "Height: " << src.size().height << endl;