First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

QT & imread & utf-8

I use QT to create some gui and parse file path with QFileDialog. My code is:

QString fileName = QFileDialog::getOpenFileName();

Mat imageMat = imread( fileName.toLocal8Bit().constData() );

And this works fine but when I use non-latin characters my imageMat is empty. How to get image with unicode path?

click to hide/show revision 2
retagged

QT & imread & utf-8

I use QT to create some gui and parse file path with QFileDialog. My code is:

QString fileName = QFileDialog::getOpenFileName();

Mat imageMat = imread( fileName.toLocal8Bit().constData() );

And this works fine but when I use non-latin characters my imageMat is empty. How to get image with unicode path?

click to hide/show revision 3
retagged

QT & imread & utf-8

I use QT to create some gui and parse file path with QFileDialog. My code is:

QString fileName = QFileDialog::getOpenFileName();

Mat imageMat = imread( fileName.toLocal8Bit().constData() );

And this works fine but when I use non-latin characters my imageMat is empty. How to get image with unicode path?

click to hide/show revision 4
No.4 Revision

QT & imread & utf-8

Hi,

I use QT to create some gui and parse file path with QFileDialog. My code is:

QString fileName = QFileDialog::getOpenFileName();

Mat imageMat = imread( fileName.toLocal8Bit().constData() );

And this works fine but when I use non-latin characters my imageMat is empty. How to get image with unicode path?

Regards.

click to hide/show revision 5
No.5 Revision

QT & imread imRead() & utf-8UTF-8

Hi,Hi everyone,

I use QT to create some gui and parse file path with QFileDialog. My code is:

QString fileName = QFileDialog::getOpenFileName();

Mat imageMat = imread( fileName.toLocal8Bit().constData() );

And this works fine but when I use non-latin characters my imageMat is empty. How to get image with unicode path?

Regards.

click to hide/show revision 6
No.6 Revision

QT & imRead() & UTF-8

Hi everyone,

I use QT to create some gui and parse file path with QFileDialog. My code is:

QString fileName = QFileDialog::getOpenFileName();

Mat imageMat = imread( fileName.toLocal8Bit().constData() );

And this works fine but when I use non-latin characters my imageMat is empty. How to get image with unicode path?

Regards.

UPD: Imread isn't working with non-ascii directories/paths. http://code.opencv.org/issues/1268