Opencv setting method running in Windows XP vc6.0

Source: Internet
Author: User

Opencv is an Intel open-source computer vision library. It consists of a series of C functions and a small number of C ++ classes, achieving many common features in image processing and computer vision.Algorithm. Opencv has a cross-platform medium and high-level API that includes more than 300 C functions. It does not depend on other external libraries, although some external libraries can also be used. Opencv is free for non-commercial and commercial applications.

To use opencv for visual development in vc6.0, you must configure opencv correctly in the VC development environment. It mainly sets the path of the pre-compiled header file and the path of the dynamic link library.

1. Under the VC compiler, select setting under the project menu. A dialog box is displayed.

1. Set the pre-compiled header file

Select C/C ++ [category], select Preprocessor from the drop-down menu, and enter the following items in additional include directories:

C:/program files/opencv/cV/include)

C:/program files/opencv/otherlibs/highgui

C:/program files/opencv/cxcore/include (required in the new version)

C:/program files/opencv/otherlibs/cvcam/include

Each entry is separated by a comma. Among them, C:/program files/Intel/opencv is the installation path of opencv, which is a common installation path. We recommend that you use this setting for your convenience. Otherwise, it is troublesome to reset the path every time.

2. Set the Link Library

Select the input option (specify the library file to be connected and discard the library file Hao) in the category drop-down menu under the link button. In the additional library path, enter:

C:/program files/opencv/lib

Finally, select Win32 debug and Win32 release from the setting for drop-down menu, and enter the following in the object/library modules:

Cv. Lib highgui. Lib cxcore. Lib cvcam. Lib

Note that each database is separated by a space.

Alternatively, enter cv. Lib highgui. Lib cxcore. Lib (required in the new version) cvcam. Lib directly in the object/library modules of all deployments.

(Cxcore. Lib highgui. Lib is almost all opencvProgramFunction libraries are used to encapsulate the basic functions and graphic interface interfaces, cv. lib encapsulates a large number of image processing functions, cvcam. lib encapsulates many video stream processing functions)

The current project can use the opencv function.

2. If you always want to use the opencv function, set the path to the system directory.

Select the options sub-menu under the Tools menu, select directory in the pop-up dialog box, and add the paths of the databases used. In the future, you only need to input the library in the object/library modules, and you do not need to specify the path each time.

In the show directories for drop-down list, select include files and enter:

C:/program files/opencv/cV/include

C:/program files/opencv/otherlibs/highgui

C:/program files/opencv/cxcore/include (required in the new version)

C:/program files/opencv/otherlibs/cvcam/include

Select library files from the show directories for drop-down menu and enter:

C:/program files/opencv/lib

Note: (avoid copying. DLL files every time)

My computer-properties-advanced-Environment Variable-path-C:/program files/opencv/bin

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.