《OPENCV3和QT5计算机视觉应用开发》学习笔记第一章.

1、下载地址qt-opensource-windows-x86-5.9.1.exe   https://download.qt.io/official_releases/qt/5.9/5.9.1/qt-opensource-windows-x86-5.9.1.exe
           opencv-3.3.0.zip                      https://github.com/opencv/opencv/archive/3.3.0.zip
           cmake-3.1.1-win32-x86.exe             https://cmake.org/files/v3.1/cmake-3.1.1-win32-x86.exe
           dbg_amd64.msi   win7                  http://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKDebuggingTools_amd64/dbg_amd64.msi
           dbg_x86.msi     win7                  http://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKDebuggingTools/dbg_x86.msi
           VS2015 社区版(Community)迅雷下载(较快):ed2k://|file|cn_visual_studio_community_2015_x86_dvd_6847368.iso|4013920256|EB7F6605EDE67509E218E29173AC6574|/

2、安装关键点 VS2015选择自定义安装 然后一定要选择C++语言
              除VS和调试工具以外其它软件尽可能安装到其它盘符
              cmake 配置时一定要选中BUILD_opencv_world
                    配置过程中下载 ffmpeg ippicv 下载可能失败 在下面的反馈信息框里面有显示 如果下载不下来 可以手动通过查看                          D:\opencv-3.3.0\3rdparty\ffmpeg\ffmpeg.cmake
                D:\opencv-3.3.0\3rdparty\ippicv\ippicv.cmake
              例如:ippicv.cmake内容如下


function(download_ippicv root_var)
  set(${root_var} "" PARENT_SCOPE)

  # Commit SHA in the opencv_3rdparty repo
  set(IPPICV_COMMIT "a62e20676a60ee0ad6581e217fe7e4bada3b95db")
  # Define actual ICV versions
  if(APPLE)
    set(OPENCV_ICV_PLATFORM "macosx")
    set(OPENCV_ICV_PACKAGE_SUBDIR "ippicv_mac")
    if(X86_64)
      set(OPENCV_ICV_NAME "ippicv_2017u2_mac_intel64_20170418.tgz")
      set(OPENCV_ICV_HASH "0c25953c99dbb499ff502485a9356d8d")
    else()
      set(OPENCV_ICV_NAME "ippicv_2017u2_mac_ia32_20170418.tgz")
      set(OPENCV_ICV_HASH "5f225948f3f64067c681293c098d50d8")
    endif()
  elseif((UNIX AND NOT ANDROID) OR (UNIX AND ANDROID_ABI MATCHES "x86"))
    set(OPENCV_ICV_PLATFORM "linux")
    set(OPENCV_ICV_PACKAGE_SUBDIR "ippicv_lnx")
    if(X86_64)
      set(OPENCV_ICV_NAME "ippicv_2017u2_lnx_intel64_20170418.tgz")
      set(OPENCV_ICV_HASH "87cbdeb627415d8e4bc811156289fa3a")
    else()
      set(OPENCV_ICV_NAME "ippicv_2017u2_lnx_ia32_20170418.tgz")
      set(OPENCV_ICV_HASH "f2cece00d802d4dea86df52ed095257e")
    endif()
  elseif(WIN32 AND NOT ARM)
    set(OPENCV_ICV_PLATFORM "windows")
    set(OPENCV_ICV_PACKAGE_SUBDIR "ippicv_win")
    if(X86_64)
      set(OPENCV_ICV_NAME "ippicv_2017u2_win_intel64_20170418.zip")
      set(OPENCV_ICV_HASH "75060a0c662c0800f48995b7e9b085f6")
    else()
      set(OPENCV_ICV_NAME "ippicv_2017u2_win_ia32_20170418.zip")
      set(OPENCV_ICV_HASH "60fcf3ccd9a2ebc9e432ffb5cb91638b")
    endif()
  else()
    return()
  endif()

  set(THE_ROOT "${OpenCV_BINARY_DIR}/3rdparty/ippicv")
  ocv_download(FILENAME ${OPENCV_ICV_NAME}
               HASH ${OPENCV_ICV_HASH}
               URL
                 "${OPENCV_IPPICV_URL}"
                 "$ENV{OPENCV_IPPICV_URL}"
                 "https://raw.githubusercontent.com/opencv/opencv_3rdparty/${IPPICV_COMMIT}/ippicv/"
               DESTINATION_DIR "${THE_ROOT}"
               ID IPPICV
               STATUS res
               UNPACK RELATIVE_URL)

  if(res)
    set(${root_var} "${THE_ROOT}/${OPENCV_ICV_PACKAGE_SUBDIR}" PARENT_SCOPE)
  endif()
endfunction()


        从cmake界面错误中反馈知道下载失败文件为 ippicv_2017u2_win_ia32_20170418.zip
        从中提取三个关键数据  a62e20676a60ee0ad6581e217fe7e4bada3b95db  
                      https://raw.githubusercontent.com/opencv/opencv_3rdparty/${IPPICV_COMMIT}/ippicv/
                      ippicv_2017u2_win_ia32_20170418.zip之后的效验码 60fcf3ccd9a2ebc9e432ffb5cb91638b

        把这些数据合成为下载地址   https://raw.githubusercontent.com/opencv/opencv_3rdparty/a62e20676a60ee0ad6581e217fe7e4bada3b95db/ippicv/ippicv_2017u2_win_ia32_20170418.zip
                        下载完成以后将修改文件名ippicv_2017u2_win_ia32_20170418.zip前缀添加效验码得到文件 60fcf3ccd9a2ebc9e432ffb5cb91638b-ippicv_2017u2_win_ia32_20170418.zip
                        把文件60fcf3ccd9a2ebc9e432ffb5cb91638b-ippicv_2017u2_win_ia32_20170418.zip放入D:\opencv-3.3.0\.cache\ippicv
              ffmpeg类似处理
              cmake重新Configure直到选择界面和反馈界面都没有红色条目
             vs编译时会产生如下错误
             D:\opencv-3.3.0\3rdparty\openexr\IlmImf\ImfPizCompressor.cpp : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
             D:\opencv-3.3.0\3rdparty\openexr\IlmImf\ImfRleCompressor.cpp : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
             D:\opencv-3.3.0\3rdparty\openexr\IlmImf\ImfZipCompressor.cpp : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
             到文件以后用文本编辑器打开另存为选择Unicode保存
             另外optical_flow.cpp会卡住很长时间 只需要等不要停止
             opencv.pri文件里面LIBS += -lc:/*****/opencf_world330d之后没有扩展名  所有操作系统此文件斜杠必须为/
             win7需要自己安装调试工具


 

你可能感兴趣的:(《OPENCV3和QT5计算机视觉应用开发》学习笔记第一章.)