91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

OpenCV2.4.9版本編譯

發布時間:2020-03-04 22:50:42 來源:網絡 閱讀:748 作者:fengyuzaitu 欄目:軟件技術

1)linux查看opencv安裝路徑及版本號
查看linux下的opencv安裝庫:
pkg-config opencv --libs
查看linux下的opencv安裝版本:
pkg-config opencv --modversion
查看linux下的opencv安裝路徑:
find / -iname "*opencv*"



2)編譯指令

創建庫目錄: ?? mkdir install

創建生成目錄 : ? mkdir build

進入目錄: cd build

執行生成Makefile:


cmake -D WITH_CUDA=OFF \
??????????? -D CMAKE_BUILD_TYPE=Release \
??????????? -D CMAKE_INSTALL_PREFIX=cmake -D WITH_CUDA=OFF \
??????????? -D CMAKE_BUILD_TYPE=Release \
??????????? -D CMAKE_INSTALL_PREFIX=/home/packages/opencv/install \
??????????? -D WITH_IPP=OFF \
??????????? -D WITH_FFMPEG=ON? \
??????????? -D BUILD_TESTS=OFF \
??????????? -D BUILD_PERF_TESTS=OFF \
??????????? -D INSTALL_PYTHON_EXAMPLES=OFF \
??????????? -D INSTALL_C_EXAMPLES=OFF \
??????????? -D PYTHON_EXECUTABLE=$(which python) \
??????????? -D BUILD_EXAMPLES=OFF .. \
??????????? -D WITH_IPP=OFF \
??????????? -D WITH_FFMPEG=ON? \
??????????? -D BUILD_TESTS=OFF \
??????????? -D BUILD_PERF_TESTS=OFF \
??????????? -D INSTALL_PYTHON_EXAMPLES=OFF \
??????????? -D INSTALL_C_EXAMPLES=OFF \
??????????? -D PYTHON_EXECUTABLE=$(which python) \
??????????? -D BUILD_EXAMPLES=OFF ..


生成安裝:make && make install


編譯異常

1)[ 98%] Linking CXX executable ../../bin/opencv_performance
../../lib/libopencv_highgui.so.2.4.9: undefined reference to `avcodec_alloc_frame'
../../lib/libopencv_highgui.so.2.4.9: undefined reference to `avcodec_encode_video'
collect2: error: ld returned 1 exit status
apps/haartraining/CMakeFiles/opencv_performance.dir/build.make:105: recipe for target 'bin/opencv_performance' failed
make[2]: *** [bin/opencv_performance] Error 1
CMakeFiles/Makefile2:3388: recipe for target 'apps/haartraining/CMakeFiles/opencv_performance.dir/all' failed
make[1]: *** [apps/haartraining/CMakeFiles/opencv_performance.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

問題:undefined reference to `avcodec_alloc_frame'

通過grep -r?"avcodec_alloc_frame"? / 查詢全局文本返回空

最新版本的FFmpeg該函數的實現名稱已經改變,下載ffmpeg-2.3.tar.bz2源碼編譯

2)已經編譯ffmpeg-2.3.tar.bz2,生成libswresample.so.0無法找到,將libswresample.so.0拷貝到/lib64目錄下

/usr/bin/ld: warning: libswresample.so.0, needed by //home/dong/ffmpeg/ffmpeg-2.3/build/lib/libavcodec.so.55, not found (try using -rpath or -rpath-link)
//home/dong/ffmpeg/ffmpeg-2.3/build/lib/libavcodec.so.55: undefined reference to `swr_init@LIBSWRESAMPLE_0'
//home/dong/ffmpeg/ffmpeg-2.3/build/lib/libavcodec.so.55: undefined reference to `swr_close@LIBSWRESAMPLE_0'
//home/dong/ffmpeg/ffmpeg-2.3/build/lib/libavcodec.so.55: undefined reference to `swr_is_initialized@LIBSWRESAMPLE_0'
//home/dong/ffmpeg/ffmpeg-2.3/build/lib/libavcodec.so.55: undefined reference to `swr_free@LIBSWRESAMPLE_0'
//home/dong/ffmpeg/ffmpeg-2.3/build/lib/libavcodec.so.55: undefined reference to `swr_alloc@LIBSWRESAMPLE_0'
//home/dong/ffmpeg/ffmpeg-2.3/build/lib/libavcodec.so.55: undefined reference to `swr_convert@LIBSWRESAMPLE_0'
collect2: error: ld returned 1 exit status
apps/haartraining/CMakeFiles/opencv_performance.dir/build.make:105: recipe for target 'bin/opencv_performance' failed
make[2]: *** [bin/opencv_performance] Error 1
CMakeFiles/Makefile2:3388: recipe for target 'apps/haartraining/CMakeFiles/opencv_performance.dir/all' failed
make[1]: *** [apps/haartraining/CMakeFiles/opencv_performance.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error

3)export PKG_CONFIG_PATH=/home/dong/opencv-2.4.9/install/lib/pkgconfig/;$PKG_CONFIG_PATH

指定OpenCV優先查找編譯好的FFmpeg,而不是系統的FFmpeg庫

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

车致| 乐亭县| 子洲县| 青神县| 西乡县| 盖州市| 高平市| 尉犁县| 图木舒克市| 柳河县| 天峻县| 吴江市| 华亭县| 安吉县| 秭归县| 丹凤县| 托克托县| 罗城| 佳木斯市| 文山县| 阿图什市| 图片| 疏勒县| 唐山市| 赞皇县| 库车县| 三江| 高台县| 南靖县| 永丰县| 南丰县| 高邑县| 若羌县| 溆浦县| 怀宁县| 贵德县| 黔江区| 伊春市| 宜州市| 洮南市| 东城区|