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
1 answer

Problem in camera activities in ios4

hi so far i have used UIImagePickerController for camera activities in IOS3. But in IOS4 the ImagePickerController is not working properly. When i tried to capture image it shows either a white image or else the app gets crashed often. So i…
Siva K
  • 4,968
  • 14
  • 82
  • 161
1
vote
2 answers

Output of CIFilter has different effect for different sizes of same image

func getImageWithFilter(by filterType: MainViewModel.FilterType, image: CIImage) -> CIImage { guard filterType.filterEnabled, let filter = CIFilter(name: filterType.rawValue) else { return image } …
1
vote
0 answers

Swift - Recorded Video is Mirrored on Front Camera - How to flip?

I'm trying to mirror the recorded video from a capture session. The video preview for front facing camera shows a mirrored version, however, when I go to save the file and play it back, the captured video is actually mirrored. I'm using Apple's…
DSS
  • 21
  • 5
1
vote
1 answer

AVCaptureMetadataObjectDelegate not receiving callback

I am making QR scanner. My code is working when all of it written in one place inside ViewController but when I modularised it then I am not getting callback inside AVCaptureMetadataOutputObjectsDelegate. import Foundation import UIKit import…
1
vote
1 answer

Swift - captureOutput is not being executed

I am currently trying to implement a camera live feed to my app. I've got it setup but somehow it's not working as expected. As far as I understand, captureOutput should be executed every time a frame is recognized and the print message should be…
Tom
  • 3,672
  • 6
  • 20
  • 52
1
vote
1 answer

When app crashes for live capture detect text in get an image from the AVCaptureDataSampleBufferDelegate call back did output

When an app crashes for live capture detect text in getting an image from the AVCaptureDataSampleBufferDelegate call back did output. Get image call back from the send Google vision API I have used that code Did anyone work? My code import…
Arun
  • 11
  • 3
1
vote
1 answer

VNRectangleObservation corners compressed in x-axis on iPhone

I'm capturing video via my device's camera, and feeding it to the Vision framework to perform rectangle detection. The code looks something like this (compressed for brevity ... hidden lines not relevant to this question): func captureOutput(_…
terrafirma9
  • 362
  • 2
  • 15
1
vote
0 answers

How do I implement .leftmirroring for an AVCaptureConnection while using front camera?

I’ve been trying to build a custom camera based off of the Apple sample code project Apple Camera Sample Project when using the front facing camera the photo is taken as mirrored. I’ve seen solutions which change the orientation of the picture after…
1
vote
1 answer

Objects Track using vision framework in iOS 11

I want to detect object and track that object using vision framework. I am successfully done with detect objects and little bit with tracking also but I don't get so much accuracy with tracking. I want much more accuracy while converting frames as…
1
vote
1 answer

Xamarin -- Set zoom in AVCapture not working

Hello I am trying to increase the zoom of the camera to its max level in my application. However after setting the AvCapture to its max value it remains at its lowest zoom level on the screen. Below is my code. void Initialize() { var videoDevices…
RyeGuy
  • 4,213
  • 10
  • 33
  • 57
1
vote
2 answers

Extracting frame from video in swift 3

Hey I am trying to run a live feed on my device. Now I want to capture a photo every 3 seconds, but every-time it does it. It makes a shutter sound. This is bad UX. Hence I want to run a live camera stream from the front camera and capture the frame…
Aakash Dave
  • 866
  • 1
  • 15
  • 30
1
vote
1 answer

Add UIButton over AVCaptureVideoPreviewLayer programmatically

I am trying to create a overlay on top of AVCaptureVideoPreviewLayer. I tried the following, but the result is not what I expected as the button's title is not visible: let previewLayer: AVCaptureVideoPreviewLayer =…
Cloy
  • 2,141
  • 23
  • 32
1
vote
0 answers

What preview photo formats are available?

I'm iterating over AVCapturePhotoSettings.availablePreviewPhotoPixelFormatTypes like this: for av in availablePreviewPhotoPixelFormatTypes { print("Avbl preview type: \(av)") } And I get non-descriptive numbers like: Avbl preview type:…
Kartick Vaddadi
  • 4,818
  • 6
  • 39
  • 55
1
vote
1 answer

layerRectConverted(fromMetadataOutputRect:) issue

During converting a rectangle in the preview layer’s coordinate system to the coordinate system can't achieve 100% precision. All rectangles are displaying a bit lower. I use layerRectConverted(fromMetadataOutputRect:) Here is my code: let…
Svitlana
  • 2,938
  • 1
  • 29
  • 38
1
vote
1 answer

Sound not working for some AVCaptureDeviceFormat... is this a bug?

I see this question on SO about the same problem but in my case it is slightly difference. On that question, the poster says he cannot record audio when he setups the app to shoot video at the highest resolutions a camera can provide under…
Duck
  • 34,902
  • 47
  • 248
  • 470