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 901917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:38:11+00:00 2026-05-15T15:38:11+00:00

If I want to detect perspective distorted objects (e.g rectangles) and calculate the correction

  • 0

If I want to detect perspective distorted objects (e.g rectangles) and calculate the correction transformation, what would be a good method?

For example, I have a lot of photos of papers lying on a flat surface (the photos are shot from an angle), and I want to correct the perspective and crop them.

I am thinking of using the OpenCv Python bindings to whip something up. I thought it would be a “standard problem” with lots of examples, but I failed to find any relevant info. Clues?

EDIT: I should add that I know it can be done by using some Web services, but I see this as a chance of doing something useful while learning OpenCv 🙂

  • 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-05-15T15:38:12+00:00Added an answer on May 15, 2026 at 3:38 pm

    You have to specify exactly what you mean with detecting the distortion. I assume you want to detect the corners of such a paper (or your table/flat surface) and make it axis-parallel to your display. This can be done using cvFindHomography and cvWarpPerspective. I have written some example code a while ago for python, note that those are still the old bindings (shouldn’t take long to update to opencv 2.0 though): http://ioctl.eu/blog/2009/05/13/opencv_homography

    The other thing you obviously have to do is detecting the corners. In my sample code, the user is required to click four corners using the mouse. In your case, it is hard to tell because I need an example. OpenCV offers several means to detect corners (see Harris), also in the examples there should be code on how to find rectangles. If you could be more specific, I might be of greater assistence.

    UPDATE
    This might be interesting for you as well: I’ve just heard a talk on manipulating perspective distortion in images (to e.g. increase the foreshortening). They require heavy user interaction, but optimize some grid with some constrains to maintain a smooth warping.
    Here is the acm link: http://portal.acm.org/citation.cfm?id=1778765.1778864
    Maybe you can draw some ideas from that paper and the mentioned references, however I haven’t read it myself (yet).

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

Sidebar

Related Questions

I want to detect if a string contains both numbers and letters. For example:
I want to detect if one canvas object for example - circle crosses another
I have a VS addin in C#. I want detect if a solution is
I want to detect programming language with ruby For example: (PHP) $a = array(1,2,3);
I want to detect duplicate values in a Java array. For example: int[] array
I want to detect when the contents of my GWT RichTextArea become 'dirty' (have
I want to detect faces on camera previews. I saw this example in OpenCV
I want to detect cases where an Ajax call is in progress and then
I want to detect when a user is missing a required module and print
I want to detect and insert location of the visitor on a webpage to

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.