Opencv
functions like cv::imread()
take as arguments only strings
. So, if I write:
cv::Mat image = cv::imread("C:\\folder\\image.jpg");
everything is fine and it will load the image. But, if the path contains wide characters (for example greek letters):
wstring path = L"C:\\folder\\εικονα.jpg";
I can't just write:
cv::Mat image = cv::imread( path );
I already tried (and obviously failed) this:
cv::Mat image = cv::imread( string(path.begin(), path.end()) );
Is there any solution? Or I'll just have to leave opencv
and use something else?