ios-camera

Read camera permission for iOS in Xamarin

吃可爱长大的小学妹 提交于 2021-02-07 13:50:20
问题 I have an iOS app developed in Xamarin. When the app does not have permission to access the microphone, if the user tries to access the microphone from the app, I check the settings using AVAudioSession.SharedInstance().RequestRecordPermission (delegate(bool granted)) and display a message. Now I need to do the same if the app does not have permission to access the camera. I need to check if permission is granted for camera and display a message accordingly. How can I do this? 回答1: Did you

What's the best way to launch a periodic task in iOS camera to use frames data?

倾然丶 夕夏残阳落幕 提交于 2020-07-10 10:25:27
问题 I am building a cross-platform tool that uses frames from camera to do some work on them. I'm starting from this code-base, which is the camera Flutter plugin. My goal is to have a periodic task (running every 200ms or so) that does some work in parallel (so it does not interfere with frame-rate). For this, my goal is to store every frame that comes from camera and, when the task is triggered, last stored frame is used for some calculations. Below, I'll show what I've done, but I think this

AVCaptured image size of screen

走远了吗. 提交于 2020-07-10 05:28:43
问题 I'm using AVCapture to create my own camera on iOS. When I click the button to take a photo. I capture the image from the preview layer. Then I assign the captured image to a imageview that I make the size of the screen and place it on top of the preview layer. The problem is the captured image has different proportions to what the ios video camera preview has, so when you click to capture a photo.. You can see the aspect of the photo change. I want the photo to look identical to the preview.

Get focal length of iOS devices

此生再无相见时 提交于 2020-06-13 07:01:21
问题 In Swift, is there an easy way to find the focal length of the currently using camera? I am working on an iOS application and I need to use the focal length (in pixels or in mm) of iOS cameras. I found documentation from Apple about the focal length, but there is no information about how to obtain it. Here are two places I have visited: mdlcamera coreimage I have also checked this question but it doesn't seem to solve my problem. I know that the focal length can be calculated using the Field

Capacitor - Trying to catch the cancel on camera

↘锁芯ラ 提交于 2020-05-15 08:08:52
问题 I am using Capacitor with Ionic 4 and I would like to catch when the user taps on cancel when on the camera. public async takePicture(): Promise<string> { const image: CameraPhoto = await Camera.getPhoto({ quality: 90, allowEditing: true, correctOrientation: true, resultType: CameraResultType.Uri, source: CameraSource.Camera }).catch((e) => { throw new Error(e); }); return this._IMAGE = image.webPath; } I am simply try to catch and error but clicking on cancel does not throw an error anymore

Capacitor - Trying to catch the cancel on camera

人走茶凉 提交于 2020-05-15 08:08:51
问题 I am using Capacitor with Ionic 4 and I would like to catch when the user taps on cancel when on the camera. public async takePicture(): Promise<string> { const image: CameraPhoto = await Camera.getPhoto({ quality: 90, allowEditing: true, correctOrientation: true, resultType: CameraResultType.Uri, source: CameraSource.Camera }).catch((e) => { throw new Error(e); }); return this._IMAGE = image.webPath; } I am simply try to catch and error but clicking on cancel does not throw an error anymore

Multiple AVCaptureVideoDataOutput in same AVCaptureSession

你。 提交于 2020-01-02 04:01:12
问题 I was wondering if it's possible to add multiple AVCaptureVideoDataOutput to AVCaptureSession with a single camera device input? My experiments indicate that adding a second VideoDataOutput will cause canAddOutput return NO . But I couldn't find anywhere on Apple's documentation says multiple data output is disallow. 回答1: We can not use single AVCaptureSession for multiple AVCaptureVideoDataOutput objects. What can you do is you can make multiple AVCaptureVideoDataOutput with multiple

iOS 7.1 imagePicker CameraFlashMode not indicating Flash state

强颜欢笑 提交于 2020-01-01 08:24:09
问题 I have iPhone application which overlays the camera with custom view. I have a button to switch between camera flash mode, this is the code switch ([self.imagePickerController cameraFlashMode]) { case UIImagePickerControllerCameraFlashModeAuto: [self.imagePickerController setCameraFlashMode:UIImagePickerControllerCameraFlashModeOn]; return @"On"; break; case UIImagePickerControllerCameraFlashModeOn: [self.imagePickerController setCameraFlashMode:UIImagePickerControllerCameraFlashModeOff];