2011년 12월 7일 수요일

CIFilter for iOS 5.0


CIColorControls

Adjusts saturation, brightness, and contrast values.
Parameters
inputImage
CIImage class whose display name is Image.
inputSaturation
An NSNumber class whose attribute type is CIAttributeTypeScalar and whose display name is Saturation.
Default value: 1.00 Minimum: 0.00 Maximum: 2.00 Slider minimum: 0.00 Slider maximum: 2.00 Identity: 1.00
inputBrightness
An NSNumber class whose attribute type is CIAttributeTypeScalar and whose display name is Brightness.
Default value: 0.00 Minimum: -1.00 Maximum: 1.00 Slider minimum: -1.00 Slider maximum: 1.00 Identity: 0.00
inputContrast
An NSNumber class whose attribute type is CIAttributeTypeScalar and whose display name is Contrast.
Default value: 1.00 Minimum: 0.00 Maximum: 4.00 Slider minimum: 0.00 Slider maximum: 4.00 Identity: 1.00
Discussion
To calculate saturation, this filter linearly interpolates between a grayscale image (saturation = 0.0) and the original image (saturation = 1.0). The filter supports extrapolation: For values large than 1.0, it increases saturation.
To calculate contrast, this filter uses the following formula:
(color.rgb - vec3(0.5)) * contrast + vec3(0.5)
This filter calculates brightness by adding a bias value:
color.rgb + vec3(brightness)
Member of
CICategoryBuiltInCICategoryNonSquarePixelsCICategoryInterlacedCICategoryStillImageCICategoryVideo,CICategoryColorAdjustment
Localized Display Name
Color Controls

Figure 18  The result of using the CIColorControls filter
The result of using the CIColorControls filter

Availability
  • Available in Mac OS X v10.4 and later and in iOS 5.0 and later.


CIColorMatrix

Multiplies source color values and adds a bias factor to each color component.
Parameters
inputImage
CIImage class whose display name is Image.
inputRVector
CIVector class whose display name is Red Vector.
Default value: [1 0 0 0] Identity: [1 0 0 0]
inputGVector
CIVector class whose display name is Green Vector.
Default value: [0 1 0 0] Identity: [0 1 0 0]
inputBVector
CIVector class whose display name is Blue Vector.
Default value: [0 0 1 0] Identity: [0 0 1 0]
inputAVector
CIVector class whose display name is Alpha Vector.
Default value: [0 0 0 1] Identity: [0 0 0 1]
inputBiasVector
CIVector class whose display name is Bias Vector.
Default value: [0 0 0 0] Identity: [0 0 0 0]
Discussion
This filter performs a matrix multiplication, as follows, to transform the color vector:
s.r = dot(s, redVector)
s.g = dot(s, greenVector)
s.b = dot(s, blueVector)
s.a = dot(s, alphaVector)
s = s + bias
Member of
CICategoryBuiltInCICategoryNonSquarePixelsCICategoryInterlacedCICategoryStillImageCICategoryVideo,CICategoryColorAdjustment
Localized Display Name
Color Matrix

Figure 23  The result of using the CIColorMatrix filter
The result of using the CIColorMatrix filter

Availability
  • Available in Mac OS X v10.4 and later and in iOS 5.0 and later.



CICrop

Applies a crop to an image.
Parameters
inputImage
CIImage class whose display name is Image.
inputRectangle
CIVector class whose attribute type is CIAttributeTypeRectangle and whose display name is Rectangle.
Default value: [0 0 300 300] Identity: (null)
Discussion
The size and shape of the cropped image depend on the rectangle you specify.
Member of
CICategoryBuiltInCICategoryStillImageCICategoryVideoCICategoryGeometryAdjustment
Localized Display Name
Crop

Figure 29  The result of using the CICrop filter
The result of using the CICrop filter

Availability
  • Available in Mac OS X v10.4 and later and in iOS 5.0 and later.



CIExposureAdjust

