Ask Your Question
0

Compiling opencv with qt support (linux)

asked 2018-02-06 16:57:49 -0600

2ros0 gravatar image

I followed the instructions page to download opencv3 source and installed with default settings. I assumed this would by default compile with qt support. But this doesn't seem to be the case as seen by the following error: OpenCV Error: The function/feature is not implemented (The library is compiled without QT support) in createButton

This question suggests the WITH_QT flag but I'm not sure where to set that. Moreover, when I run cv::getBuildInformation() as suggested in that question, this is some of the output I get. A couple of things I have noticed is:

QT 5.x:                      YES (ver 5.5.1)
QT OpenGL support:           NO
OpenGL support:              NO
VTK support:                 YES (ver 6.2.0)

Install path: /opt/ros/kinetic

but this is not the install path that I provided when I installed it. I can see it being installed in /usr/local, yet this is the output I get. I did have ROS installed separately, that also does come with opencv libraries so I'm not sure where the conflict is

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2018-02-07 05:06:38 -0600

kbarni gravatar image

To set the WITH_QT flag, run cmake with -DWITH_QT parameter. It's even easier to use cmake-gui, where you can check every parameter before generating the makefile.

I don't know ROS; maybe the installer comes with its own OpenCV libraries or it pulls the standard Linux libraries (this might be important if it uses OpenCV 2.x).

If you build OpenCV yourself, it will be installed by default to /usr/local/lib.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-02-06 16:57:49 -0600

Seen: 7,737 times

Last updated: Feb 07 '18