"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

CameraDevice and AVCaptureSession

Greetings! I want to record video from camera for further processing while tracking image with QCAR Tracker (my purpose is to capture video separately from AR overlay). Having no control over QCAR CameraDevice inputs, I am creating my own AVCaptureSession like this: self.captureSession = [[AVCaptureSession alloc] init]; self.captureSession.sessionPreset = AVCaptureSessionPresetHigh; AVCaptureDeviceInput *videoInput = [AVCaptureDeviceInput deviceInputWithDevice:[AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo] error:NULL]; if ([self.captureSession canAddInput:videoInput]) { [self.captureSession addInput:videoInput]; } self.movieFileOutput = [[AVCaptureMovieFileOutput alloc] init]; if ([self.captureSession canAddOutput:self.movieFileOutput]) { [self.captureSession addOutput:self.movieFileOutput]; } [self.captureSession startRunning]; But it seems that CameraDevice just doesn't work along with AVCaptureSession - when one starts running the other immediately gets stuck (reproduced on iPhone3GS with iOS5.0 and iPhone4S with iOS5.0.1). I can retrieve images from camera with AVCaptureSession using AVCaptureVideoDataOutputSampleBufferDelegate. Is there any way to pass them to Tracker directly without using CameraDevice (just like some other AR tracking libraries allow)? Thank you in advance, Zmicier Predka

Hi again guys, I’m facing some serious troubles trying to record video while QCAR is active. Looks like there is no compatibility between image formats we can get from QCAR and those we can use for a video recording. To be able to combine images to a video we have to create pixel buffers si

Hi Zmicier, For optimal performance you may want to try grabbing YUV via the Image API, then writing some optimized C code for converting that to BGRA.

[FONT=Times New Roman" />[SIZE=3" />MoSR, thank you for reply! I’ve found out that QCAR’s 12-bit long YUV pixel format is equal to neither Apple’s ‘yuvs’ (aka 422YpCbCr8_yuvs) nor ‘yuvf’ (aka 422YpCbCr8FullRange), but do match one of following almost identi

[QUOTE=Zmicier]One last question - which of the two formats QCAR actually uses?[/QUOTE] Hi Zmicier, The specific data format is kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange.

[QUOTE=MoSR]Hi Dmitry, We have no difference in our code for iPhone 4S and all the sample apps in QCAR 1.5 beta have been tested on this platform - they wouldn't work if this were the case. I've just tested ImageTargets with QCAR 1.0.0 on a 4S and that works fine.