[問題] 讀檔 字串 opencv
開發平台(Platform): (Ex: Win10, Linux, ...)
win7
編譯器(Ex: GCC, clang, VC++...)+目標環境(跟開發平台不同的話需列出)
c++
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
opencv
問題(Question):
imread要如何讀取變動的字串
預期的正確結果(Expected Output):
先讀a1.jpg 再讀a2.jpg
錯誤結果(Wrong Output):
讀到filename.str()
程式碼(Code):(請善用置底文網頁, 記得排版)
for (int num = 1; num <= 2 ; num++){
stringstream filename;
filename << "a" << num << ".jpg";
Mat img = imread("./filename.str()");
}
補充說明(Supplement):
""讀到filename.str()應該很正常
但請問要怎麼讀到filename.str()裡面的內容
謝謝大家
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 36.236.55.197
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1476417788.A.A11.html
推
10/14 12:12, , 1F
10/14 12:12, 1F
→
10/14 13:32, , 2F
10/14 13:32, 2F
→
10/14 13:32, , 3F
10/14 13:32, 3F
→
10/14 15:36, , 4F
10/14 15:36, 4F
推
10/19 15:38, , 5F
10/19 15:38, 5F