ios - GPUImageHistogramFilter for a still image giving zero data -
is very similar, except I still want to create a histogram for the image.
What I'm doing below, and it's giving histogram with all 0 data. There is some trick to getting this work done for
GPUImageFilter * filters = [[GPUImageHistogramFilter alloc] initWithHistogramType: kGPUImageHistogramRGB]; GPUImagePicture * Basic = [[[GPUImagePicture alloc] initWithImage: image] autorelease]; GPUImageGammaFilter * gammaFilter = [[GPUImageGammaFilter alloc] init]; [Basic addTarget: GammaFilter]; [GammaFilterAditag: Filters]; GPUImageHistogramGenerator * Histogram Graph = [[GPUImageHistogramGenerator alloc] init]; [Histogram Graph Force Processing Etsis: CGSizeMake (256.0, 330.0)]; [Filter addTarget: histogram graph]; GPUImageAlphaBlendFilter * blendFilter = [[GPUImageAlphaBlendFilter alloc] init]; BlendFilter.mix = 0.75; [Mix filter force processing atas: CGSizeMake (256.0, 330.0)]; [Original addTarget: blendFilter]; [Histogram graph addTarget: blendFilter]; [Mix filter add-target: GPU image view]; [Basic process image]; To improve memory management, Broad has changed some internal mechanisms for GPUImage (and does so)
-useNextFrameForImageCapture UIImage * inputImage = [UIImage imageNamed: "@LambieU.JPG "]; GPUImagePicture * stillImageSource = [[GPUImagePicture alloc] initWithImage: inputImage]; GPUImageSepiaFilter * stillImageFilter = [[GPUImageSepiaFilter alloc] init]; [StillImageSource addTarget: stillImageFilter]; [StillImageFilter useNextFrameForImageCapture] [stillImageSource processImage]; UIImage * current filterVideoFrame = [still image filter image mainframebuffer];
Comments
Post a Comment