如何修复Qt5.13.1中的错误摄像头?
我想调整相机中与曝光相关的设置。 例如,我尝试使用函数如何修复Qt5.13.1中的错误摄像头?,qt,camera,qml,Qt,Camera,Qml,我想调整相机中与曝光相关的设置。 例如,我尝试使用函数camera.searchAndLock(),但它不起作用 我尝试运行Qt的摄像头示例,但对于以下代码,我始终Unlockedstatus switch (m_camera->lockStatus()) { case QCamera::Searching: case QCamera::Locked: m_camera->unlock(); break; case QCamer
camera.searchAndLock()
,但它不起作用
我尝试运行Qt的摄像头示例,但对于以下代码,我始终Unlocked
status
switch (m_camera->lockStatus()) {
case QCamera::Searching:
case QCamera::Locked:
m_camera->unlock();
break;
case QCamera::Unlocked:
m_camera->searchAndLock();
}
我编写了以下QML代码,但以下代码始终返回解锁焦点
if (camera.lockStatus == Camera.Unlocked) {
camera.searchAndLock();
console.log("searching focus...")
}
else {
camera.unlock();
console.log("unlocking focus...")
}
我想通过以下代码更改相机中与曝光相关的设置,但所有设置都不起作用:
camera.searchAndLock()
camera.exposure.exposureCompensation = value
camera.exposure.spotMeteringPoint.x=value
camera.exposure.spotMeteringPoint.y=value
camera.exposure.manualShutterSpeed = value
camera.exposure.iso = value
camera.exposure.manualAperture=value
我尝试使用searchAndLock()
功能开始对焦、曝光计算,但运行此功能后,我的相机状态仍然是未锁定
而不是搜索
我能用这个bug做什么?
我可以安装哪个版本的Qt没有这个bug
通过阅读以下链接,我成功修复了SerialPort
的错误:
我有办法修复这个错误吗
Qt版本:Qt 5.13.1(MSVC 2017,32位),
平台:Windows 10我想你应该检查一下你的相机是否有任何支持的对焦模式,以及这些模式是什么:
console.debug("supported focus modes: " + focus.supportedFocusModes
+ ", FocusManual: " + CameraFocus.FocusManual
+ ", FocusHyperfocal: " + CameraFocus.FocusHyperfocal
+ ", FocusInfinity: " + CameraFocus.FocusInfinity
+ ", FocusAuto: " + CameraFocus.FocusAuto
+ ", FocusContinuous: " + CameraFocus.FocusContinuous
+ ", FocusMacro: " + CameraFocus.FocusMacro
)
通过使用此结果提供的信息,您可以设置适合您的相机硬件的聚焦模式。有很多不同的硬件,所以在编写应用程序的相机部分时,请考虑到这一点。什么代码不起作用?什么是不工作?什么虫子?你必须澄清问题并提供答案。例如,camera.searchAndLock()不工作。你必须澄清不工作的含义。我尝试使用“searchAndLock()”函数开始对焦、曝光计算,但运行此函数后,我的相机状态仍然是“解锁”而不是“搜索”。