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. QCamera/QCameraFocus Windows 10 tablet

QCamera/QCameraFocus Windows 10 tablet

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 827 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.
  • A Offline
    A Offline
    addebito
    wrote on last edited by
    #1

    Hi at all,

    I bought an industrial tablet with a rear camera and I can use it by the QCamera + QAbstractVideoSurface without particular problems.
    The only thing I care about now is how to disable the auto focus functionality because is extremely slow.

    Before that I check by

    QCameraFocus::isFocusModeSupported(QCameraFocus::FocusModes mode)
    QCameraFocus::isFocusPointModeSupported(QCameraFocus::FocusPointMode mode) 
    

    ...but all types give me a false as result.
    But I'm sure, the rear camera has the auto focus functionality, I can see it during the video capture.

    I'm using QT 5.12.6 and the tablet has Windows 10 LTSB 2016.

    Follow the output of QCameraInfo "deviceName" and "description".

        foreach(QCameraInfo cam, cam_list)
            ui->textCamera->append(cam.deviceName() + " " + cam.description());
    
    @device:pnp:\\?\usb#vid_5986&pid_0546&mi_00#8&2391f56a&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global USB2.0 Camera
    

    Do you have any advice?
    Thank you.

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

      Hi,

      It might be a limitation of the Windows backend. You should check if the control itself is available.

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

      A 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        It might be a limitation of the Windows backend. You should check if the control itself is available.

        A Offline
        A Offline
        addebito
        wrote on last edited by
        #3

        Thank you @SGaist, how to do that?
        What you mean with "control" is available?

        In the meantime I trying a different approach. I'll post it.

        SGaistS 1 Reply Last reply
        0
        • A Offline
          A Offline
          addebito
          wrote on last edited by
          #4

          As mentioned before I changed approach, I abandoned QCamera class, now I'm using VideoCapture from OpenCV.

                  // turn the autofocus off
                  bool ret = cap.set(CAP_PROP_AUTOFOCUS, 0); 
                  if (!ret)
                      qWarning() << "Error during disable auto focus";
          
                  // set manual focus (0 to 255)
                  ret = cap.set(CAP_PROP_FOCUS, 255);
                  if (!ret)
                      qWarning() << "Error during set focus to 255";
          
          1 Reply Last reply
          0
          • A addebito

            Thank you @SGaist, how to do that?
            What you mean with "control" is available?

            In the meantime I trying a different approach. I'll post it.

            SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @addebito said in QCamera/QCameraFocus Windows 10 tablet:

            Thank you @SGaist, how to do that?
            What you mean with "control" is available?

            In the meantime I trying a different approach. I'll post it.

            I meant if you can get a QCameraFocusControl but it looks like I misread your original post and you did get the control. So I think it's indeed a limitation of the backend or that it can't for some reason provide that control directly.

            Out of curiosity, what type of camera is that ?

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

            A 1 Reply Last reply
            0
            • SGaistS SGaist

              @addebito said in QCamera/QCameraFocus Windows 10 tablet:

              Thank you @SGaist, how to do that?
              What you mean with "control" is available?

              In the meantime I trying a different approach. I'll post it.

              I meant if you can get a QCameraFocusControl but it looks like I misread your original post and you did get the control. So I think it's indeed a limitation of the backend or that it can't for some reason provide that control directly.

              Out of curiosity, what type of camera is that ?

              A Offline
              A Offline
              addebito
              wrote on last edited by
              #6

              @SGaist I don't know exactly.
              It's a 5Mpixels USB camera mounted on rear of an industrial tablet.

              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