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. Problem on QCamera auto exposure
Forum Updated to NodeBB v4.3 + New Features

Problem on QCamera auto exposure

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 704 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.
  • W Offline
    W Offline
    WangZiqi
    wrote on 10 Oct 2018, 07:38 last edited by
    #1

    Hi!
    I use qt for starting camera and recording on Windows. And I met some questions.
    I need to set my camera auto exposure (if it's support) so I write code like this.

    //Before these codes I new a object of QCamera(m_camera) and set what I need
            QCameraExposure *exposure = m_camera->exposure();
    	auto curExposureMode = exposure->exposureMode();
    	auto isSupportExposureAuto = exposure->isExposureModeSupported(QCameraExposure::ExposureAuto);
    	exposure->setExposureMode(QCameraExposure::ExposureAuto);
            m_camera->start();
    

    And the result is: curExposureMode is "QCameraExposure::ExposureAuto" and isSupportExposureAuto is false. But I see with AMCap, my camera is support auto exposure and I have set the exposure to manual mode before. And after I set the exposure auto, there is nothing changed on my camera(it is still manual exposure mode).

    So is there anyone can tell me what's wrong with my code?
    Thanks!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 10 Oct 2018, 21:14 last edited by
      #2

      Hi and welcome to devnet,

      What version of Qt are you using ?
      What is AMCap ?
      What does it use to communicate with that camera ?

      You don't have anything wrong in your code. The backend used to communicate with the camera however might not be able to set the exposure.

      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
      • W Offline
        W Offline
        WangZiqi
        wrote on 11 Oct 2018, 01:38 last edited by
        #3

        Thanks for your help.
        The version of QT is 5.7.0.
        "AMCap" is a software that can tell me whether the camera is support auto exposure and other settings. You can download here(https://amcap.en.softonic.com/).
        I use AMCap and set my camera auto exposure, it runs good.So I think my camera is support auto exposure.But with the follow code I get the different answer.

        auto isSupportExposureAuto = exposure->isExposureModeSupported(QCameraExposure::ExposureAuto);
        //the result is false
        
        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 11 Oct 2018, 21:27 last edited by
          #4

          You should use a more recent version of Qt.
          The current release is 5.11, LTS is 5.9 and 5.12 is around the corner.

          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
          • W Offline
            W Offline
            WangZiqi
            wrote on 12 Oct 2018, 00:45 last edited by
            #5

            OK, I will try again with Qt5.11.0. Thank you very much!

            1 Reply Last reply
            0

            5/5

            12 Oct 2018, 00:45

            • Login

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