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. Want to show detect camera using QCamera
Forum Updated to NodeBB v4.3 + New Features

Want to show detect camera using QCamera

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 4 Posters 564 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.
  • X Offline
    X Offline
    xylo212
    wrote on last edited by
    #1

    Actually, I want to access camera inside oven and but In my case I'm it's showing camera not found...

    When I try to run sample code for detecting the camera of my pc and I'm able to do it,
    Can anyone tell what approach I need to do for detecting the camera inside oven

    This is my code->>

    layout = new QVBoxLayout(this);
    QList<QCameraInfo> cameras = QCameraInfo::availableCameras();
    if (cameras.isEmpty()) {
    qDebug() << "No cameras found.";
    return;
    }
    camera = new QCamera(cameras.first());
    viewfinder = new QCameraViewfinder();
    layout->addWidget(viewfinder);

        // Set the camera viewfinder
        camera->setViewfinder(viewfinder);
        camera->start();
    
    Pl45m4P jsulmJ 2 Replies Last reply
    0
    • X xylo212

      Actually, I want to access camera inside oven and but In my case I'm it's showing camera not found...

      When I try to run sample code for detecting the camera of my pc and I'm able to do it,
      Can anyone tell what approach I need to do for detecting the camera inside oven

      This is my code->>

      layout = new QVBoxLayout(this);
      QList<QCameraInfo> cameras = QCameraInfo::availableCameras();
      if (cameras.isEmpty()) {
      qDebug() << "No cameras found.";
      return;
      }
      camera = new QCamera(cameras.first());
      viewfinder = new QCameraViewfinder();
      layout->addWidget(viewfinder);

          // Set the camera viewfinder
          camera->setViewfinder(viewfinder);
          camera->start();
      
      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @xylo212 said in Want to show detect camera using QCamera:

      I want to access camera inside oven

      Oven?! What oven? How is the camera connected to your device/computer?


      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
      • X Offline
        X Offline
        xylo212
        wrote on last edited by xylo212
        #3

        actually, when I try to run qt application on my system/PC in which we access PC camera, easily

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

          Hi,

          That does not answer the how is the camera accessed.
          It is a USB device ? A network camera ?

          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
          • X Offline
            X Offline
            xylo212
            wrote on last edited by xylo212
            #5

            USB camera

            1 Reply Last reply
            0
            • X xylo212

              Actually, I want to access camera inside oven and but In my case I'm it's showing camera not found...

              When I try to run sample code for detecting the camera of my pc and I'm able to do it,
              Can anyone tell what approach I need to do for detecting the camera inside oven

              This is my code->>

              layout = new QVBoxLayout(this);
              QList<QCameraInfo> cameras = QCameraInfo::availableCameras();
              if (cameras.isEmpty()) {
              qDebug() << "No cameras found.";
              return;
              }
              camera = new QCamera(cameras.first());
              viewfinder = new QCameraViewfinder();
              layout->addWidget(viewfinder);

                  // Set the camera viewfinder
                  camera->setViewfinder(viewfinder);
                  camera->start();
              
              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @xylo212 said in Want to show detect camera using QCamera:

              When I try to run sample code for detecting the camera of my pc and I'm able to do it

              Do you mean Qt example code? If so then compare that code with what you're doing.

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

              1 Reply Last reply
              0
              • X Offline
                X Offline
                xylo212
                wrote on last edited by
                #7

                yeah, I already done it but still not able to detect USB camera

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

                  What are you doing differently between your code and the working example ?

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

                  Pl45m4P 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    What are you doing differently between your code and the working example ?

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

                    @SGaist said in Want to show detect camera using QCamera:

                    What are you doing differently between your code and the working example ?

                    I assume @xylo212 is talking about a different camera... the camera from the computer works, while the "oven camera" (whatever it is) does not... maybe driver or connection issue.
                    No one can tell if @xylo212 doesn't provide more info.


                    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

                    • Login

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