ios - GPUImageFilterGroup is returning black image -


i have been working on day , unable find error is. first experience using gpuimage. following comments on issues in github questions have found here no luck.

my gpuimagefiltergroup returning black image, filters in group using individually work on own. trying edit saturation , levels on still image.

gpuimagefiltergroup* blackandwhitegroup = [[gpuimagefiltergroup alloc] init];  gpuimagesaturationfilter *satuaration = [[gpuimagesaturationfilter alloc] init]; [satuaration setsaturation:0.0];  gpuimagelevelsfilter *levels = [[gpuimagelevelsfilter alloc] init]; [levels setmin:56.0/255.0 gamma:1.15 max:255.0/255.0];  [blackandwhitegroup addfilter:satuaration]; [blackandwhitegroup addfilter:levels];  [satuaration addtarget:levels];  [blackandwhitegroup setinitialfilters:[nsarray arraywithobject:satuaration]]; [blackandwhitegroup setterminalfilter:levels]; 

i have tried 2 different ways applying filter image, neither working me think problem lies.

first attempt:

gpuimagepicture *stillimage= [[gpuimagepicture alloc] initwithimage:takenphoto]; [stillimage addtarget:blackandwhitegroup]; [stillimage processimage];  uiimage *blackandwhitefilteredimage = [blackandwhitegroup imagefromcurrentframebuffer]; self.imageview.image = blackandwhitefilteredimage; 

second attempt:

uiimage *blackandwhitefilteredimage = [blackandwhitegroup imagebyfilteringimage:takenphoto]; self.imageview.image = blackandwhitefilteredimage; 

thanks in advance.

as stated in comment, need call:

[blackandwhitegroup usenextframeforimagecapture]; 

before calling:

[stillimage processimage]; 

this updated version of gpuimage library. hope helps out future questions!


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -