iOS swift module to capture video frames from camera
CameraFrameCapturer is an iOS app which contains a swift class module CameraFrameCapturer.swift for capturing video frames from camera, converting the frames to UIImage images, and sent the images to delegate instances.
After copying CameraFrameCapturer.swift to a new project, you need add the key NSCameraUsageDescription with description in the app’s Info.plist.
Reference:
func didCaptured(image: UIImage) {
// UIImageView can only be updated in main thread
DispatchQueue.main.async {
self.imageView.image = image
}
}