이제 아래와 같이 avfoundation을 사용하여 이미지를 캡처 할 수 있습니다. 그러나 이미지 (예 : 20 개 또는 30 개의 이미지)를 연속적으로 캡처하려면 어떻게해야합니까? 당신이 설명하는 시나리오가 가장 쉽게 타이머의 일종을 사용하여 해결 될 것iPhone에서 AVFoudation을 사용한 연속 캡처 이미지
:
[stillImageOutput captureStillImageAsynchronouslyFromConnection:videoConnection completionHandler: ^(CMSampleBufferRef imageSampleBuffer, NSError *error)
{
CFDictionaryRef exifAttachments = CMGetAttachment(imageSampleBuffer, kCGImagePropertyExifDictionary, NULL);
if (exifAttachments)
{
// Do something with the attachments.
NSLog(@"attachements: %@", exifAttachments);
}
else
NSLog(@"no attachments");
NSData *imageData = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageSampleBuffer];
UIImage *image = [[UIImage alloc] initWithData:imageData];
// use the image
}];
(D) SLR의 "버스트 (burst)"모드와 같은 것을 의미합니까? – danyowdee
아니요, danyowdee. 나는 단지 하나의 이미지를 찍고, 나중에 또 다른 1 초를 찍고 싶다. –