ios-camera

How do I use AVCaptureFlashMode

血红的双手。 提交于 2019-12-03 14:53:25
问题 I'm making an app to allow me to stitch images together into a panoramic scene. I want to be able to turn the Flash LED on the iPhone 4 programatically. How can I do this? I read the documentation and discovered that I need to use AVCaptureFlashMode but I can't figure out how 2 use it? any help would be appreciated. Updated Code below. Thanks SIF! NSError* error = nil; NSLog(@"Setting up LED"); if([captDevice hasTorch] == NO) { NSLog(@"Error: This device doesnt have a torch"); } if(

How to access iOS simulator camera [duplicate]

牧云@^-^@ 提交于 2019-12-03 10:24:24
问题 This question already has answers here : How do I test a camera in the iPhone simulator? (5 answers) Closed 4 years ago . Hi friends i am doing camera app. i need to test the app in simulator but i can't able to access the iOS simulator camera. Any help for my problem. If not possible in simulator means i need to access my system camera. Whether it is possible?I tried Image picture view controller but it not works .Any help will be appreciated. The below code only i tried.. self.imagePicker =

Flutter Camera Overlay

余生长醉 提交于 2019-12-03 05:19:25
问题 I've been doing some research for an upcoming project and would like to render the camera view behind a custom shape/semi-transparent img to act as a guide when taking pictures. Does anyone know of a flutter camera plugin or tutorial that explains how to do this? 回答1: You can use the camera Plugin for flutter by the Flutter team. https://pub.dartlang.org/packages/camera and then position your image and you cameraview in a Stack Widget like this: return new Stack( alignment: FractionalOffset

How to access iOS simulator camera [duplicate]

 ̄綄美尐妖づ 提交于 2019-12-03 04:09:28
This question already has answers here : How do I test a camera in the iPhone simulator? (5 answers) Hi friends i am doing camera app. i need to test the app in simulator but i can't able to access the iOS simulator camera. Any help for my problem. If not possible in simulator means i need to access my system camera. Whether it is possible?I tried Image picture view controller but it not works .Any help will be appreciated. The below code only i tried.. self.imagePicker = [[UIImagePickerController alloc] init]; UIImagePickerControllerSourceType sourceType =

How do I use AVCaptureFlashMode

隐身守侯 提交于 2019-12-03 03:52:47
I'm making an app to allow me to stitch images together into a panoramic scene. I want to be able to turn the Flash LED on the iPhone 4 programatically. How can I do this? I read the documentation and discovered that I need to use AVCaptureFlashMode but I can't figure out how 2 use it? any help would be appreciated. Updated Code below. Thanks SIF! NSError* error = nil; NSLog(@"Setting up LED"); if([captDevice hasTorch] == NO) { NSLog(@"Error: This device doesnt have a torch"); } if([captDevice isTorchModeSupported:AVCaptureTorchModeOn] == NO) { NSLog(@"Error: This device doesnt support

Detect existence of camera in iPhone app?

爱⌒轻易说出口 提交于 2019-11-29 20:50:21
I'm writing an iOS app, and I need to be able to detect if the device has a camera. Previously, I would check if the device is an iPhone or not, since only the iPhone has a camera - but with the launch of the iPod Touch 4 this is no longer a viable option. The app functions without a camera, but the presence of a camera adds functionality. So, can anyone provide me with code that returns whether there is a camera or not? You can use +isSourceTypeAvailable: method in UIImagePickerController: if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]) // Has

How to force iOS camera to take a picture programmatically using AVFoundation?

会有一股神秘感。 提交于 2019-11-29 17:17:46
I need the iOS camera to take a picture without any input from the user. How would I go about doing this? This is my code so far: -(void)initCapture{ AVCaptureDeviceInput *newVideoInput = [[AVCaptureDeviceInput alloc] init]; AVCaptureStillImageOutput *newStillImageOutput = [[AVCaptureStillImageOutput alloc] init]; NSDictionary *outputSettings = [[NSDictionary alloc] initWithObjectsAndKeys: AVVideoCodecJPEG, AVVideoCodecKey, nil]; [newStillImageOutput setOutputSettings:outputSettings]; AVCaptureSession *newCaptureSession = [[AVCaptureSession alloc] init]; if ([newCaptureSession canAddInput

How can I prevent iOS apps from resetting after changing Camera permissions?

人盡茶涼 提交于 2019-11-29 01:55:38
Currently, when I change the camera permissions for my app in Settings, then navigate back to my app, the app will force a refresh and I will lose my place in the app. I follow these steps exactly: Open an app that uses the camera permission. Navigate to some screen within the app (so you can visibly see the refresh later) Go to the Settings app, navigate to the app's settings, and toggle the camera permission Double click home and go back to the app. After a few seconds, it will refresh, bringing you back to the first screen Note: I'm using an iPhone 6 running iOS 8.4 I've noticed this

Detect existence of camera in iPhone app?

限于喜欢 提交于 2019-11-28 16:57:12
问题 I'm writing an iOS app, and I need to be able to detect if the device has a camera. Previously, I would check if the device is an iPhone or not, since only the iPhone has a camera - but with the launch of the iPod Touch 4 this is no longer a viable option. The app functions without a camera, but the presence of a camera adds functionality. So, can anyone provide me with code that returns whether there is a camera or not? 回答1: You can use +isSourceTypeAvailable: method in

What is the best way to record a video with augmented reality

情到浓时终转凉″ 提交于 2019-11-28 11:42:23
What is the best way to record a video with augmented reality? (adding text, images logo to frames from iPhone/iPad camera) Previously I was trying to figure out how to draw into CIImage ( How to draw text into CIImage? ) and convert CIImage back to CMSampleBuffer ( CIImage back to CMSampleBuffer ) I almost did everything, only have problem with recording video using new CMSampleBuffer in AVAssetWriterInput But this solution anyway isn't good at all, it eats a lot of CPU while converting CIImage to CVPixelBuffer ( ciContext.render(ciImage!, to: aBuffer) ) So I want to stop here and find some