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. How to run two cameras in parallel?

How to run two cameras in parallel?

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 3 Posters 1.9k 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.
  • F Offline
    F Offline
    Faisal_Ali
    wrote on last edited by A Former User
    #1

    Hi
    m trying to run 2 cameras one is laptops default web cam and the other one is portable at the same time parallel but the are not working together either web came runs or portable cameras runs in short one at a time is running .
    plz hellp to sort out this problem.

    jsulmJ 2 Replies Last reply
    0
    • F Faisal_Ali

      Hi
      m trying to run 2 cameras one is laptops default web cam and the other one is portable at the same time parallel but the are not working together either web came runs or portable cameras runs in short one at a time is running .
      plz hellp to sort out this problem.

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

      @Faisal_Ali You didn't explain/show what you tried so far. Can you show your code?

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

      1 Reply Last reply
      0
      • F Faisal_Ali

        Hi
        m trying to run 2 cameras one is laptops default web cam and the other one is portable at the same time parallel but the are not working together either web came runs or portable cameras runs in short one at a time is running .
        plz hellp to sort out this problem.

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

        @Faisal_Ali See here http://doc.qt.io/qt-5/qcamera.html

        QList<QCameraInfo> cameras = QCameraInfo::availableCameras();
        foreach (const QCameraInfo &cameraInfo, cameras) {
            if (cameraInfo.deviceName() == "mycamera")
                camera = new QCamera(cameraInfo);
        }
        

        You just need one QCamera instance for each of your cameras. Then you can use one QCameraViewfinder/QMediaRecorder for each of those QCamera instances.

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

        F 2 Replies Last reply
        3
        • jsulmJ jsulm

          @Faisal_Ali See here http://doc.qt.io/qt-5/qcamera.html

          QList<QCameraInfo> cameras = QCameraInfo::availableCameras();
          foreach (const QCameraInfo &cameraInfo, cameras) {
              if (cameraInfo.deviceName() == "mycamera")
                  camera = new QCamera(cameraInfo);
          }
          

          You just need one QCamera instance for each of your cameras. Then you can use one QCameraViewfinder/QMediaRecorder for each of those QCamera instances.

          F Offline
          F Offline
          Faisal_Ali
          wrote on last edited by
          #4

          @jsulm we have been running cameras using open cv

          1 Reply Last reply
          0
          • jsulmJ jsulm

            @Faisal_Ali See here http://doc.qt.io/qt-5/qcamera.html

            QList<QCameraInfo> cameras = QCameraInfo::availableCameras();
            foreach (const QCameraInfo &cameraInfo, cameras) {
                if (cameraInfo.deviceName() == "mycamera")
                    camera = new QCamera(cameraInfo);
            }
            

            You just need one QCamera instance for each of your cameras. Then you can use one QCameraViewfinder/QMediaRecorder for each of those QCamera instances.

            F Offline
            F Offline
            Faisal_Ali
            wrote on last edited by
            #5

            @jsulm basically i am use opencv for this purpose.

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

              Hi,

              Since you are using OpenCV to grab images from your camera, why not ask that question to the OpenCV folks ?

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

              F 1 Reply Last reply
              2
              • SGaistS SGaist

                Hi,

                Since you are using OpenCV to grab images from your camera, why not ask that question to the OpenCV folks ?

                F Offline
                F Offline
                Faisal_Ali
                wrote on last edited by
                #7

                @SGaist can u send me a link of opencv folks.

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

                  Here

                  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

                  • Login

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