Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. openCV & Qt
Forum Updated to NodeBB v4.3 + New Features

openCV & Qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 6 Posters 472 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TizUbuntu
    wrote on last edited by
    #1

    Good morning and excuse me for this question.
    I would like to use openCV in Qt.
    I have tried several solutions but I cannot use these libraries in my project.
    I state that the current situation is as follows:

    • Windows 10 64bit
    • Qt creator 4.11.0
    • openCV libraries ver. 3.49 installed from a precompiled package distributed by the official openCV website.

    How can I correctly configure openCV to be able to use it?

    I thank all those who will help me in advance.

    Pl45m4P Pablo J. RoginaP 2 Replies Last reply
    0
    • T TizUbuntu

      Good morning and excuse me for this question.
      I would like to use openCV in Qt.
      I have tried several solutions but I cannot use these libraries in my project.
      I state that the current situation is as follows:

      • Windows 10 64bit
      • Qt creator 4.11.0
      • openCV libraries ver. 3.49 installed from a precompiled package distributed by the official openCV website.

      How can I correctly configure openCV to be able to use it?

      I thank all those who will help me in advance.

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @TizUbuntu

      What do you have so far? Any errors? Is OCV installed properly?

      If this is the case, you need to set your lib-paths in your .pro file

      INCLUDEPATH += OCV-PATH-HERE
      
      LIBS += OCV-LIBS HERE (Path to .dll's)
      

      Then you need to include the OCV files in your headers or code files

      e.g.:

      #include <opencv2/core/core.hpp>
      #include <opencv2/highgui/highgui.hpp>
      

      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      0
      • T TizUbuntu

        Good morning and excuse me for this question.
        I would like to use openCV in Qt.
        I have tried several solutions but I cannot use these libraries in my project.
        I state that the current situation is as follows:

        • Windows 10 64bit
        • Qt creator 4.11.0
        • openCV libraries ver. 3.49 installed from a precompiled package distributed by the official openCV website.

        How can I correctly configure openCV to be able to use it?

        I thank all those who will help me in advance.

        Pablo J. RoginaP Offline
        Pablo J. RoginaP Offline
        Pablo J. Rogina
        wrote on last edited by
        #3

        @TizUbuntu have you check this article?

        BTW, is there a compelling need to use OpenCV 3.x?
        Release 4.20 is available as of now

        Upvote the answer(s) that helped you solve the issue
        Use "Topic Tools" button to mark your post as Solved
        Add screenshots via postimage.org
        Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        2
        • A Offline
          A Offline
          abdrrhm
          wrote on last edited by
          #4

          Hello guys. I'm having trouble adding OPENCV to qt cretor. I added OpenCV by specifying its paths from the AddLibrary tab, but when I want to use it in my project, I get the following errors:

          • error: cannot find -lopencv_world4100
          • error: collect2.exe: error: ld returned 1 exit status
          • error: [Makefile.Debug:72: debug/YOLO.exe] Error 1

          I copied the dll file directly to the project file. I will be grateful if you could help me.

          jsulmJ 1 Reply Last reply
          0
          • BondrusiekB Offline
            BondrusiekB Offline
            Bondrusiek
            wrote on last edited by
            #5

            @abdrrhm Hi!,
            I think it would be a good idea to consider compiling OpenCV from sources, then the library will match the compiler.

            I recommend seeing this example on GitHub(https://github.com/FelgoSDK/Qt-Felgo-OpenCV). You can also warp CMakeLists.txt and you will see how OpenCV is added depending on the selected compiler.

            1 Reply Last reply
            0
            • A abdrrhm

              Hello guys. I'm having trouble adding OPENCV to qt cretor. I added OpenCV by specifying its paths from the AddLibrary tab, but when I want to use it in my project, I get the following errors:

              • error: cannot find -lopencv_world4100
              • error: collect2.exe: error: ld returned 1 exit status
              • error: [Makefile.Debug:72: debug/YOLO.exe] Error 1

              I copied the dll file directly to the project file. I will be grateful if you could help me.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @abdrrhm said in openCV & Qt:

              I copied the dll file directly to the project file

              Did you also specify the folder where the linker should search for the lib using -L parameter? You should show your pro or CMakeLists.txt file.
              On which platform are you?

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved