brightness filter is not working in live image GPUImage framework objective c

75 Views Asked by At

I'm working with camera live image filters using GPUImage framework, I've tried to perform the following part of code however it doesn't work.

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];

I would like to know what mistake I have done.

Thanks in advance.

0

There are 0 best solutions below