CICategoryColorAdjustment 类别下的滤镜主要处理色彩调整,比如伽马调整、白点调整、曝光
下面是对各种滤镜效果的展示
CIColorClamp 在制定范围修改颜色值
调整值
[filter setValue:[CIVector vectorWithX:0.9 Y:0.3 Z:0.6 W:1] forKey:@"inputMaxComponents"];
[filter setValue:[CIVector vectorWithX:0.5 Y:0.2 Z:0.4 W:0] forKey:@"inputMinComponents"];
效果如下

CIColorControls 调整饱和度,亮度和对比度值。 饱和度亮度和对比度默认是1
[filter setValue:@0.4 forKey:@"inputSaturation"];//调整饱和度
效果如下

[filter setValue:@0.4 forKey:@"inputContrast"];//调整对比度
效果如下

[filter setValue:@0.4 forKey:@"inputBrightness"];//调整亮度
效果如下

CIColorMatrix 调整RGB值

参数分别是rgb值和透明度、偏移量
[filter setValue:[CIVector vectorWithX:0.5 Y:0.2 Z:0.4 W:0] forKey:@"inputRVector"];
效果如下

CIColorPolynomial修改图像像素
参数 红色系数 绿色系数 蓝色系数 阿尔法系数

[filter setValue:[CIVector vectorWithX:0.5 Y:0.2 Z:0.4 W:0] forKey:@"inputBlueCoefficients"];
效果如下

CIExposureAdjust 调整曝光
[filter setValue:@0.4 forKey:@"inputEV"];
效果如下

CIGammaAdjust 调整中间色调的亮度
[filter setValue:@0.4 forKey:@"inputPower"];
效果如下

CIHueAdjust 更改色调色彩源像素
[filter setValue:@0.4 forKey:@"inputAngle"];
效果如下

CILinearToSRGBToneCurve 根据伽马曲线调整RGB颜色
效果如下

CISRGBToneCurveToLinear 从sRGB色彩空间到线性伽马曲线映射颜色强度。
效果如下

CITemperatureAndTint
将图像适应基准白点。

[filter setValue:[CIVector vectorWithX:3000 Y:0] forKey:@"inputTargetNeutral"];
[filter setValue:[CIVector vectorWithX:1000 Y:0] forKey:@"inputNeutral"];
效果如下

CIToneCurve 调整的图像的R,G和B通道的响应。

[filter setValue:[CIVector vectorWithX:0.3 Y:0.8] forKey:@"inputPoint3"];
效果如下

CIVibrance 调整图像的饱和度,同时保持令人愉悦的肤色。
[filter setValue:@0.4 forKey:@"inputAmount"];
效果如下

CIWhitePointAdjust 调整参考点和所有颜色映射当做新的参考点
[filter setValue:[CIColor colorWithRed:0.3 green:0.6 blue:0.9 alpha:0.8] forKey:@"inputColor"];
效果如下

网友评论