我想从 iPhone 相机中获取连续帧并将其放在 UIImage 上。我已按照此链接中的代码进行操作
我的启动相机代码是
- (IBAction)luanchCamera:(id)sender
{
UIImagePickerController *controller=[[UIImagePickerController alloc]init];
controller.sourceType = UIImagePickerControllerSourceTypeCamera;
controller.mediaTypes =[NSArray arrayWithObject:(NSString *)kUTTypeMovie];
controller.showsCameraControls = YES;
imageFrameView=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0,1024,718)];
[controller.view addSubview:imageFrameView];
controller.view.backgroundColor=[UIColor clearColor];
controller.wantsFullScreenLayout=NO;
controller.cameraViewTransform = CGAffineTransformScale(controller.cameraViewTransform,0.25, 0.25);
[self setupCaptureSession];
[self presentViewController:controller animated:YES completion:nil];
}
但我只从视频中得到一帧我也删除了
// Assign session to an ivar.
[self setSession:session];
从我的代码。是否有必要启动我在 launchCamera 方法中编写的相机。如何从视频中获取连续帧?