Questions tagged [avcapture]

iOS video capture API for both Swift and Objective-C

Some common high-level objects used with this API:

  • AVCaptureDevice
  • AVCaptureSession
  • AVCaptureVideoPreviewLayer

related tags:

223 questions
1
vote
3 answers

Using AVCapturePhotoOutput in iOS10 - NSGenericException

I am currently trying to figure out how to use iOS 10's AVCapturePhotoOutput method and am having trouble doing so. I feel like I am about to get it right but continue receiving an error: Terminating app due to uncaught exception…
User 5842
  • 2,849
  • 7
  • 33
  • 51
1
vote
1 answer

How do I undo tap to focus / meter?

In my camera app, I'm thinking of supporting tap to focus and meter. I have found, as a user, that my finger sometimes accidentally touches the screen somewhere, and it focuses there, so I want to undo it. In my app, I'm thinking of adding a Reset…
Kartick Vaddadi
  • 4,818
  • 6
  • 39
  • 55
1
vote
1 answer

How can I ensure that my AVCaptureSession has enough time to run?

I need to ensure that my AVCaptureSession runs for 15 seconds before being stopped. How could I go about doing this? I'm hesitant about using wait or sleep because I'm fairly sure that it would halt the intake of input. What can I use to wait 15…
fi12
  • 495
  • 11
  • 30
1
vote
0 answers

How to increase AVCapturePhotoOutput performance

What i want to do is to capture iPhone camera frames with AVCaptureSession in an Xcode/swift3 project. What i did is to instanciante AVCaptureSession, AVCapturePhotoOutput and stuff objects. It works great, the didOutputSampleBuffer delegate is…
Bob5421
  • 7,757
  • 14
  • 81
  • 175
1
vote
1 answer

Discrete control of the torch brightness on iPhone via AVCapture

I have an app that requires precise control of the torch output level. The level is set through this function: setTorchModeOnWithLevel(_:) The function asks for a continuous float between 0 and 1 but only seems to have 4 different output levels from…
aforward
  • 133
  • 1
  • 11
1
vote
1 answer

Simultaneous pictures with iPhone 7 Plus cameras

Is there a way to take a picture with the Telephoto lens and the Wideangle lens of the iPhone 7 Plus ? I explored the different methods, but the best I can come with is to change the camera by removing the input…
cujo30227
  • 720
  • 7
  • 15
1
vote
1 answer

How to save the previewed (Zoomed) image as Photo using AVFoundation?

So, I've magnet out how to make a Zoom Effect with CATransform3DMakeScale(2.4, 2.4, 2.4) but now I have problems trying to save the Zoome preview Message (code as I do Zooming): // init camera device let captureDevice : AVCaptureDevice? =…
1
vote
0 answers

AVCaptured image size of screen

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…
jckly
  • 831
  • 1
  • 11
  • 22
1
vote
1 answer

How to check the auto focus is still going on in IOS?

I created camera app now what i want to do is need to check is the focus going on continuously or stopped. This is what i tried : NSError *error=nil; //Capture Session AVCaptureSession *session = [[AVCaptureSession alloc]init]; …
Kishore Kumar
  • 4,265
  • 3
  • 26
  • 47
1
vote
1 answer

GCD setting scheduling/priority between threads

I am working on an app that captures frames from the camera and does blend over an image updated by another thread. My problem is that the image creating thread which is called every 500ms consumes peak computing power that influences the other…
Chris
  • 1,231
  • 2
  • 10
  • 20
1
vote
1 answer

connectionWithMediaType return nil

I try to implement video feed using glkview but always getting return nil from connectionWithMediaType when i try to rotate the rotation. here are my setup override public func viewDidLoad() { super.viewDidLoad() // Do any additional setup…
1
vote
0 answers

How to find the pixel position from live camera preview using AVCapture preview layer in ios?

I am doing sample application to get pixel color from live camera preview Here my code let session = AVCaptureSession() session.sessionPreset = AVCaptureSessionPresetMedium let captureVideoPreviewLayer = AVCaptureVideoPreviewLayer(session:…
iosLearner
  • 1,312
  • 1
  • 16
  • 30
1
vote
1 answer

AVCaptureVideoPreviewLayer rotation not working

when i rotate my device from landscape left to landscape right or vice-versa, the AVCaptureVideoPreviewLayer turns upside-down. it works perfectly fine, when I rotate my device from portrait to landscape mode. this is my code { override func…
Beamdev1
  • 11
  • 4
1
vote
1 answer

Efficient way to process AVCapture Output Sample Buffer via OpenGL

Here's what I am trying to do in brief: - capture camera output using the AVCaptureVideoDataOutputSampleBufferDelegate - then process the frames from inside the captureOutput delegate method through openGL. Now according to Apple's examples, the way…
lokstok
  • 231
  • 1
  • 2
  • 7
1
vote
1 answer

AVAudioSession Changing Category Freezing AVCapture Screen

We want to continue playing your music from other apps while you capture video for our ios app. Our code is modeled like the solution the question linked below, setting up the audio session when we go into and out of our capture screen. How do I…
Alex Yurkowski
  • 1,676
  • 1
  • 12
  • 26