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. Using OpenCV with QT5
Forum Updated to NodeBB v4.3 + New Features

Using OpenCV with QT5

Scheduled Pinned Locked Moved General and Desktop
7 Posts 5 Posters 5.7k Views 1 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
    Timmoth
    wrote on last edited by
    #1

    is OpenCV compatible with QT5?
    and is it the best for capturing and playing back uncompressed AVI from a capture device?

    Regards,Tim.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      AFAIK, answer to both questions are "yes" :)

      Don't ask me for details, though.

      (Z(:^

      1 Reply Last reply
      0
      • T Offline
        T Offline
        Timmoth
        wrote on last edited by
        #3

        Ok cheers, i have been looking around and there seems to be issues that exist with openCV and QT 5 which do not exist in QT 4 and id like to know if there is any simpler library's to implement for the sole purpose of video acquisition and playback?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Serenity
          wrote on last edited by
          #4

          can you give us the issues, which doesn't exists in Qt4?

          I used OpenCV with Qt4 and the only thing, I needed, was converting between the OpenCV struct and QImage. That wasn't quite difficult.

          You have to try it out.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi,

            What can happen (depending on your system) is that you get an OpenCV pre-built with Qt 4, in that case you'll be in trouble.

            But you can always build OpenCV yourself

            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
            0
            • D Offline
              D Offline
              dbzhang800
              wrote on last edited by
              #6

              Hi, I have written two functions to do the conversion cv::Mat <==> QImage.

              Maybe is useful for you
              https://github.com/dbzhang800/QtOpenCV/blob/master/cvmatandqimage.h

              [quote author="Serenity" date="1375873569"]can you give us the issues, which doesn't exists in Qt4?

              I used OpenCV with Qt4 and the only thing, I needed, was converting between the OpenCV struct and QImage. That wasn't quite difficult.

              You have to try it out. [/quote]

              1 Reply Last reply
              0
              • S Offline
                S Offline
                Serenity
                wrote on last edited by
                #7

                [quote author="1+1=2" date="1375926119"]Hi, I have written two functions to do the conversion cv::Mat <==> QImage.

                Maybe is useful for you
                https://github.com/dbzhang800/QtOpenCV/blob/master/cvmatandqimage.h
                [/quote]

                There is an easier way with setting the pointer of the CVImage to an QImage. So, If you make any painting changes on this picture with OpenCV, you don't need to add them already to QImage.

                That, he also have to do with his code. Copying every pixel from one image to another costs too much time.

                EDIT: ah, I see, you have done that in the last lines of your code :)

                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