开发者

Faster still image capture with AVFoundation

I use some code to capture still images from the camera. With my iPad2, it grabs 30 frames per second without any trouble, 开发者_C百科but with the iPhone4 only around 4 fps before the imagebuffer gets full. Is there any way to make it faster, I need at least 15 fps. I just save the images in an array, so maybe I just have to increase the imagesamplebuffer?

    [stillImageOutput captureStillImageAsynchronouslyFromConnection:videoConnection completionHandler: ^(CMSampleBufferRef imageSampleBuffer, NSError *error)
 {
     NSData *imageData = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageSampleBuffer];

     UIImage *image = [[UIImage alloc] initWithData:imageData];
     [arrCaptures addObject:image];
     [image release];
 }];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