I am using the following code for exposure adjustment and its working. I need the filter names for sharpen, denoise, highlighs, color temperature, shadows, blur, etc.
[CIFilter filterWithName: #"CIExposureAdjust"
keysAndValues: #"inputImage", [_imageView image], nil];
I was writing to your earlier post link to all filters. I will repeat: link to all filters.
And for example You need Blur effect. Blur is category and have 7 filters:
CIBoxBlur
CIDiscBlur
CIGaussianBlur
CIMedianFilter
CIMotionBlur
CINoiseReduction
CIZoomBlur.
And etc..
I found the list of names in CIFilter class, core image filters. here is the link names in CIFilter and the list of the filters.
Filters
CICategoryBlur
CIBoxBlur
CIDiscBlur
CIGaussianBlur
CIMaskedVariableBlur
CIMedianFilter
CIMotionBlur
CINoiseReduction
CICategoryColorAdjustment
CIColorClamp
CIColorControls
CIColorMatrix
CIColorPolynomial
CIExposureAdjust
CIGammaAdjust
CIHueAdjust
CILinearToSRGBToneCurve
CISRGBToneCurveToLinear
CITemperatureAndTint
CIToneCurve
CIVibrance
CIWhitePointAdjust
CICategoryColorEffect
CIColorCrossPolynomial
CIColorCube
CIColorCubeWithColorSpace
CIColorInvert
CIColorMap
CIColorMonochrome
CIColorPosterize
CIFalseColor
CIMaskToAlpha
CIMaximumComponent
CIMinimumComponent
CIPhotoEffectChrome
CIPhotoEffectFade
CIPhotoEffectInstant
CIPhotoEffectMono
CIPhotoEffectNoir
CIPhotoEffectProcess
CIPhotoEffectTonal
CIPhotoEffectTransfer
CISepiaTone
CIVignette
CIVignetteEffect
CICategoryCompositeOperation
CIAdditionCompositing
CIColorBlendMode
CIColorBurnBlendMode
CIColorDodgeBlendMode
CIDarkenBlendMode
CIDifferenceBlendMode
CIDivideBlendMode
CIExclusionBlendMode
CIHardLightBlendMode
CIHueBlendMode
CILightenBlendMode
CILinearBurnBlendMode
CILinearDodgeBlendMode
CILuminosityBlendMode
CIMaximumCompositing
CIMinimumCompositing
CIMultiplyBlendMode
CIMultiplyCompositing
CIOverlayBlendMode
CIPinLightBlendMode
CISaturationBlendMode
CIScreenBlendMode
CISoftLightBlendMode
CISourceAtopCompositing
CISourceInCompositing
CISourceOutCompositing
CISourceOverCompositing
CISubtractBlendMode
CICategoryDistortionEffect
CIBumpDistortion
CIBumpDistortionLinear
CICircleSplashDistortion
CICircularWrap
CIDroste
CIDisplacementDistortion
CIGlassDistortion
CIGlassLozenge
CIHoleDistortion
CILightTunnel
CIPinchDistortion
CIStretchCrop
CITorusLensDistortion
CITwirlDistortion
CIVortexDistortion
CICategoryGenerator
CIAztecCodeGenerator
CICheckerboardGenerator
CICode128BarcodeGenerator
CIConstantColorGenerator
CILenticularHaloGenerator
CIPDF417BarcodeGenerator
CIQRCodeGenerator
CIRandomGenerator
CIStarShineGenerator
CIStripesGenerator
CISunbeamsGenerator
CICategoryGeometryAdjustment
CIAffineTransform
CICrop
CILanczosScaleTransform
CIPerspectiveCorrection
CIPerspectiveTransform
CIPerspectiveTransformWithExtent
CIStraightenFilter
CICategoryGradient
CIGaussianGradient
CILinearGradient
CIRadialGradient
CISmoothLinearGradient
CICategoryHalftoneEffect
CICircularScreen
CICMYKHalftone
CIDotScreen
CIHatchedScreen
CILineScreen
CICategoryReduction
CIAreaAverage
CIAreaHistogram
CIRowAverage
CIColumnAverage
CIHistogramDisplayFilter
CIAreaMaximum
CIAreaMinimum
CIAreaMaximumAlpha
CIAreaMinimumAlpha
CICategorySharpen
CISharpenLuminance
CIUnsharpMask
CICategoryStylize
CIBlendWithAlphaMask
CIBlendWithMask
CIBloom
CIComicEffect
CIConvolution3X3
CIConvolution5X5
CIConvolution7X7
CIConvolution9Horizontal
CIConvolution9Vertical
CICrystallize
CIDepthOfField
CIEdges
CIEdgeWork
CIGloom
CIHeightFieldFromMask
CIHexagonalPixellate
CIHighlightShadowAdjust
CILineOverlay
CIPixellate
CIPointillize
CIShadedMaterial
CISpotColor
CISpotLight
CICategoryTileEffect
CIAffineClamp
CIAffineTile
CIEightfoldReflectedTile
CIFourfoldReflectedTile
CIFourfoldRotatedTile
CIFourfoldTranslatedTile
CIGlideReflectedTile
CIKaleidoscope
CIOpTile
CIParallelogramTile
CIPerspectiveTile
CISixfoldReflectedTile
CISixfoldRotatedTile
CITriangleKaleidoscope
CITriangleTile
CITwelvefoldReflectedTile
CICategoryTransition
CIAccordionFoldTransition
CIBarsSwipeTransition
CICopyMachineTransition
CIDisintegrateWithMaskTransition
CIDissolveTransition
CIFlashTransition
CIModTransition
CIPageCurlTransition
CIPageCurlWithShadowTransition
CIRippleTransition
CISwipeTransition
All you need to do is ask CIFilter for the filter names. You can then ask each filter for its attributes, which returns a dictionary that describes each input and output parameter that the filter accepts.
NSArray* filters = [CIFilter filterNamesInCategories:nil];
for (NSString* filterName in filters)
{
NSLog(#"Filter: %#", filterName);
NSLog(#"Parameters: %#", [[CIFilter filterWithName:filterName] attributes]);
}
For example, this is the output of the above code for the CIZoomBlur filter:
Filter: CIZoomBlur
Parameters: {
CIAttributeDescription = "Simulates the effect of zooming the camera while capturing the image.";
CIAttributeFilterCategories = (
CICategoryBlur,
CICategoryVideo,
CICategoryStillImage,
CICategoryBuiltIn
);
CIAttributeFilterDisplayName = "Zoom Blur";
CIAttributeFilterName = CIZoomBlur;
CIAttributeReferenceDocumentation = "http://developer.apple.com/cgi-bin/apple_ref.cgi?apple_ref=//apple_ref/doc/filter/ci/CIZoomBlur";
inputAmount = {
CIAttributeClass = NSNumber;
CIAttributeDefault = 20;
CIAttributeDescription = "The zoom-in amount. Larger values result in more zooming in.";
CIAttributeDisplayName = Amount;
CIAttributeIdentity = 0;
CIAttributeMin = 0;
CIAttributeSliderMax = 200;
CIAttributeSliderMin = 0;
CIAttributeType = CIAttributeTypeDistance;
CIUIParameterSet = CIUISetBasic;
};
inputCenter = {
CIAttributeClass = CIVector;
CIAttributeDefault = "[150 150]";
CIAttributeDescription = "The x and y position to use as the center of the effect.";
CIAttributeDisplayName = Center;
CIAttributeType = CIAttributeTypePosition;
CIUIParameterSet = CIUISetBasic;
};
inputImage = {
CIAttributeClass = CIImage;
CIAttributeDescription = "The image to use as an input image. For filters that also use a background image, this is the foreground image.";
CIAttributeDisplayName = Image;
CIUIParameterSet = CIUISetBasic;
};
outputImage = {
CIAttributeClass = CIImage;
};
}
Most of the time, though, you'll probably just use the docs.
May be you can try following method of CIFilter class
+ (NSArray *)filterNamesInCategory:(NSString *)category
In Swift (4.2, at the time of writing this), you can use this code to get all filter names:
For filters in a specified category:
CIFilter.filterNames(inCategory: "Name_of_the_category")
For filters in specified categories:
CIFilter.filterNames(inCategories: ["Name_of_the_category_1", "Name_of_the_category_2"])
For filters in all categories, just pass nil either in inCategory or inCategories:
CIFilter.filterNames(inCategory: nil)
or
CIFilter.filterNames(inCategories: nil)
All the functions above returns an Array of the filter names in String values:
[
"CIAccordionFoldTransition",
"CIAdditionCompositing",
"CIAffineClamp",
"CIAffineTile",
"CIAffineTransform",
"CIAreaAverage",
"CIAreaHistogram"...
]
NSLog(#"Distortion: %#", [CIFilter filterNamesInCategory:kCICategoryDistortionEffect]);
NSLog(#"Blurs: %#", [CIFilter filterNamesInCategory:kCICategoryBlur]);
NSLog(#"Color effects: %#", [CIFilter filterNamesInCategory:kCICategoryColorEffect]);
NSLog(#"Color adjustment: %#", [CIFilter filterNamesInCategory:kCICategoryColorAdjustment]);
NSLog(#"Built-in effects: %#", [CIFilter filterNamesInCategory:kCICategoryBuiltIn]);
iOS 14, Swift 5
Must confess not easy to read, but an answer that is comparable to the first one on Objective C.
for filtername in filters {
print("filter \(filtername)")
print("attributes \(CIFilter.init(name: filtername)?.attributes.keys.description)")
}
Produces this ...
filter CIAccordionFoldTransition
attributes Optional("[\"inputImage\", \"CIAttributeFilterDisplayName\", \"inputTargetImage\", \"CIAttributeFilterAvailable_iOS\", \"CIAttributeFilterAvailable_Mac\", \"inputNumberOfFolds\", \"inputFoldShadowAmount\", \"inputBottomHeight\", \"CIAttributeReferenceDocumentation\", \"inputTime\", \"CIAttributeFilterCategories\", \"CIAttributeFilterName\"]")
filter CIAdditionCompositing
attributes Optional("[\"CIAttributeFilterCategories\", \"CIAttributeFilterName\", \"CIAttributeFilterDisplayName\", \"inputImage\", \"CIAttributeReferenceDocumentation\", \"CIAttributeFilterAvailable_iOS\", \"CIAttributeFilterAvailable_Mac\", \"inputBackgroundImage\"]")
So the info is there in these long strings, you just need to pick it out :)
Noah Gilmore has a very handy filter tool to demo and document almost all cifilters & filter parms..
See on the app store 'CIFilter.io'. He also has the same on the web site https://cifilter.io
iOS 14, Swift 5
Here you can find also array of the CIFilter functions which is supported with the protocol.
CIFilter.hueSaturationValueGradient(),
CIFilter.linearGradient(),
CIFilter.radialGradient(),
CIFilter.smoothLinearGradient(),
CIFilter.sharpenLuminance(),
CIFilter.unsharpMask(),
CIFilter.dotScreen(),
CIFilter.hatchedScreen(),
CIFilter.lineScreen(),
CIFilter.bicubicScaleTransform(),
CIFilter.edgePreserveUpsample(),
CIFilter.keystoneCorrectionCombined(),
CIFilter.keystoneCorrectionHorizontal(),
CIFilter.keystoneCorrectionVertical(),
CIFilter.lanczosScaleTransform(),
CIFilter.perspectiveCorrection(),
CIFilter.perspectiveRotate(),
CIFilter.perspectiveTransform(),
CIFilter.perspectiveTransformWithExtent(),
CIFilter.straighten(),
CIFilter.accordionFoldTransition(),
CIFilter.barsSwipeTransition(),
CIFilter.copyMachineTransition(),
CIFilter.disintegrateWithMaskTransition(),
CIFilter.dissolveTransition(),
CIFilter.flashTransition(),
CIFilter.modTransition(),
CIFilter.pageCurlTransition(),
CIFilter.pageCurlWithShadowTransition(),
CIFilter.rippleTransition(),
CIFilter.swipeTransition(),
CIFilter.additionCompositing(),
CIFilter.colorBlendMode(),
CIFilter.colorBurnBlendMode(),
CIFilter.colorDodgeBlendMode(),
CIFilter.darkenBlendMode(),
CIFilter.differenceBlendMode(),
CIFilter.divideBlendMode(),
CIFilter.exclusionBlendMode(),
CIFilter.hardLightBlendMode(),
CIFilter.hueBlendMode(),
CIFilter.lightenBlendMode(),
CIFilter.linearBurnBlendMode(),
CIFilter.linearDodgeBlendMode(),
CIFilter.luminosityBlendMode(),
CIFilter.maximumCompositing(),
CIFilter.minimumCompositing(),
CIFilter.multiplyBlendMode(),
CIFilter.multiplyCompositing(),
CIFilter.overlayBlendMode(),
CIFilter.pinLightBlendMode(),
CIFilter.saturationBlendMode(),
CIFilter.screenBlendMode(),
CIFilter.softLightBlendMode(),
CIFilter.sourceAtopCompositing(),
CIFilter.sourceInCompositing(),
CIFilter.sourceOutCompositing(),
CIFilter.sourceOverCompositing(),
CIFilter.subtractBlendMode(),
CIFilter.colorAbsoluteDifference(),
CIFilter.colorClamp(),
CIFilter.colorControls(),
CIFilter.colorMatrix(),
CIFilter.colorPolynomial(),
CIFilter.colorThreshold(),
CIFilter.colorThresholdOtsu(),
CIFilter.depthToDisparity(),
CIFilter.disparityToDepth(),
CIFilter.exposureAdjust(),
CIFilter.gammaAdjust(),
CIFilter.hueAdjust(),
CIFilter.linearToSRGBToneCurve(),
CIFilter.sRGBToneCurveToLinear(),
CIFilter.temperatureAndTint(),
CIFilter.toneCurve(),
CIFilter.vibrance(),
CIFilter.whitePointAdjust(),
CIFilter.colorCrossPolynomial(),
CIFilter.colorCube(),
CIFilter.colorCubesMixedWithMask(),
CIFilter.colorCubeWithColorSpace(),
CIFilter.colorCurves(),
CIFilter.colorInvert(),
CIFilter.colorMap(),
CIFilter.colorMonochrome(),
CIFilter.colorPosterize(),
CIFilter.dither(),
CIFilter.documentEnhancer(),
CIFilter.falseColor(),
CIFilter.labDeltaE(),
CIFilter.maskToAlpha(),
CIFilter.maximumComponent(),
CIFilter.minimumComponent(),
CIFilter.paletteCentroid(),
CIFilter.palettize(),
CIFilter.photoEffectChrome(),
CIFilter.photoEffectFade(),
CIFilter.photoEffectInstant(),
CIFilter.photoEffectMono(),
CIFilter.photoEffectNoir(),
CIFilter.photoEffectProcess(),
CIFilter.photoEffectTonal(),
CIFilter.photoEffectTransfer(),
CIFilter.sepiaTone(),
CIFilter.thermal(),
CIFilter.vignette(),
CIFilter.vignetteEffect(),
CIFilter.xRay(),
CIFilter.bumpDistortion(),
CIFilter.bumpDistortionLinear(),
CIFilter.circleSplashDistortion(),
CIFilter.circularWrap(),
CIFilter.displacementDistortion(),
CIFilter.droste(),
CIFilter.glassDistortion(),
CIFilter.glassLozenge(),
CIFilter.holeDistortion(),
CIFilter.lightTunnel(),
CIFilter.ninePartStretched(),
CIFilter.ninePartTiled(),
CIFilter.pinchDistortion(),
CIFilter.stretchCrop(),
CIFilter.torusLensDistortion(),
CIFilter.twirlDistortion(),
CIFilter.vortexDistortion(),
CIFilter.affineClamp(),
CIFilter.affineTile(),
CIFilter.eightfoldReflectedTile(),
CIFilter.fourfoldReflectedTile(),
CIFilter.fourfoldRotatedTile(),
CIFilter.fourfoldTranslatedTile(),
CIFilter.glideReflectedTile(),
CIFilter.kaleidoscope(),
CIFilter.opTile(),
CIFilter.parallelogramTile(),
CIFilter.perspectiveTile(),
CIFilter.sixfoldReflectedTile(),
CIFilter.sixfoldRotatedTile(),
CIFilter.triangleKaleidoscope(),
CIFilter.triangleTile(),
CIFilter.twelvefoldReflectedTile(),
CIFilter.attributedTextImageGenerator(),
CIFilter.aztecCodeGenerator(),
CIFilter.barcodeGenerator(),
CIFilter.checkerboardGenerator(),
CIFilter.code128BarcodeGenerator(),
CIFilter.lenticularHaloGenerator(),
CIFilter.meshGenerator(),
CIFilter.pdf417BarcodeGenerator(),
CIFilter.qrCodeGenerator(),
CIFilter.randomGenerator(),
CIFilter.roundedRectangleGenerator(),
CIFilter.starShineGenerator(),
CIFilter.stripesGenerator(),
CIFilter.sunbeamsGenerator(),
CIFilter.textImageGenerator(),
CIFilter.blendWithAlphaMask(),
CIFilter.blendWithBlueMask(),
CIFilter.blendWithMask(),
CIFilter.blendWithRedMask(),
CIFilter.bloom(),
CIFilter.comicEffect(),
CIFilter.convolution3X3(),
CIFilter.convolution5X5(),
CIFilter.convolution7X7(),
CIFilter.convolution9Horizontal(),
CIFilter.convolution9Vertical(),
CIFilter.coreMLModel(),
CIFilter.crystallize(),
CIFilter.depthOfField(),
CIFilter.edges(),
CIFilter.edgeWork(),
CIFilter.gaborGradients(),
CIFilter.gloom(),
CIFilter.heightFieldFromMask(),
CIFilter.hexagonalPixellate(),
CIFilter.highlightShadowAdjust(),
CIFilter.lineOverlay(),
CIFilter.mix(),
CIFilter.pixellate(),
CIFilter.pointillize(),
CIFilter.saliencyMap(),
CIFilter.shadedMaterial(),
CIFilter.spotColor(),
CIFilter.spotLight(),
CIFilter.bokehBlur(),
CIFilter.boxBlur(),
CIFilter.discBlur(),
CIFilter.gaussianBlur(),
CIFilter.maskedVariableBlur(),
CIFilter.median(),
CIFilter.morphologyGradient(),
CIFilter.morphologyMaximum(),
CIFilter.morphologyMinimum(),
CIFilter.morphologyRectangleMaximum(),
CIFilter.morphologyRectangleMinimum(),
CIFilter.motionBlur(),
CIFilter.noiseReduction(),
CIFilter.zoomBlur] as [AnyObject]