Professional Documents
Culture Documents
Trong file AzCDlg.h, trong phn nh ngha Include, trc phn nh ngha lp CAzCDlg, chng ta thm cc
header files sau y:
#include "cv.h"
#include "highgui.h"
#include "DShow.h"
#include "initguid.h"
Le Khanh Thanh Computer Vision Software Group __ Le Khanh Thanh CVSG
#include "vector"
#pragma comment (lib,"strmiids.lib")
#pragma comment (lib,"quartz.lib")
using namespace std;
#define PI 3.1415926535897932384626433832795
#define SAFE_RELEASE(p){if(p){(p)->Release();(p)=NULL;}}
Trong file AzCDlg.cpp, ta thm on code sau trn phn khai trin lp CazCDlg.h nh sau:
#include "stdlib.h"
#include "string.h"
#include "cv.h"
#include "highgui.h"
#include "cvcam.h"
#include "DShow.h"
#include "initguid.h"
#include "math.h"
#if !defined iProxyTrans_h
#include "iProxyTrans.h"
#endif
Tip theo, cng trong hp thoi Project Settings, chng ta chuyn sang chn tab Link. Trn tab ny, trog
Category tr xung, chn General. Trong hp text Object/Library modules, ta nhp cc thu vin sau vo v
nhn Enter kt thc:
- cv.lib
- cxcore.lib
- highgui.lib
- cvcam.lib
- cxts.lib
- trs.lib
Hp thoi trng nh sau:
Le Khanh Thanh Computer Vision Software Group __ Le Khanh Thanh CVSG
Tip theo, t Tools->Options, hp thoi Options xut hin, chn tab Directories, gi nguyn mc nh cho
Platform, trong Show directories for tr xung, chn Include files. Tng ng vi Include files th Directories
bn di, chng ta thm cc ng dn sau(nu bn bit cc ci t cn thm nm u _ nu khng bit, bn
c th nhn chut vo tn cng ca hng tm ng gin ti ).
- C:\DXSDK\Include
- C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE
- C:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE
- C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE
- C:\PROGRAM FILES\OPENCV\CV\INCLUDE
- C:\PROGRAM FILES\OPENCV\CVAUX\INCLUDE
- C:\PROGRAM FILES\OPENCV\CXCORE\INCLUDE
- C:\PROGRAM FILES\OPENCV\FILTERS\PROXYTRANS
- C:\PROGRAM FILES\OPENCV\OTHERLIBS\CVCAM\INCLUDE
- C:\PROGRAM FILES\OPENCV\OTHERLIBS\HIGHGUI
: Ch l cc ng dn mu xanh dng l cc ng gin c trc khi ci Visual C++
Bn c th quan st tab ny nh di y:
Le Khanh Thanh Computer Vision Software Group __ Le Khanh Thanh CVSG
Cng t tab Directories xung, chn Library Files, Directories bn di, thm cc ng dn sau nh i
vi Include files.
- C:\DXSDK\Lib
- C:\Program Files\Microsoft Visual Studio\VC98\LIB
- C:\Program Files\Microsoft Visual Studio\VC98\MFC\LIB
- C:\PROGRAM FILES\OPENCV\LIB
: Cc dng mu xanh dng l cc dng c trc .