亮度滤镜在实时图像GPUImage框架目标c中不起作用

时间:2016-04-26 17:43:47

标签: objective-c gpuimagestillcamera

我正在使用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];

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

提前致谢。

0 个答案:

没有答案