无法在前摄像头上应用自动对焦

时间:2019-07-16 10:31:23

标签: swift avfoundation autofocus

我正在将自动对焦应用到相机上的应用程序工作,但在切换到前置摄像头时它的工作原理很好,

    if (device?.isFocusPointOfInterestSupported)!
    {

    }

此条件返回false

尽管支持 autoExpose ,但是在点击以进行对焦时自动曝光会使相机变暗。

Q1。如何将焦点应用于前置摄像头。为什么在后置摄像头中支持它,而在前置摄像头中不支持

第二季度。焦点暴露

之间的主要区别是什么
    if (device?.isFocusPointOfInterestSupported)!{

                device?.focusPointOfInterest = touch.location(in: view)
                device?.focusMode = .autoFocus
            }
            if (device?.isExposurePointOfInterestSupported)!
            {


                device?.exposurePointOfInterest = touch.location(in: view)
                device?.exposureMode = .autoExpose
            }

0 个答案:

没有答案