0
所以我剛剛發現gpuImage &我試圖做一些基本的視頻濾波作爲每gpuimage github readme ....GPUImage攝像機ImageView的是黑色
我已經或多或少地複製它們的代碼相同,但是當我將gpuImageView作爲子視圖添加到我的ViewController時,它只會顯示爲黑屏。任何人都可以闡明爲什麼圖像不會出現?謝謝!!!
GPUImageVideoCamera *videoCamera = [[GPUImageVideoCamera alloc]
initWithSessionPreset:AVCaptureSessionPreset640x480
cameraPosition:AVCaptureDevicePositionBack];
videoCamera.outputImageOrientation = UIInterfaceOrientationPortrait;
GPUImageSepiaFilter *filter = [[GPUImageSepiaFilter alloc] init];
[filter setIntensity: 0.5];
GPUImageView *filteredVideoView = [[GPUImageView alloc] initWithFrame:self.view.frame];
[videoCamera addTarget:filter];
[filter addTarget:filteredVideoView];
[self.view addSubview:filteredVideoView];
[videoCamera startCameraCapture];