Questions tagged [homography]

A homography is an invertible mapping from points in the the real projective plane to points in the real projective plane that maps straight lines to straight lines. This tag should be used for questions related to homography transformations (pure camera rotation, planar scenes, ...) in the computer vision field.

A homography is an invertible mapping h from the real projective plane to itself such that three points x1, x2and x3 lie on the same line if and only if h(x1), h(x2) and h(x3) do. Each homography is represented in homogeneous coordinates by a non-singular 3x3 matrix H such that for any point in the real projective plane represented by a vector x it is true that h(x) = Hx.

enter image description here

When applied to every pixel the new image is a warped version of the original image.

Source: wikipedia

451 questions
12
votes
2 answers

What do the elements in a homography matrix mean?

I'm new to image processing, but I'm using EMGU for C# image analysis. However, I know the homography matrix isn't unique to EMGU, and so perhaps someone with knowledge of another language can explain better. Please (in as simplified as can be) can…
Mattb2291
  • 167
  • 1
  • 2
  • 8
11
votes
2 answers

What do the values of the mask parameter returned by findHomography represent?

I am using the function findHomography of OpenCV with the RANSAC method in order to find the homography that relates two images linked with a set of keypoints. The main issue is that I haven't been able to find anywhere yet what are the values of…
jsalvador
  • 683
  • 2
  • 7
  • 18
10
votes
2 answers

OpenCV: RANSAC confidence parameter for finding a homography

The OpenCV function findhomography() finds a homographic transformation between matching points of two images. (See Definition) For finding matching subsets of points RANSAC can be used. Here's the catch: In contrast to other function in OpenCV…
user834985
  • 315
  • 3
  • 10
10
votes
5 answers

OpenCV cv::findHomography runtime error

I am using to compile and run code from Features2D + Homography to find a known object tutorial, and I am getting this OpenCV Error: Assertion failed (npoints >= 0 && points2.checkVector(2) == npoint s && points1.type() == points2.type()) in unknown…
haykart
  • 887
  • 4
  • 14
  • 33
10
votes
2 answers

Python Rotate image about camera axis

Say I have an image which I have obtained after applying a homography transformation H to some original image. The original image is not shown. The result of the homography H applied to the original image is this image: I want to rotate this image…
RaviTej310
  • 1,345
  • 2
  • 19
  • 46
10
votes
2 answers

Inverse Homography

I get an H matrix using findHomography function. H = findHomography(points_src, points_dst); Then, I use H with warpPerspective to get a perspective projection of the image warpPerspective(im_src, im_dst, H, Size(100, 100)); and from here I get…
10
votes
3 answers

Android OpenCV Find Largest Square or Rectangle

This might have been answered but I desperately need an answer for this. I want to find the largest square or rectangle in an image using OpenCV in Android. All of the solutions that I found are C++ and I tried converting it but it doesn't work and…
James Arnold
  • 448
  • 2
  • 8
  • 19
10
votes
1 answer

Some problems on image stitching - homography?

I'm working on a project of image stitching using OpenCV 2.3.1 on Visual Studio 2010. I'm currently having 2 problems. (My reputation is not over 10 so I can only post 2 hyperlinks in this post. I'll post another 2 in the comment area) I followed…
SilentButDeadly JC
  • 319
  • 1
  • 5
  • 12
8
votes
2 answers

Extract transform and rotation matrices from homography?

I have 2 consecutive images from a camera and I want to estimate the change in camera pose: I calculate the optical flow: Const MAXFEATURES As Integer = 100 imgA = New Image(Of [Structure].Bgr, Byte)("pic1.bmp") imgB = New Image(Of [Structure].Bgr,…
smirkingman
  • 5,807
  • 2
  • 32
  • 45
8
votes
1 answer

Transforming 2D image coordinates to 3D world coordinates with z = 0

OpenCV => 3.2 Operating System / Platform => Windows 64 Bit Compiler => Visual Studio 2015 I am currently working on my project which involves vehicle detection and tracking and estimating and optimizing a cuboid around the vehicle. For that I…
Indy
  • 105
  • 1
  • 7
8
votes
1 answer

How to apply RANSAC in Python OpenCV

Can someone show me how to apply RANSAC to find the best 4 feature matching points and their corresponding (x,y) coordinate so I can use them in my homography code? The feature matching points were obtained by SIFT and here is the code: import numpy…
Free Tyler1
  • 109
  • 1
  • 2
  • 5
8
votes
1 answer

Homography of soccer field

Okay so i am trying to find homography of a soccer match. What i have till now is Read images from a folder which is basically many cropped images of a template soccer field. Basically this has images for center circle and penalty lines etc. Read…
georoot
  • 3,319
  • 1
  • 25
  • 52
7
votes
2 answers

Opencv virtually camera rotating/translating for bird's eye view

I've a calibrated camera where I exactly know the intrinsic and extrinsic data. Also the height of the camera is known. Now I want to virtually rotate the camera for getting a Bird's eye view, such that I can build the Homography matrix with the…
Johannes
  • 81
  • 1
  • 1
  • 3
7
votes
1 answer

how many points pair are needed for a correct homography calculation?

in order to get a homography between two images, I wanted to know how many points I need at least to get a good estimation of the homography matrix?
rafaoc
  • 474
  • 7
  • 18
7
votes
3 answers

OpenCV : wrapPerspective on whole image

I'm detecting markers on images captured by my iPad. Because of that I want to calculate translations and rotations between them, I want to change change perspective on images these image, so it would look like I'm capturing them directly above…
Axadiw
  • 651
  • 8
  • 19
1
2
3
30 31