GPUImage 简介

GitHub源地址:https://github.com/BradLarson/GPUImage 

  • GPUImageBrightnessFilter: Adjusts the brightness of the image

    • brightness: The adjusted brightness (-1.0 - 1.0, with 0.0 as the default)

    • (亮度过滤器)

  • GPUImageExposureFilter: Adjusts the exposure of the image

    • exposure: The adjusted exposure (-10.0 - 10.0, with 0.0 as the default)

    • (曝光过滤器)

  • GPUImageContrastFilter: Adjusts the contrast of the image

    • contrast: The adjusted contrast (0.0 - 4.0, with 1.0 as the default)

    • (对比度过滤器)

  • GPUImageSaturationFilter: Adjusts the saturation of an image

    • saturation: The degree of saturation or desaturation to apply to the image (0.0 - 2.0, with 1.0 as the default)

    • (饱和度过滤器)

  • GPUImageGammaFilter: Adjusts the gamma of an image

    • gamma: The gamma adjustment to apply (0.0 - 3.0, with 1.0 as the default)

    • (伽玛过滤器)

  • GPUImageColorMatrixFilter: Transforms the colors of an image by applying a matrix to them

    • colorMatrix: A 4x4 matrix used to transform each color in an image

    • intensity: The degree to which the new transformed color replaces the original color for each pixel

    • (彩色矩阵过滤器)

  • GPUImageRGBFilter: Adjusts the individual RGB channels of an image

    • red: Normalized values by which each color channel is multiplied. The range is from 0.0 up, with 1.0 as the default.

    • green:

    • blue:

    • (RGB过滤器)

  • GPUImageHueFilter: Adjusts the hue of an image

    • hue: The hue angle, in degrees. 90 degrees by default

    • (色调过滤器)

  • GPUImageToneCurveFilter: Adjusts the colors of an image based on spline curves for each color channel.

    • redControlPoints:

    • greenControlPoints:

    • blueControlPoints: The tone curve takes in a series of control points that define the spline curve for each color component. These are stored as NSValue-wrapped CGPoints in an NSArray, with normalized X and Y coordinates from 0 - 1. The defaults are (0,0), (0.5,0.5), (1,1).

    • (色调曲线过滤器)

  • GPUImageHighlightShadowFilter: Adjusts the shadows and highlights of an image

    • shadows: Increase to lighten shadows, from 0.0 to 1.0, with 0.0 as the default.

    • highlights: Decrease to darken highlights, from 0.0 to 1.0, with 1.0 as the default.

    • (高亮投影过滤器)

  • GPUImageLookupFilter: Uses an RGB color lookup image to remap the colors in an image. First, use your favourite photo editing application to apply a filter to lookup.png from GPUImage/framework/Resources. For this to work properly each pixel color must not depend on other pixels (e.g. blur will not work). If you need a more complex filter you can create as many lookup tables as required. Once ready, use your new lookup.png file as a second input for GPUImageLookupFilter.(查询过滤器)

  • GPUImageAmatorkaFilter: A photo filter based on a Photoshop action by Amatorka:http://amatorka.deviantart.com/art/Amatorka-Action-2-121069631 . If you want to use this effect you have to add lookup_amatorka.png from the GPUImage Resources folder to your application bundle.(Amatorka特效过滤器?)

  • GPUImageMissEtikateFilter: A photo filter based on a Photoshop action by Miss Etikate:http://miss-etikate.deviantart.com/art/Photoshop-Action-15-120151961 . If you want to use this effect you have to add lookup_miss_etikate.png from the GPUImage Resources folder to your application bundle.(MissEtikate特效过滤器?)

  • GPUImageSoftEleganceFilter: Another lookup-based color remapping filter. If you want to use this effect you have to add lookup_soft_elegance_1.png and lookup_soft_elegance_2.png from the GPUImage Resources folder to your application bundle.(柔化过滤器)

  • GPUImageColorInvertFilter: Inverts the colors of an image(滤色过滤器)

  • GPUImageGrayscaleFilter: Converts an image to grayscale (a slightly faster implementation of the saturation filter, without the ability to vary the color contribution)(灰度过滤器)

  • GPUImageMonochromeFilter: Converts the image to a single-color version, based on the luminance of each pixel

    • intensity: The degree to which the specific color replaces the normal image color (0.0 - 1.0, with 1.0 as the default)

    • color: The color to use as the basis for the effect, with (0.6, 0.45, 0.3, 1.0) as the default.

    • (单色过滤器)

  • GPUImageFalseColorFilter: Uses the luminance of the image to mix between two user-specified colors

    • firstColor: The first and second colors specify what colors replace the dark and light areas of the image, respectively. The defaults are (0.0, 0.0, 0.5) amd (1.0, 0.0, 0.0).

    • secondColor:

    • (伪色过滤器)

  • GPUImageSepiaFilter: Simple sepia tone filter

    • intensity: The degree to which the sepia tone replaces the normal image color (0.0 - 1.0, with 1.0 as the default)

    • (棕褐色过滤器)

  • GPUImageOpacityFilter: Adjusts the alpha channel of the incoming image

    • opacity: The value to multiply the incoming alpha channel for each pixel by (0.0 - 1.0, with 1.0 as the default)

    • (透明度过滤器)

  • GPUImageSolidColorGenerator: This outputs a generated image with a solid color. You need to define the image size using -forceProcessingAtSize:

    • color: The color, in a four component format, that is used to fill the image.

    • (纯色生成器)

  • GPUImageLuminanceThresholdFilter: Pixels with a luminance above the threshold will appear white, and those below will be black

    • threshold: The luminance threshold, from 0.0 to 1.0, with a default of 0.5

    • (亮度阈值过滤器)

  • GPUImageAdaptiveThresholdFilter: Determines the local luminance around a pixel, then turns the pixel black if it is below that local luminance and white if above. This can be useful for picking out text under varying lighting conditions.(自适应过滤器)

  • GPUImageAverageLuminanceThresholdFilter: This applies a thresholding operation where the threshold is continually adjusted based on the average luminance of the scene.

    • thresholdMultiplier: This is a factor that the average luminance will be multiplied by in order to arrive at the final threshold to use. By default, this is 1.0.(平均亮度阈值过滤器)

  • GPUImageHistogramFilter: This analyzes the incoming image and creates an output histogram with the frequency at which each color value occurs. The output of this filter is a 3-pixel-high, 256-pixel-wide image with the center (vertical) pixels containing pixels that correspond to the frequency at which various color values occurred. Each color value occupies one of the 256 width positions, from 0 on the left to 255 on the right. This histogram can be generated for individual color channels (kGPUImageHistogramRed, kGPUImageHistogramGreen, kGPUImageHistogramBlue), the luminance of the image (kGPUImageHistogramLuminance), or for all three color channels at once (kGPUImageHistogramRGB).

    • downsamplingFactor: Rather than sampling every pixel, this dictates what fraction of the image is sampled. By default, this is 16 with a minimum of 1. This is needed to keep from saturating the histogram, which can only record 256 pixels for each color value before it becomes overloaded.

    • (直方图过滤器)

  • GPUImageHistogramGenerator: This is a special filter, in that it's primarily intended to work with the GPUImageHistogramFilter. It generates an output representation of the color histograms generated by GPUImageHistogramFilter, but it could be repurposed to display other kinds of values. It takes in an image and looks at the center (vertical) pixels. It then plots the numerical values of the RGB components in separate colored graphs in an output texture. You may need to force a size for this filter in order to make its output visible.(直方图生成器)

  • GPUImageAverageColor: This processes an input image and determines the average color of the scene, by averaging the RGBA components for each pixel in the image. A reduction process is used to progressively downsample the source image on the GPU, followed by a short averaging calculation on the CPU. The output from this filter is meaningless, but you need to set the colorAverageProcessingFinishedBlock property to a block that takes in four color components and a frame time and does something with them.(图像平均颜色过滤器)

  • GPUImageLuminosity: Like the GPUImageAverageColor, this reduces an image to its average luminosity. You need to set the luminosityProcessingFinishedBlock to handle the output of this filter, which just returns a luminosity value and a frame time.(光度过滤器)

  • GPUImageChromaKeyFilter: For a given color in the image, sets the alpha channel to 0. This is similar to the GPUImageChromaKeyBlendFilter, only instead of blending in a second image for a matching color this doesn't take in a second image and just turns a given color transparent.

    • thresholdSensitivity: How close a color match needs to exist to the target color to be replaced (default of 0.4)

    • smoothing: How smoothly to blend for the color match (default of 0.1)

    • (色度键过滤器过滤器)

原文地址:https://www.cnblogs.com/yingkong1987/p/2965278.html