Giter VIP home page Giter VIP logo

homography_estimation's Introduction

homography_estimation

What is homography and how to compute it?

Briefly, the planar homography relates the transformation between two planes (up to a scale factor). It is a 3x3 matrix,which requires input as the 2D image coordinates,and the corresponding 2D real world coordinates.More details about the basics of homography can be found here-https://docs.opencv.org/4.x/d9/dab/tutorial_homography.html .

Prerequisites

The homography method needs the intrinsics of the camera to undistort the image.The intrinsics for the given camera can be computed using opencv.For further details to compute the intrinsics,refer here-https://docs.opencv.org/4.x/dc/dbb/tutorial_py_calibration.html

Procedure to compute homography

1. Place some markers on the region of the floor,for which the homography needs to be estimated.The accuracy of the real world position estimates depends on the number of markers,more the number,better the accuracy of the estimated position.The markers also need to be spread apart.

2. Capture the image,and then undsitort the image.

3. Manually select the markers in the image to get the 2d image point of the marker.

4. Note down the corresponding 2D real world positions of the marker in cm or meters.

5. Divide the points into train and test set.The train set is used to estimate the homography matrix,and test set is to get an estimate of how accurate the homography matrix is.Usually this is quantified by computing the reporjection error between the manually selected test points and the projected 2d test points using the homography matrix.

6. Feed the train points to the opencv cv2.findhomography API to get the homography matrix estimate and then compute the reprojection error.

All of the above steps are implemented in the files under compute_homography folder.[todo-change name]

homography_estimation's People

Contributors

poornimajd avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.