Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7961951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:11:46+00:00 2026-06-04T05:11:46+00:00

I am having a very hard time finding any documentation online that clearly explains

  • 0

I am having a very hard time finding any documentation online that clearly explains how to implement Core Image’s CIPerspectiveTransform filter properly. In particular, when setting CIVector values for inputTopLeft, inputTopRight, inputBottomRight, and inputBottomLeft, what are these vectors doing to the image? (I.e., what is the math behind how these vectors warp my image?)

Currently this is the code I am using. It doesn’t crash, but it doesn’t show an image:

CIImage *myCIImage = [[CIImage alloc] initWithImage:self.image];
CIContext *context = [CIContext contextWithOptions:nil];
CIFilter *filter = [CIFilter filterWithName:@"CIPerspectiveTransform" keysAndValues:@"inputImage", myCIImage, @"inputTopLeft", [CIVector vectorWithX:118 Y:484], @"inputTopRight", [CIVector vectorWithX:646 Y:507], @"inputBottomRight", [CIVector vectorWithX:548 Y:140], @"inputBottomLeft", [CIVector vectorWithX:155 Y:153], nil];
CIImage *outputImage = [filter outputImage];
CGImageRef cgimg = [context createCGImage:outputImage fromRect:[outputImage extent]];
UIImage *transformedImage = [UIImage imageWithCGImage:cgimg];
[self setImage:transformedImage];
CGImageRelease(cgimg);

Other things to note that might be important:

  • My UIImageView (75pts x 115 pts) is already initialized via awakeFromNib and already has an image (151px x 235px) associated with it.

  • The above code is being implemented in the UIImageView’s - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event function. The hope is that I’ll be able to adjust the perspective of the image based on screen coordinates so it looks like the image is moving in 3D space.

  • This code is for an iPhone app.

Again, the question I think I am asking is what the various parameter vectors do, but I may be asking the wrong question.

The following post is very similar but is asking why his image disappears rather than how to use CIVectors for CIPerspectiveTransform. It also has received very little traction, perhaps because it is too general:
How I can use CIPerspectiveTransform filter

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T05:11:47+00:00Added an answer on June 4, 2026 at 5:11 am

    As I commented on the linked question, CIPerspectiveTransform is not available in the iOS implementation of Core Image as of iOS 5.1. That’s why you and the other asker weren’t seeing any image as a result, because most likely your CIFilter was nil.

    If you just want to implement a form of perspective on an image, there are two different fast ways of doing this on iOS, as I describe in this answer. One is to simply use the right kind of CATransform3D on the layer of a UIImageView, but this is only useful for display, not for image adjustment.

    The second way is to manipulate the image using an appropriate 3-D transformation matrix in OpenGL ES. As I indicate in the above-linked answer, I have an open source framework that wraps all this, and the FilterShowcase sample there has an example of applying a perspective to incoming video. You can easily swap out the video input with your image, and grab an image from that after the perspective effect is applied.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having a very hard time finding resources that talk about the windows
I am having a very hard time finding a good resources or any idea
I am having a very hard time finding a standard pattern / best practice
I've been having a very hard time finding good examples of UIScrollView. Even Apple's
I'm having a very hard time understanding how to setup an object that allows
I'm very new to PHP and having a hard time finding this answer as
i am very new to Adobe Air and i am having a hard time
I'm having an hard time finding how to draw/print a String in a canvas,
I'm having a very hard time getting the 2 buttons in the 2nd child
I'm having a very hard time wrapping my head around this problem (it might

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.