Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Problem on QCamera auto exposure
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?
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.
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
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.
OK, I will try again with Qt5.11.0. Thank you very much!