Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved QT5.8 linux opencv3

    3rd Party Software
    2
    9
    3487
    Loading More Posts
    • 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.
    • gfxx
      gfxx last edited by

      QT5.8, ubuntu 16, kernel 4.4, in my .pro file....

      LIBS += -L/usr/local/lib \
      lopencv_shape \
      lopencv_stitching \
      lopencv_superres \
      lopencv_videostab \
      lopencv_photo \
      lopencv_bgsegm \
      lopencv_bioinspired \
      lopencv_ccalib \
      lopencv_cvv \
      lopencv_dnn \
      lopencv_dpm \
      lopencv_fuzzy \
      lopencv_line_descriptor \
      lopencv_plot \
      lopencv_reg \
      lopencv_saliency \
      lopencv_stereo \
      lopencv_structured_light \
      lopencv_rgbd \
      lopencv_calib3d \
      lopencv_surface_matching \
      lopencv_tracking \
      lopencv_datasets \
      lopencv_text \
      lopencv_features2d \
      lopencv_face \
      lopencv_objdetect \
      lopencv_highgui \
      lopencv_videoio \
      lopencv_imgcodecs \
      lopencv_video \
      lopencv_ml \
      lopencv_imgproc \
      lopencv_flann \
      lopencv_core \
      lopencv_hal
      

      debug result: ```
      :-1: error: error: libopencv_shape: File o directory not exist

      
      and these for all .so file .... but the file exist on that folder .... some ideas?? ( same app in QT5.6 work great)...
      
      regards
      Giorgio

      bkt

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        From what you posted, you forget to put - before all your lopencv_xxx statements i.e. -lopencv_shape.

        Note that I'm used to OpenCV having library names containing also the version number so take that into account also.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • gfxx
          gfxx last edited by

          4 mounth ago I've upgrade opencv from 2.x to 3.1 .... on other pc QT5.6 UBUNTU 14.04 SAME KERNEL of these pc 16.04 .... so I modify mY file .pro in these way:

          CONFIG += link_pkgconfig
          PKGCONFIG += opencv
          INCLUDEPATH += /usr/local/include/opencv2
          INCLUDEPATH += /usr/local/include/
          INCLUDEPATH += /usr/local/share/OpenCV/
          
          INCLUDEPATH += /usr/local/include/opencv
          
          INCLUDEPATH += .
          INCLUDEPATH += /usr/local/include
          INCLUDEPATH += /usr/local/include/opencv
          INCLUDEPATH += /usr/local/include/opencv2
          INCLUDEPATH += /usr/local/include/opencv2/core
          INCLUDEPATH += /usr/local/include/opencv2/highgui
          INCLUDEPATH += /usr/local/include/opencv2/imgproc
          INCLUDEPATH += /usr/local/include/opencv2/flann
          INCLUDEPATH += /usr/local/include/opencv2/photo
          INCLUDEPATH += /usr/local/include/opencv2/video
          INCLUDEPATH += /usr/local/include/opencv2/videoio
          INCLUDEPATH += /usr/local/include/opencv2/features2d
          INCLUDEPATH += /usr/local/include/opencv2/objdetect
          INCLUDEPATH += /usr/local/include/opencv2/calib3d
          INCLUDEPATH += /usr/local/include/opencv2/ml
          INCLUDEPATH += /usr/local/include/opencv2/contrib
          
          
          
          LIBS += -lX11 -pthread -lglut -lGL -lGLU
          LIBS += -lmodbus
          LIBS += -L/usr/lib/x86_64-linux-gnu/libv4l/libv4l2convert.so
          LIBS += -L/usr/lib/x86_64-linux-gnu/libv4l
          
          
          
          
          #LIBS += -L/usr/local/lib \
          #-libopencv_shape \
          #-libopencv_stitching \
          #-libopencv_superres \
          #-libopencv_videostab \
          #-libopencv_photo \
          #-libopencv_bgsegm \
          #-libopencv_bioinspired \
          #-libopencv_ccalib \
          #-libopencv_cvv \
          #-libopencv_dnn \
          #-libopencv_dpm \
          #-libopencv_fuzzy \
          #-libopencv_line_descriptor \
          #-libopencv_plot \
          #-libopencv_reg \
          #-libopencv_saliency \
          #-libopencv_stereo \
          #-libopencv_structured_light \
          #-libopencv_rgbd \
          #-libopencv_calib3d \
          #-libopencv_surface_matching \
          #-libopencv_tracking \
          #-libopencv_datasets \
          #-libopencv_text \
          #-libopencv_features2d \
          #-libopencv_face \
          #-libopencv_objdetect \
          #-libopencv_highgui \
          #-libopencv_videoio \
          #-libopencv_imgcodecs \
          #-libopencv_video \
          #-libopencv_ml \
          #-libopencv_imgproc \
          #-libopencv_flann \
          #-libopencv_core \
          #-libopencv_hal
          

          all work fine and the app (still in test ...) work like a charm ..... I' interested to modbus on qt5.8 so I try to compile my app working in qt5.6 into qt5.8 .... and I have these error on opencv library ... so I try to leave the old comment (#) I tried to use the old way to indicate opencv libraries in .pro files ..... unfortunately it does not work even with your indication, which I had tried earlier .... it works to use the new path of the xxxx / Opencv2xxx .... I do not know what to do.

          using these:

          LIBS += -L/usr/local/lib \
          -libopencv_shape \
          -libopencv_stitching \
          -libopencv_superres \
          /** etc etc */
          

          I have these error: impossible to find: -libopencv_xxx (for 37 time equal to library to use)

          and in these way I obtain these other error:

          CONFIG += link_pkgconfig
          PKGCONFIG += opencv
          INCLUDEPATH += /usr/local/include/opencv2
          INCLUDEPATH += /usr/local/include/
          INCLUDEPATH += /usr/local/share/OpenCV/
          
          INCLUDEPATH += /usr/local/include/opencv
          
          INCLUDEPATH += .
          INCLUDEPATH += /usr/local/include
          INCLUDEPATH += /usr/local/include/opencv
          INCLUDEPATH += /usr/local/include/opencv2
          INCLUDEPATH += /usr/local/include/opencv2/core
          INCLUDEPATH += /usr/local/include/opencv2/highgui
          INCLUDEPATH += /usr/local/include/opencv2/imgproc
          INCLUDEPATH += /usr/local/include/opencv2/flann
          INCLUDEPATH += /usr/local/include/opencv2/photo
          INCLUDEPATH += /usr/local/include/opencv2/video
          INCLUDEPATH += /usr/local/include/opencv2/videoio
          INCLUDEPATH += /usr/local/include/opencv2/features2d
          INCLUDEPATH += /usr/local/include/opencv2/objdetect
          INCLUDEPATH += /usr/local/include/opencv2/calib3d
          INCLUDEPATH += /usr/local/include/opencv2/ml
          INCLUDEPATH += /usr/local/include/opencv2/contrib
          
          
          
          LIBS += -lX11 -pthread -lglut -lGL -lGLU
          LIBS += -lmodbus
          LIBS += -L/usr/lib/x86_64-linux-gnu/libv4l/libv4l2convert.so
          LIBS += -L/usr/lib/x86_64-linux-gnu/libv4l
          
          #LIBS += -L/usr/local/lib \
          #-libopencv_shape \
          #-libopencv_stitching \
          #-libopencv_superres \
          

          the new error:

          /usr/local/lib/libopencv_imgcodecs.so:-1: error: undefined referred to "Imf::chromaticities(Imf::Header const&)"
          /*i have 73 error of these type .... but as you can see in my app not use local lib libopencv .... but only opencv2/opencv.hpp for ex.***/
          

          in my app the incluse file is these:

          #include <opencv/highgui.h>
          #include <opencv2/opencv.hpp>
          #include <opencv2/imgproc/imgproc.hpp>
          #include <opencv2/highgui/highgui.hpp>
          #include <opencv2/core/core.hpp>
          #include <opencv2/video/video.hpp>
          //#include <opencv2/ocl/matrix_operations.hpp>
          //#include <opencv2/ocl/ocl.hpp>
          #include <opencv2/calib3d/calib3d.hpp>
          #include <opencv2/highgui/highgui.hpp>
          #include <opencv2/videoio.hpp>
          #include <opencv2/videoio/videoio_c.h>
          #include <opencv2/core/ocl.hpp>
          

          regards
          Giorgio

          bkt

          1 Reply Last reply Reply Quote 0
          • gfxx
            gfxx last edited by

            is possible i've found the problem... for example these warning:

            :-1: warning: libswscale.so.2, needed by /usr/local/lib/libopencv_videoio.so, not found (try using -rpath or -rpath-link)
            

            but in ubuntu 16.04 kernel 4.4 libswscale.so.2 is not on surce list because to old.... the same for other libavxxxx.52/.54 exist only .dev version ....

            some suggest to solve?

            regards
            giorgio

            bkt

            1 Reply Last reply Reply Quote 0
            • SGaist
              SGaist Lifetime Qt Champion last edited by

              Do you mean you updated your system without re-building OpenCV ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              gfxx 1 Reply Last reply Reply Quote 0
              • gfxx
                gfxx @SGaist last edited by gfxx

                @SGaist ... you are in right is a std solution ... but I hope in something more smart ... because the old lib is not avaiable on ubuntu repo and is possible (if use 16.04 + 14.04 repo) some tipe of conflict ... :( ..... or go down to 14.04 again .... But this breaks me a lot of bxxxx because where to reinstall androidStudio ....

                any how thanks.

                regards
                giorgio

                bkt

                1 Reply Last reply Reply Quote 0
                • SGaist
                  SGaist Lifetime Qt Champion last edited by

                  What do you have currently installed ? (OpenCV version, how did you install it etc.)

                  What exactly error do you have now ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  gfxx 1 Reply Last reply Reply Quote 0
                  • gfxx
                    gfxx @SGaist last edited by

                    @SGaist no I've not update my sytem without re-compile opencv.... I have only update from qt5.6 to Qt5.8 ..... all other parth of system is the same .... opencv is right compile on version 3.1... 2 week ago I,ve right test opencv on c file and example .... tomorrow I re-test example file.

                    regards
                    Giorgio

                    bkt

                    gfxx 1 Reply Last reply Reply Quote 0
                    • gfxx
                      gfxx @gfxx last edited by

                      ..... the problem is about WITH_QT flag in cmake ..... I flak it on cmake-gui but I read that command enable support to qt4 only and make problem onto ubuntu 16.04 and major than QT5.2 .... opencv run in stand alone mode but inside qt project make these type of error .... so clean all my pc from opencv and re-install (i test opencv3.2) without WITH_QT flag .... all works like a charm.

                      regards
                      giorgio

                      bkt

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post