---
title: keystoneCorrectionCombined()
framework: coreimage
role: symbol
role_heading: Type Method
path: coreimage/cifilter-swift.class/keystonecorrectioncombined()
---

# keystoneCorrectionCombined()

Adjusts the image vertically and horizontally to remove distortion.

## Declaration

```swift
class func keystoneCorrectionCombined() -> any CIFilter & CIKeystoneCorrectionCombined
```

## Return Value

Return Value The adjusted image.

## Discussion

Discussion This method applies the keystone correction combined filter to an image. The effect applies a combined set of horizontal and vertical guides to adjust the shape of the input image. This effect is commonly used when cropping an image to correct distortion. In the figure below, both vertical and horizontal adjustments are made, resulting in a trapezoid-shaped image. The keystone correction filter uses the following properties: The following code creates a filter that distorts the image: func keystoneCorrectionCombined(inputImage: CIImage) -> CIImage {     let keystoneCorrect = CIFilter.keystoneCorrectionCombined()     keystoneCorrect.inputImage = inputImage     keystoneCorrect.topLeft = CGPoint(x: 0, y: 2448)     keystoneCorrect.topRight = CGPoint(x: 3164, y: 2248)     keystoneCorrect.bottomLeft = CGPoint(x: 0, y: 0)     keystoneCorrect.bottomRight = CGPoint(x: 3164, y: 150)     keystoneCorrect.focalLength = 35     return keystoneCorrect.outputImage! }

## See Also

### Filters

- [bicubicScaleTransform()](coreimage/cifilter-swift.class/bicubicscaletransform().md)
- [edgePreserveUpsample()](coreimage/cifilter-swift.class/edgepreserveupsample().md)
- [keystoneCorrectionHorizontal()](coreimage/cifilter-swift.class/keystonecorrectionhorizontal().md)
- [keystoneCorrectionVertical()](coreimage/cifilter-swift.class/keystonecorrectionvertical().md)
- [lanczosScaleTransform()](coreimage/cifilter-swift.class/lanczosscaletransform().md)
- [perspectiveCorrection()](coreimage/cifilter-swift.class/perspectivecorrection().md)
- [perspectiveRotate()](coreimage/cifilter-swift.class/perspectiverotate().md)
- [perspectiveTransform()](coreimage/cifilter-swift.class/perspectivetransform().md)
- [perspectiveTransformWithExtent()](coreimage/cifilter-swift.class/perspectivetransformwithextent().md)
- [straighten()](coreimage/cifilter-swift.class/straighten().md)
