Navigation

    VisionAppster.com

    VisionAppster Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Perspective correction

    Tools
    2
    4
    95
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      luqt123 last edited by

      Hi,

      Would it be possible to get a perspective image correction with current VA tools like in the image below:
      a427e4a4-7b40-456c-91c5-253be65f4f89-image.png

      Kind regards,
      Lukas

      1 Reply Last reply Reply Quote 0
      • Keijo
        Keijo last edited by

        Hi Lukas,

        In order to do perspective correction, you first have to calibrate the camera. In general it is not possible to just take a picture with any camera and change the perspective into something else without any knowledge about the position of the camera with respect to the object of interest.
        One option is to use a QR code for the calibration. The method is described in this Visionappster cookbook. It would obviously be a bit challenging to glue a giant QR code on the wall of a 32-story building like in your example image so you'd have to tone down the scale of your scene a bit 🙂

        Cheers,
        -- Keijo

        1 Reply Last reply Reply Quote 0
        • L
          luqt123 last edited by

          Thanks Keijo for quick reply.

          I'm just thinking if there is the way todo it wihtout QR/plate like selecting points on the image and it would do the rest. No precision is needed in this just to change the view.

          I'm thinking if it would be a good idea to try integrating function with the help of C/Python api

          cv2.getPerspectiveTransform(src, dst)
          

          where in the src you would describe the source points and in dst destination points (new image size)
          851e90e2-c63b-428f-9c0f-2f3a1e7a95d9-image.png

          Kind regards,
          Lukas

          1 Reply Last reply Reply Quote 0
          • Keijo
            Keijo last edited by

            Yes, you can certainly use getPerspectiveTransform and warpPerspective functions if you know where the wanted corners are in the input image (like the corners of the credit card in your example.) It will work using either C or Python API. It all boils down to the question on how you can find the four corner points for the transform.

            Cheers,
            -- Keijo

            1 Reply Last reply Reply Quote 1
            • First post
              Last post
            Forum Terms of Use and Privacy Policy