Adjusts the exposure setting for an image similar to the way you control exposure for a camera when you change the F-stop.
Parameters
inputImage
CIImage class whose display name is Image.
inputEV
An NSNumber class whose attribute type is CIAttributeTypeScalar and whose display name is EV.
Default value: 0.50 Minimum: 0.00 Maximum: 0.00 Slider minimum: -10.00 Slider maximum: 10.00 Identity: 0.00
Discussion
This filter multiplies the color values, as follows, to simulate exposure change by the specified F-stops:
s.rgb * pow(2.0, ev)
Member of
CICategoryBuiltInCICategoryNonSquarePixelsCICategoryInterlacedCICategoryStillImageCICategoryVideo,CICategoryColorAdjustment
Localized Display Name
Exposure Adjust

Figure 42  The result of using the CIExposureAdjust filter
The result of using the CIExposureAdjust filter

Availability
  • Available in Mac OS X v10.4 and later and in iOS 5.0 and later.




CIGammaAdjust

Adjusts midtone brightness.
Parameters
inputImage
CIImage class whose display name is Image.
inputPower
An NSNumber class whose attribute type is CIAttributeTypeScalar and whose display name is Power.
Default value: 0.75 Minimum: 0.00 Maximum: 0.00 Slider minimum: 0.10 Slider maximum: 3.00 Identity: 1.00
Discussion
This filter is typically used to compensate for nonlinear effects of displays. Adjusting the gamma effectively changes the slope of the transition between black and white. It uses the following formula:
pow(s.rgb, vec3(power))
Member of
CICategoryBuiltInCICategoryNonSquarePixelsCICategoryInterlacedCICategoryStillImageCICategoryVideo,CICategoryColorAdjustment
Localized Display Name
Gamma Adjust

Figure 48  The result of using the CIGammaAdjust filter
The result of using the CIGammaAdjust filter

Availability
  • Available in Mac OS X v10.4 and later and in iOS 5.0 and later.



CIHighlightShadowAdjust

Adjust the tonal mapping of an image while preserving spatial detail.
Parameters
inputImage
CIImage class whose display name is Image.
inputHighlightAmount
An NSNumber class whose attribute type is CIAttributeTypeScalar and whose display name is Highlight Amount.
Default value: 1.00 Minimum: 0.00 Maximum: 1.00 Slider minimum: 0.00 Slider maximum: 1.00 Identity: 1.00
inputShadowAmount
An NSNumber class whose attribute type is CIAttributeTypeScalar and whose display name is Shadow Amount.
Default value: 0.00 Minimum: -1.00 Maximum: 1.00 Slider minimum: -1.00 Slider maximum: 1.00 Identity: 0.00
Member of
CICategoryBuiltInCICategoryStillImageCICategoryVideoCICategoryStylize
Localized Display Name
Highlight and Shadows

Figure 59  The result of using the CIHighlightShadowAdjust filter
The result of using the CIHexagonalPixellate filter

Availability
  • Available in Mac OS X v10.4 and later and in iOS 5.0 and later.



CIHueAdjust

Changes the overall hue, or tint, of the source pixels.
Parameters
inputImage
CIImage class whose display name is Image.
inputAngle
An NSNumber class whose attribute type is CIAttributeTypeAngle and whose display name is Angle.
Default value: 0.00 Minimum: 0.00 Maximum: 0.00 Slider minimum: -3.14 Slider maximum: 3.14 Identity: 0.00
Discussion
This filter essentially rotates the color cube around the neutral axis.
Member of
CICategoryBuiltInCICategoryNonSquarePixelsCICategoryInterlacedCICategoryStillImageCICategoryVideo,CICategoryColorAdjustment
Localized Display Name
Hue Adjust

Figure 61  The result of using the CIHueAdjust filter
The result of using the CIHueAdjust filter

Availability
  • Available in Mac OS X v10.4 and later and in iOS 5.0 and later.


CISepiaTone

Maps the colors of an image to various shades of brown.
Parameters
inputImage
CIImage class whose display name is Image.
inputIntensity
An NSNumber class whose attribute type is CIAttributeTypeScalar and whose display name is Intensity.
Default value: 1.00 Minimum: 0.00 Maximum: 0.00 Slider minimum: 0.00 Slider maximum: 1.00 Identity: 0.00
Member of
CICategoryBuiltInCICategoryStillImageCICategoryNonSquarePixelsCICategoryInterlacedCICategoryVideo,CICategoryColorEffect
Localized Display Name
Sepia Tone

