Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
let correctedImage = ciBikeImage
.cropped(to: box_rect)
.applyingFilter("CIPerspectiveCorrection", parameters: [
"inputTopLeft": CIVector(cgPoint: topLeft),
"inputTopRight": CIVector(cgPoint: topRight),
"inputBottomLeft": CIVector(cgPoint: bottomLeft),
"inputBottomRight": CIVector(cgPoint: bottomRight)
.applyingFilter("CIColorControls", parameters: [
kCIInputSaturationKey: 0,
kCIInputContrastKey: 32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.