三步搞定 opencv 初始环境设定
生活随笔
收集整理的這篇文章主要介紹了
三步搞定 opencv 初始环境设定
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
一、設定bin的初始位置:比如我的電腦 D:\安裝程序\opencv\build\x86\vc10\bin? ? ??H:\生產力工具\opencv\build\x86\vc10\bin
D:\安裝程序\opencv\build\include? ? ? ? ? ? ? ?H:\生產力工具\opencv\build\include? H:\生產力工具\opencv\build\include\opencv H:\生產力工具\opencv\build\include\opencv2
D:\安裝程序\opencv\build\x86\vc10\lib? ? ? H:\生產力工具\opencv\build\x86\vc10\lib 二、導入*.lib opencv_calib3d248d.lib ? ? ? ? ? ? ? ? ? ? ? ? ? ??
opencv_contrib248d.lib
opencv_core248d.lib
opencv_features2d248d.lib
opencv_flann248d.lib
opencv_gpu248d.lib
opencv_highgui248d.lib
opencv_imgproc248d.lib
opencv_legacy248d.lib
opencv_ml248d.lib
opencv_nonfree248d.lib
opencv_objdetect248d.lib
opencv_photo248d.lib
opencv_stitching248d.lib
opencv_superres248d.lib
opencv_ts248d.lib
opencv_video248d.lib
opencv_videostab248d.lib opencv_calib3d2410d.lib
opencv_contrib2410d.lib
opencv_core2410d.lib
opencv_features2d2410d.lib
opencv_flann2410d.lib
opencv_gpu2410d.lib
opencv_highgui2410d.lib
opencv_imgproc2410d.lib
opencv_legacy2410d.lib
opencv_ml2410d.lib
opencv_nonfree2410d.lib
opencv_objdetect2410d.lib
opencv_photo2410d.lib
opencv_stitching2410d.lib
opencv_superres2410d.lib
opencv_ts2410d.lib
opencv_video2410d.lib
opencv_videostab2410d.lib ? 三、引入正確的頭 #include?"stdafx.h" #include?<cv.h> #include?<cxcore.h> #include?<highgui.h> #include?<stdio.h> #include?<io.h> #include?<iostream> #include?<stdio.h> #include?"opencv2/contrib/contrib.hpp" #include?"opencv2/highgui/highgui.hpp" #include?"opencv2/imgproc/imgproc.hpp"?????????????????????????????????????????????????????????????????????? #include?<math.h> #include?<string> #include?<time.h> using?namespace?cv; using?namespace?std; #define?DllExport?extern?"C"__declspec?(dllexport) DllExport?int?imageprocesstest(?char?*cur_dir,char?*imagepath_res) { } ? ? 四、導出dll文件采用這種模式 using?System.Runtime.InteropServices; ?[DllImport(?"GOImage.dll", ??????? EntryPoint =?"imageprocesstest", ??????? CharSet =?CharSet.Ansi, CallingConvention =?CallingConvention?.Cdecl)] ????????public?static?extern?int?imageprocesstest(string?ImagePath,?string?ImagePath_Res); ? ?
D:\安裝程序\opencv\build\include? ? ? ? ? ? ? ?H:\生產力工具\opencv\build\include? H:\生產力工具\opencv\build\include\opencv H:\生產力工具\opencv\build\include\opencv2
D:\安裝程序\opencv\build\x86\vc10\lib? ? ? H:\生產力工具\opencv\build\x86\vc10\lib 二、導入*.lib opencv_calib3d248d.lib ? ? ? ? ? ? ? ? ? ? ? ? ? ??
opencv_contrib248d.lib
opencv_core248d.lib
opencv_features2d248d.lib
opencv_flann248d.lib
opencv_gpu248d.lib
opencv_highgui248d.lib
opencv_imgproc248d.lib
opencv_legacy248d.lib
opencv_ml248d.lib
opencv_nonfree248d.lib
opencv_objdetect248d.lib
opencv_photo248d.lib
opencv_stitching248d.lib
opencv_superres248d.lib
opencv_ts248d.lib
opencv_video248d.lib
opencv_videostab248d.lib opencv_calib3d2410d.lib
opencv_contrib2410d.lib
opencv_core2410d.lib
opencv_features2d2410d.lib
opencv_flann2410d.lib
opencv_gpu2410d.lib
opencv_highgui2410d.lib
opencv_imgproc2410d.lib
opencv_legacy2410d.lib
opencv_ml2410d.lib
opencv_nonfree2410d.lib
opencv_objdetect2410d.lib
opencv_photo2410d.lib
opencv_stitching2410d.lib
opencv_superres2410d.lib
opencv_ts2410d.lib
opencv_video2410d.lib
opencv_videostab2410d.lib ? 三、引入正確的頭 #include?"stdafx.h" #include?<cv.h> #include?<cxcore.h> #include?<highgui.h> #include?<stdio.h> #include?<io.h> #include?<iostream> #include?<stdio.h> #include?"opencv2/contrib/contrib.hpp" #include?"opencv2/highgui/highgui.hpp" #include?"opencv2/imgproc/imgproc.hpp"?????????????????????????????????????????????????????????????????????? #include?<math.h> #include?<string> #include?<time.h> using?namespace?cv; using?namespace?std; #define?DllExport?extern?"C"__declspec?(dllexport) DllExport?int?imageprocesstest(?char?*cur_dir,char?*imagepath_res) { } ? ? 四、導出dll文件采用這種模式 using?System.Runtime.InteropServices; ?[DllImport(?"GOImage.dll", ??????? EntryPoint =?"imageprocesstest", ??????? CharSet =?CharSet.Ansi, CallingConvention =?CallingConvention?.Cdecl)] ????????public?static?extern?int?imageprocesstest(string?ImagePath,?string?ImagePath_Res); ? ?
轉載于:https://www.cnblogs.com/jsxyhelu/p/4129038.html
總結
以上是生活随笔為你收集整理的三步搞定 opencv 初始环境设定的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 初学后缀数组
- 下一篇: 萝卜缨做汤还用焯吗?