Include in the opencv header file

Source: Internet
Author: User

Opencv2.1 is the first practice:

# Include "cv. H"

This paper ..... You only need to configure the environment variables...

After the new version, everyone is used to this:

# Include <opencv2/highgui. HPP>

..

It's hard to figure out .... Analysis:

The new include path is;
D: \ Program Files \ opencv \ build \ include \ opencv;D: \ Program Files \ opencv \ build \ include \ opencv2;D: \ Program
Files \ opencv \ build \ include;

Take a look at this directory:

Opencv directory:

Opencv2

Therefore, if you use the traditional method to include files,/opencv is configured in the environment directory ..

What about the new method? /Which of the following folders should be included in opencv2?

Amount... Take a look at opencv. HPP

# Ifndef _ opencv_all_hpp __
# DEFINE _ opencv_all_hpp __

# Include "opencv2/CORE/core_c.h"
# Include "opencv2/CORE. HPP"
# Include "opencv2/FLANN/miniflann. HPP"
# Include "opencv2/imgproc/imgproc_c.h"
# Include "opencv2/imgproc. HPP"
# Include "opencv2/Photo/photo. HPP"
# Include "opencv2/Video/video. HPP"
# Include "opencv2/features2d/features2d. HPP"
# Include "opencv2/objdetect. HPP"
# Include "opencv2/calib3d/calib3d. HPP"
# Include "opencv2/ml. HPP"
# Include "opencv2/highgui/highgui_c.h"
# Include "opencv2/highgui. HPP"
# Include "opencv2/contrib. HPP"

# Endif


Haha contains all the header files under/opencv2... If you do not know the specific include, you can directly

# Include <opencv2/opencv. HPP> .....

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.