2016年4月11日 星期一

出木杉英才的學霸之路 Week08

(1)下載OpenCV2.1 2008 exe
(2)安裝C;\OpenCV2.1 ,要勾選PATH
#include<opencv/highgui.h>
int main()
{
    IplImage * img=cvLoadImage("C:\\Users\\Public\\Pictures\\Sample Pictures\\tulips.jpg");
    cvNamedWindow("opencv");                         圖片位子                                     圖片名稱
    cvShowImage("opencv", img);
    cvWaitKey(0);
}




















點選Build options ->Search directories->設定Compiler和Linker的路徑
Compiler路徑選擇 C:\OpenCV2.1\include





















Linker路徑選擇 C:\OpenCV2.1\lib




















點選Linker Setting加入 咒語 cv210cxcore210highgui210






















重開Codeblocks 開啟圖片

沒有留言:

張貼留言