Home > other >  When using Qt configuration Basler cameras and Opencv library can't compatible problems
When using Qt configuration Basler cameras and Opencv library can't compatible problems

Time:10-07

in the use of Qt configured basler Gige camera and opencv library, the problems cannot be configured at the same time!!!!!

problems as follows, in the pro file:
About the basler camera, the use of manual configuration, add the following code:

INCLUDEPATH +=\
$$(PYLON_DEV_DIR)/include \
$$(PYLON_DEV_DIR)/include/pylon


LIBS +=\
- L $$(PYLON_DEV_DIR)/lib/x64


about opencv, use the "add library" automatic configuration, the code is as follows:
INCLUDEPATH +=D: \ Opencv, Opencv, Opencv, build \ include \
D: \ Opencv, Opencv, Opencv, build, include, Opencv,
D: \ Opencv, Opencv, Opencv, build \ include \ opencv2

Win32: CONFIG (release, the debug | release) : LIBS +=- LD:/Opencv/Opencv/Opencv/build/x64/vc15/lib/- lopencv_world349
The else: win32: CONFIG (debug, the debug | release) : LIBS +=- LD:/Opencv/Opencv/Opencv/build/x64/vc15/lib/- lopencv_world349d
The else: Unix: LIBS +=- LD:/Opencv/Opencv/Opencv/build/x64/vc15/lib/- lopencv_world349

INCLUDEPATH +=D:/Opencv/Opencv/Opencv/build/x64/vc15
DEPENDPATH +=D:/Opencv/Opencv/Opencv/build/x64/vc15


configuration in the pro file after the above code, in the main. CPP after adding the following code, compile the project
# include & lt; Opencv2/core/core. Hpp>
# include & lt; Opencv2 highgui/highgui. Hpp>
# include & lt; Opencv2/video/video. Hpp>
# include & lt; Pylon/PylonIncludes. H>
# include & lt; Pylon/gige BaslerGigECamera. H>

The following problems:
E: \ sealDetection \ CamBasler \ untitled \ main CPP: 6: : error C1083: cannot open include file: "pylon/PylonIncludes. H" : No to the file or directory
The reasons for this problem is probably not find basler library files,

so I built a test project, used to test the basler camera configuration path is correct, when I use the same configuration code basler camera ,
INCLUDEPATH +=\
$$(PYLON_DEV_DIR)/include \
$$(PYLON_DEV_DIR)/include/pylon
LIBS +=\
- L $$(PYLON_DEV_DIR)/lib/x64

configuration success!

then I built a test project, used to test the opencv library configuration path is correct,
INCLUDEPATH +=D: \ Opencv, Opencv, Opencv, build \ include \
D: \ Opencv, Opencv, Opencv, build, include, Opencv,
D: \ Opencv, Opencv, Opencv, build \ include \ opencv2

Win32: CONFIG (release, the debug | release) : LIBS +=- LD:/Opencv/Opencv/Opencv/build/x64/vc15/lib/- lopencv_world349
The else: win32: CONFIG (debug, the debug | release) : LIBS +=- LD:/Opencv/Opencv/Opencv/build/x64/vc15/lib/- lopencv_world349d
The else: Unix: LIBS +=- LD:/Opencv/Opencv/Opencv/build/x64/vc15/lib/- lopencv_world349

INCLUDEPATH +=D:/Opencv/Opencv/Opencv/build/x64/vc15
DEPENDPATH +=D:/Opencv/Opencv/Opencv/build/x64/vc15

configuration also success!

but when I see them at the same time configuration in a pro file, but only successful one configuration,
When I create a new project, put the basler camera configuration code in front of opencv, appear

E: \ sealDetection \ CamBasler \ untitled \ main CPP: 9: error: 'opencv2/core/core. HPP' file not found
I found that the two could not configured at the same time, whose configuration code before who can configure success,
This I worry I did not find a solution for several days!!

Can something help me? !!!!!
  • Related