Figure 94  The result of using the CISepiaTone filter
The result of using the CISepiaTone filter

Availability
  • Available in Mac OS X v10.4 and later and in iOS 5.0 and later.



CITemperatureAndTint

Adapts the reference white point for an image.
Parameters
inputImage
CIImage class whose display name is Image.
inputNeutral
CIVector class whose attribute type is CIAttributeTypeOffset and whose display name is Neutral.
Default value: [6500, 0] Identity: [6500, 0]
inputTargetNeutral
CIVector class whose attribute type is CIAttributeTypeOffset and whose display name is TargetNeutral
Default value: [6500, 0] Identity: [6500, 0]
Member of
CICategoryBuiltInCICategoryNonSquarePixelsCICategoryInterlacedCICategoryStillImageCICategoryVideo,CICategoryColorAdjustment
Localized Display Name
Temperature and Tint

Figure 111  The result of using the CITemperatureAndTint filter

Availability
  • Available in Mac OS X v10.4 and later and in iOS 5.0 and later.


CIToneCurve

Adjusts tone response of the R, G, and B channels of an image.
Parameters
inputImage
CIImage class whose display name is Image.
inputPoint0
CIVector class whose attribute type is CIAttributeTypeOffset and whose display name is Point 1.
Default value: [0, 0] Identity: [0, 0]
inputPoint1
CIVector class whose attribute type is CIAttributeTypeOffset and whose display name is Point 2l
Default value: [0.25, 0.25] Identity: [0.25, 0.25]
inputPoint2
CIVector class whose attribute type is CIAttributeTypeOffset and whose display name is Point 3l
Default value: [0.5, 0.5] Identity: [0.5, 0.5]
inputPoint3
CIVector class whose attribute type is CIAttributeTypeOffset and whose display name is Point 4
Default value: [0.75, 0.75] Identity: [0.75, 0.75]
inputPoint4
CIVector class whose attribute type is CIAttributeTypeOffset and whose display name is Point 5
Default value: [1, 1] Identity: [1, 1]
Discussion
The input points are five x,y values that are interpolated using a spline curve. The curve is applied in a perceptual (gamma 2) version of the working space.
Member of
CICategoryBuiltInCICategoryNonSquarePixelsCICategoryInterlacedCICategoryStillImageCICategoryVideo,CICategoryColorAdjustment
Localized Display Name
Tone Curve

Figure 112  The result of using the CIToneCurve filter
The result of using the CIHueAdjust filter

Availability
  • Available in Mac OS X v10.4 and later and in iOS 5.0 and later.



CIVibrance

Adjusts the saturation of an image while keeping pleasing skin tones.
Parameters
inputImage
CIImage class whose display name is Image.
inputAmount
An NSNumber class whose attribute type is CIAttributeTypeScalar and whose display name is Amount.
Default value: 0.00 Minimum: -1.00 Maximum: 1.00 Slider minimum: -1.00 Slider maximum: 1.00 Identity: 0.00
Member of
CICategoryBuiltInCICategoryNonSquarePixelsCICategoryInterlacedCICategoryStillImageCICategoryVideo,CICategoryColorAdjustment
Localized Display Name
Vibrance

Figure 118  The result of using the CIVibrance filter
The result of using the CIHueAdjust filter

Availability
  • Available in Mac OS X v10.4 and later and in iOS 5.0 and later.


CIWhitePointAdjust

Adjusts the reference white point for an image and maps all colors in the source using the new reference.
Parameters
inputImage
CIImage class whose display name is Image.
inputColor
CIColor class whose display name is Color.
Member of
CICategoryBuiltInCICategoryNonSquarePixelsCICategoryInterlacedCICategoryStillImageCICategoryVideo,CICategoryColorAdjustment
Localized Display Name
White Point Adjust

Figure 120  The result of using the CIWhitePointAdjust filter
The result of using the CIWhitePointAdjust filter

Availability
  • Available in Mac OS X v10.4 and later and in iOS 5.0 and later.