I want to get real time camera frames to apply machine learning in swiftui.
i made camera app with swiftui like this. but, i don't know how to get camera frame and how to apply machine learning techniques to camera frames
struct ImagePicker: UIViewControllerRepresentable {
var sourceType: UIImagePickerController.SourceType = .camera
func makeUIViewController(context: UIViewControllerRepresentableContext) -> UIImagePickerController {
let imagePicker = UIImagePickerController() imagePicker.allowsEditing = false imagePicker.sourceType = sourceType return imagePicker
}
func updateUIViewController(_ uiViewController: UIImagePickerController, context: UIViewControllerRepresentableContext) { } }