開始積累問題於網絡...
一、在qt上使用opencv編譯出錯:OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file /home/fighting324/app/opencv/modules/highgui/src/window.cpp, line 261 terminate called after throwing an instance of 'cv::Exception' what(): /home/fighting324/app/opencv/modules/highgui/src/window.cpp:261: error: (-215) size.width>0 && size.height>0 in function imshow
解決方案:把這一句,Mat src1 = imread( "Chry.jpg" )->添加絕對路徑 Mat src1 = imread( "/home/Chry.jpg" );路徑為加載圖片的位置
二、安裝VMware8.0失敗 the msi failed【終極解決辦法】
三、warning: Error opening file (../../modules/highgui/src/cap_ffmpeg_impl.hpp:529)
OpenCV報錯(vs2010+opencv2.4.8):
1、這種錯誤,都是視頻文件的輸入路徑出錯了,好好檢查路徑!
解決:更改輸入video文件的路徑,確定正確后即運行成功。
四、
/usr/local/include/libavutil/common.h: In function ‘int32_t av_clipl_int32_c(int64_t)’:
/usr/local/include/libavutil/common.h:170: error: ‘UINT64_C’ was not declared in this scope
這個問題可以這么解決
編輯文件 gedit /usr/local/include/libavutil/common.h
添加如下代碼可以解決。
//add by bg2bkk
#ifndef UINT64_C
#define UINT64_C(value) __CONCAT(value, ULL)
#endif
//add by bg2bkk
五、在Qt開發過程當中經常使用qDebug等一些輸出來調試程序,但是到了正式發布的時候,都會被注釋或者刪除,采用日志輸出來代替。