我是使用 Qt 和 OpenCV 的新手。我正在尝试读取高清图像并显示它。它不是特定的图像,程序可以读取用户选择的任何图像。我的代码:
QString Imagename = QFileDialog::getOpenFileName(
this,
tr("Open Images"),
"C://",
tr("Tiff Files (*.tif);; Raw file (*.raw)"));
if ( Imagename.isNull())
{
QMessageBox::warning(this,"Error!","Image not valid!");
}
cv::Mat src(filename);
Mat 配置为: Mat imread(const string& filename, int flags=1 )
我该如何解决这个问题?