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. Getting info of camera devices.
Forum Updated to NodeBB v4.3 + New Features

Getting info of camera devices.

Scheduled Pinned Locked Moved Solved General and Desktop
11 Posts 6 Posters 1.5k Views 4 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.
  • KiraK Offline
    KiraK Offline
    Kira
    wrote on last edited by
    #1

    Hello all,
    I tried to get the name of camera devices in Qt referring the sample camera example.
    Their i can see the names of camera with their names in readable form but when i
    use the same code in my program i get a long value with the names how can i separate the info to get the short names.
    Sample code:

    std::cout<<"Entering camera function \n";
        QList<QCameraInfo> cameras = QCameraInfo::availableCameras();
        foreach (const QCameraInfo &cameraInfo, cameras)
           // QVariant::fromValue(cameraInfo.deviceName());
            qDebug()<< "device:"<< QVariant::fromValue(cameraInfo.deviceName());
        std::cout<<"Exiting camera function \n";
    

    Output:
    device: QVariant(QString, "@device:pnp:\\?\usb#vid_04f2&pid_b5a7&mi_00#6&fea6f4d&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global")
    device: QVariant(QString, "@device:sw:{860BB310-5D01-11D0-BD3B-00A0C911CE86}\Basler GenICam Source")
    device: QVariant(QString, "@device:sw:{860BB310-5D01-11D0-BD3B-00A0C911CE86}\Basler GenICam Source 2")
    device: QVariant(QString, "@device:sw:{860BB310-5D01-11D0-BD3B-00A0C911CE86}\Basler GenICam Source 3")
    device: QVariant(QString, "@device:sw:{860BB310-5D01-11D0-BD3B-00A0C911CE86}\Basler GenICam Source 4")

    Also, i have only 2 cameras connected. But in the output i can see multiple cameras.

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

      Hi,

      That because your camera is seen through different interfaces. The GenICam standard does offer different ways to access your camera which might not correspond to the number of device.

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

      KiraK 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        That because your camera is seen through different interfaces. The GenICam standard does offer different ways to access your camera which might not correspond to the number of device.

        KiraK Offline
        KiraK Offline
        Kira
        wrote on last edited by
        #3

        @SGaist : Thanks.
        Is there any way to get the names of camera like:
        webcam
        Basler GenICam Source
        Basler GenICam Source1
        From the list given above.

        jsulmJ 1 Reply Last reply
        0
        • KiraK Kira

          @SGaist : Thanks.
          Is there any way to get the names of camera like:
          webcam
          Basler GenICam Source
          Basler GenICam Source1
          From the list given above.

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

          @Kira You can extract the name from the strings

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

          1 Reply Last reply
          2
          • KiraK Offline
            KiraK Offline
            Kira
            wrote on last edited by
            #5

            Sure thanks.

            1 Reply Last reply
            0
            • sabraS Offline
              sabraS Offline
              sabra
              wrote on last edited by
              #6

              please please please can you tell me how you add pylon Basler camera to qt? i cant see my camera in camerainfolist? what steps should I do to get there? @Kira @jsulm

              Puppy BearP Pablo J. RoginaP 2 Replies Last reply
              0
              • sabraS sabra

                please please please can you tell me how you add pylon Basler camera to qt? i cant see my camera in camerainfolist? what steps should I do to get there? @Kira @jsulm

                Puppy BearP Offline
                Puppy BearP Offline
                Puppy Bear
                wrote on last edited by
                #7

                @sabra why dont u try something like opencv, or sdk like v4l2,directshow

                1 Reply Last reply
                0
                • sabraS Offline
                  sabraS Offline
                  sabra
                  wrote on last edited by
                  #8

                  i need to support this camera in my app,it industrial

                  1 Reply Last reply
                  0
                  • sabraS sabra

                    please please please can you tell me how you add pylon Basler camera to qt? i cant see my camera in camerainfolist? what steps should I do to get there? @Kira @jsulm

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

                    @sabra said in Getting info of camera devices.:

                    pylon Basler camera

                    Have you tried using the pylon camera suite free software?

                    i need to support this camera

                    You may want to tell what make/model your camera is.
                    In addition, what connection type is (USB, IP, etc.)
                    The above mentioned framework provides some tools (viewer, configurator) that may also help you.

                    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
                    0
                    • sabraS Offline
                      sabraS Offline
                      sabra
                      wrote on last edited by
                      #10

                      @Pablo-J-Rogina I used that software, actually i want to use Basler integrated in qt but first I need to get a list of Basler connected to the system, select one of them then get the frame from Basler then give that frame to OpenCV for process

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

                        Hi,

                        Then you need to use the SDK provided with pylon. There's everything there to enumerate the cameras connected to your system as well as grab images from them.

                        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