美文网首页iOS iOS框架集合程序员
GPUImage2(三)滤镜大全:色彩调校

GPUImage2(三)滤镜大全:色彩调校

作者: Willie_ | 来源:发表于2017-02-17 18:22 被阅读1960次

    本文所有示例代码或Demo可以在此获取:https://github.com/WillieWangWei/SampleCode_GPUImage2_FilterList.git

    如果本文对你有所帮助,请给个Star👍

    相关文章
    GPUImage2(一)集成与使用
    GPUImage2(二)滤镜大全:图像生成
    GPUImage2(四)滤镜大全:图像处理
    GPUImage2(五)滤镜大全:混合模式
    GPUImage2(六)滤镜大全:视觉特效

    概述


    本篇枚举GPUImage2内置滤镜中的所有的色彩调校类别,并对其效果及参数进行简要说明,供选择参考。

    色彩调校


    共29类

    • BrightnessAdjustment
    • ExposureAdjustment
    • ContrastAdjustment
    • SaturationAdjustment
    • GammaAdjustment
    • LevelsAdjustment
    • ColorMatrixFilter
    • RGBAdjustment
    • HueAdjustment
    • WhiteBalance
    • HighlightsAndShadows
    • LookupFilter
    • AmatorkaFilter
    • MissEtikateFilter
    • ColorInversion
    • MonochromeFilter
    • FalseColor
    • Haze
    • SepiaToneFilter
    • OpacityAdjustment
    • LuminanceThreshold
    • AverageColorExtractor
    • AverageLuminanceExtractor
    • ChromaKeying
    • Vibrance
    • HighlightAndShadowTint
    • SoftElegance
    • AdaptiveThreshold
    • AverageLuminanceThreshold

    前26类继承自BasicOperation,后3类继承自OperationGroup,均遵循ImageProcessingOperation协议,可以作为图像数据的提供者和接收者使用。

    BrightnessAdjustment

    调整图像的亮度。
    brightness:Float 调整后的亮度,取值[-1.0, 1.0],默认为0.0。

    BrightnessAdjustment
    ExposureAdjustment

    调整图像的曝光。
    exposure:Float 调整曝光,取值[-10.0, 10.0],默认0.0.

    ExposureAdjustment
    ContrastAdjustment

    调整图像的对比度。
    contrast:Float 调整的对比度,取值[0.0, 4.0],默认1.0。

    ContrastAdjustment
    SaturationAdjustment

    调整图像的饱和度
    saturation:Float 饱和度,取值[0.0, 2.0],默认1.0。

    SaturationAdjustment
    GammaAdjustment

    调整图像的灰度
    gamma:Float 要调整的灰度,取值[0.0, 3.0],默认1.0。

    GammaAdjustment
    LevelsAdjustment

    类Photoshop调整色阶。
    minimum:Color
    middle:Color
    maximum:Color
    minOutput:Color
    maxOutput:Color
    所有Color实例的RGB取值[0.0, 1.0]。

    LevelsAdjustment
    ColorMatrixFilter

    使用矩阵转换颜色。
    intensity:Float 新颜色替换每个像素的原始颜色的程度。
    colorMatrix:Matrix4x4 一个4x4矩阵,用于变换图像中的每种颜色

    ColorMatrixFilter
    RGBAdjustment

    调整图像的RGB通道。
    red:Float
    blue:Float
    green:Float
    取值[0.0, ∞),默认为1.0。

    RGBAdjustment
    HueAdjustment

    调整色调。
    hue:Float 色调,以度为单位。默认90。

    HueAdjustment
    WhiteBalance

    调整白平衡
    temperature:Float 以ºK为单位调整图像的温度,取值[4000.0, 7000.0]。4000是非常冷,7000是非常温暖。默认5000。4000和5000之间的比例与5000和7000之间的比例几乎相等。
    tint:Float 取值[-200.0, 200.0],值为-200非常绿色,200非常粉红色。默认值为0。

    WhiteBalance
    HighlightsAndShadows

    高光和阴影
    shadows:Float 调整阴影,取值[0.0, 1.0],默认0.0。
    highlights:Float 调整高光,取值[0.0, 1.0],默认1.0。

    HighlightsAndShadows
    LookupFilter

    使用RGB查找并重新映射图像中的颜色。
    lookupImage:PictureInput 目标图像
    intensity:Float 效果的强度,取值[0.0, 1.0],默认0.0。

    LookupFilter
    AmatorkaFilter

    基于Photoshop操作的Amatorka图像滤镜,继承自LookupFilter
    http://amatorka.deviantart.com/art/Amatorka-Action-2-121069631

    AmatorkaFilter
    MissEtikateFilter

    Miss Etikate制作的基于Photoshop操作的滤,继承自LookupFilter
    http://miss-etikate.deviantart.com/art/Photoshop-Action-15-120151961

    MissEtikateFilter
    SoftElegance

    一个基于lookup的颜色重映射滤镜,继承自LookupFilter

    SoftElegance
    ColorInversion

    反色。


    ColorInversion
    MonochromeFilter

    根据图像的像素亮度将其转换成单色。
    intensity:Float 转换的程度,取值[0.0, 1.0],默认1.0。
    color:Color 效果的基础颜色。默认(0.6,0.45,0.3,1.0)。

    MonochromeFilter
    FalseColor

    使用图像的亮度在两个用户指定的颜色之间混合。
    firstColor:Color 代表暗区的颜色。
    secondColor:Color 代表亮区的颜色。

    FalseColor
    Haze

    用于添加或去除雾度(类似于UV过滤器)。
    distance:Float 应用的颜色的强度,取值[-0.3, 0.3],默认0.0。
    slope:Float 颜色变化量,取值[-0.3, 0.3],默认0.0。

    Haze
    SepiaToneFilter

    简单的棕褐色滤镜。
    intensity:Float 滤镜的程度,取值[0.0, 1.0],默认0.0。

    SepiaToneFilter
    OpacityAdjustment

    调整传入图像的alpha通道。
    opacity:Float 每个像素的alpha通道乘以的系数,取值[0.0, 1.0],默认0.0。

    OpacityAdjustment
    LuminanceThreshold

    亮度阈值。亮度高于阈值的像素将显示为白色,低于的像素将显示为黑色。
    threshold:Float 亮度阈值,取值[0.0, 1.0],默认0.5。

    LuminanceThreshold
    AdaptiveThreshold

    自适应阈值。确定像素周围的局部亮度,然后如果像素低于该局部亮度则将像素变为黑色,如果高于则为白色。这可以用于在不同的照明条件下挑选文本。
    blurRadiusInPixels:Float 背景平均模糊半径(以像素为单位)的系数,默认4.0。

    AdaptiveThreshold
    AverageLuminanceThreshold

    平均亮度阈值。其阈值是基于场景平均亮度的连续调整。
    thresholdMultiplier:Float 平均亮度乘以的系数,默认1.0。

    AverageLuminanceThreshold
    AverageColorExtractor

    通过对图像中每个像素的RGBA分量求平均值来确定场景的平均颜色。


    AverageColorExtractor
    AverageLuminanceThreshold

    AverageColorExtractor类似,将图像减少到其平均亮度。

    AverageLuminanceThreshold
    ChromaKeying

    将给定颜色的alpha通道设置为0。
    thresholdSensitivity:Float 颜色匹配需要与要替换的目标颜色存在的差异,默认0.4。
    smoothing:Float 匹配的平滑度,默认0.1。
    colorToReplace:Color 要替换的颜色,默认green

    ChromaKeying
    Vibrance

    调整图像的动态
    vibrance:Float 取值[-1.2, 1.2],默认1.2。

    Vibrance
    HighlightAndShadowTint

    用颜色和强度独立地对图像的阴影和高光进行着色。
    shadowTintIntensity:Float 阴影色调强度,取值[0.0, 1.0],默认0.0。
    highlightTintIntensity:Float 高光影色调强度,取值[0.0, 1.0],默认0.0。
    shadowTintColor:Color 阴影色调RGB颜色(GPUVector4)。默认red。
    highlightTintColor:Color 高光色调RGB颜色(GPUVector4)。默认blue。

    HighlightAndShadowTint

    本文所有示例代码或Demo可以在此获取:https://github.com/WillieWangWei/SampleCode_GPUImage2_FilterList.git

    如果本文对你有所帮助,请给个Star👍

    相关文章
    GPUImage2(一)集成与使用
    GPUImage2(二)滤镜大全:图像生成
    GPUImage2(四)滤镜大全:图像处理
    GPUImage2(五)滤镜大全:混合模式
    GPUImage2(六)滤镜大全:视觉特效

    相关文章

      网友评论

      • devzhaoyou:博主写的这一系列文章不容易,非常感谢
      • miku酱啦:感谢博主无私分享~期待以后能阅读更优秀的内容~
      • __Mr_Xie__:SoftElegance这个类不是继承自LookupFilter吧 应该是继承自OperationGroup

      本文标题:GPUImage2(三)滤镜大全:色彩调校

      本文链接:https://www.haomeiwen.com/subject/ysufwttx.html