I am working with Apple's Vision framework for detecting faces. Then I come to this function.
let cgr: CGRect = CGRect(x: 0, y: 0, width: 1, height: 1)
let videoPreviewRect = previewLayer.layerRectConverted(fromMetadataOutputRect: cgr)
where previewLayer
is AVCaptureVideoPreviewLayer type object. It is a conversion from metaDataOutput rect to view rect. But I don't understand it completely.
How does it work, what does it converts to what?