0

我正在使用GPUImage框架使用相机实时图像过滤器,我尝试执行以下代码部分但是它不起作用。

GPUImageStillCamera*stillCamera=[[GPUImageStillCamera alloc]initWithSessionPreset:AVCaptureSessionPreset640x480 cameraPosition:AVCaptureDevicePositionBack];
    stillCamera.outputImageOrientation=UIInterfaceOrientationPortrait;
    outputView=[[GPUImageView alloc]initWithFrame:CGRectMake(0.0, 0.0, self.view.frame.size.width, self.view.frame.size.height)];
    bright=[[GPUImageBrightnessFilter alloc]init];

[bright setBrightness:self.slider_change.value];
[self.previewView addSubview:outputView];
bright.brightness=1.0;
   self.slider_change.minimumValue=-3.0;
   self.slider_change.maximumValue=3.0;
[stillCamera addTarget:bright];
[bright addTarget:outputView];
[bright useNextFrameForImageCapture];
[stillCamera startCameraCapture];

我想知道我犯了什么错误。

提前致谢。

4

0 回答 0