Http://blog.finalevil.com/2008/03/opencv02c-builderbcbopencv.html
--------------------------------------------------
Because opencv is an open and release source code of VC ++, the types used are provided by VC ++,
If you want to use it in BCB, you must first convert the library libraries of opencv into BCB.
Follow these steps:
Go to unzip opencv under Open Computer Vision Library Project of sourceforge.net.
Hidden area under opencv
After completing the following steps, install opencv under c: \ Program Files \ opencv.
In Borland C ++ Builder 6.0 development environment
-
- You can use WindowsStart-->Search
FindCoff2omf.exe,
Using this tutorial, you can convert the VC ++ library into a library that is combined with BCB.
- Create an item on drive C, calledTT
Future InformationC: \ Program Files \ opencv \ LibThe eight libraries in the library are connected to TT.
Create a new text example (txt) and upload the following text,
Coff2omf-Lib: Ms C: \ TT \ cv. Lib c: \ TT \ BCV. Lib
Coff2omf-Lib: Ms C: \ TT \ cvaux. Lib c: \ TT \ bcvaux. Lib
Coff2omf-Lib: Ms C: \ TT \ cvcam. Lib c: \ TT \ bcvcam. Lib
Coff2omf-Lib: Ms C: \ TT \ cvhaartraining. Lib c: \ TT \ bcvhaartraining. Lib
Coff2omf-Lib: Ms C: \ TT \ cxcore. Lib c: \ TT \ bcxcore. Lib
Coff2omf-Lib: Ms C: \ TT \ cxts. Lib c: \ TT \ bcxts. Lib
Coff2omf-Lib: Ms C: \ TT \ highgui. Lib c: \ TT \ bhighgui. Lib
Coff2omf-Lib: Ms C: \ TT \ ml. Lib c: \ TT \ BML. Lib
RenameCoff2omf. bat
-
- Mouse clicksCoff2omf. batTwo rowsCoff2omf. batEight library libraries starting with B will be created,
These eight libraries are BCB-compatible libraries.
-
- Next, we will first create a case for using opencv,
After creating a sequence, click Select in the menu.Project-->Add to project
TheEight lib LibrariesJoin the case.
- Point SelectionProject-->Options
You can findDirectories/conditionalsThis Tab
InInclude pathAdd the following five channels: C: \ Program Files \ opencv \ CV \ include
C: \ Program Files \ opencv \ cxcore \ include
C: \ Program Files \ opencv \ otherlibs \ highgui
C: \ Program Files \ opencv \ cvaux \ include
C: \ Program Files \ opencv \ otherlibs \ cvcam \ include
-
- Future InformationC: \ Program Files \ opencv \ binUnderEight DLLClick here to view your project information,
Below is my project information,
-
- Now you can start to compile the opencv program ^. Remember to add
# Include "cv. H"
# Include "highgui. H"