I am new using Qt and OpenCV. I am trying to read an image in my HD and show it. It is not a specific image, the program could read any image that user select. My code:
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 configuration is: Mat imread(const string& filename, int flags=1 )
How can I solve this?