How to capture higher resolution still image


#1

Hi,
I was able to modify the scanner app to capture 640x480 still image when the scanner button is pushed by using AVCaptureStillImageOutput.

How can I get higher resolution, such as 1920x1080?

Thanks a lot.


#2

My guess is that is the max resolution of the depth and IR sensors


#3

Has anyone figured this out yet?


#4

in the setupColorCamera()
//make still image output
stillImageOutput = [[AVCaptureStillImageOutput alloc] init];
NSDictionary *outputSettings = @{ AVVideoCodecKey: AVVideoCodecJPEG};//[NSDictionary dictionaryWithObject:[NSNumber numberWithInt:kCVPixelFormatType_32BGRA] forKey:(id)kCVPixelBufferPixelFormatTypeKey];
[stillImageOutput setOutputSettings:outputSettings];
[stillImageOutput setHighResolutionStillImageOutputEnabled: bTakeMaximumResolutionStillImage];

in - (void)captureStillImage: (void(^)(int result))handler
{
[stillImageOutput captureStillImageAsynchronouslyFromConnection:stillImageConnection completionHandler: ^(CMSampleBufferRef imageSampleBuffer, NSError *error)
{

     if (imageSampleBuffer)
     {
         NSData *imageData = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageSampleBuffer];
         UIImage *image = [[UIImage alloc] initWithData:imageData];

        .............
     }

}