[Program] opencv learning tips 02: How to Use opencv in C ++ Builder (BCB)

Source: Internet
Author: User

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

  1. You can use WindowsStart-->Search
    FindCoff2omf.exe,
    Using this tutorial, you can convert the VC ++ library into a library that is combined with BCB.
  2. 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
  3. Mouse clicksCoff2omf. batTwo rowsCoff2omf. batEight library libraries starting with B will be created,
    These eight libraries are BCB-compatible libraries.
     
  4. 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.
  5. 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

  6. Future InformationC: \ Program Files \ opencv \ binUnderEight DLLClick here to view your project information,
    Below is my project information,
     
  7. Now you can start to compile the opencv program ^. Remember to add
    # Include "cv. H"
    # Include "highgui. H"
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.