quartz/content/notes/06-homographies.md
2023-03-16 13:39:33 +13:00

1.9 KiB
Raw Blame History

title tags
06-homographies
lecture
cosc342

Homographies and mosaics

  • A homography* is:
    • A linear map between two planes (or views of a plane)
    • A 3 x 3 matrix, up to a scale
  • Two images of a scene are related by a homography
    • If the scene is planar, or
    • If the camera only rotates
  • |300

Homographies for planar scenes

  • Take a line in one view
  • This projects to a plane
  • That intersects the scene (another plane) at a line
  • That projects to a line in the other image
  • So lines are preserved
  • |300

[!INFO] can create a "straight" view of a picture!

|300

[!INFO] homography: maps points from one image to another

[!INFO] rephotography, mathing old photographs onto the current view of the user

homography for rotating camera |300

[!INFO] K matric describe parameters of camera. R matric describes rotation of camera. T is zero because the camera is only rotating. H is the homograhy matrix

not homographies

  • If we have both:
    • Non-planar scene, and
    • Translating camera
  • There is no homography between the images
    • Lines may not be preserved
    • Cannot make a mosaic
    • But we can do stereo

|150

making mosiac

  • To make a mosaic image:
    • Need to warp images to align
    • This warping is a homography
  • How to find the homography?
    • If a feature at in one image matches to in the other, then

|300

HOMOGRAPHY ESTIMATION IN OPENCV

cv::Mat H = cv::findHomography(pts1, pts2, cv::RANSAC, 3.0);