From 9b38731d306345662781b20282dabc074f144906 Mon Sep 17 00:00:00 2001 From: Jet Hughes Date: Thu, 16 Mar 2023 13:39:33 +1300 Subject: [PATCH] vault backup: 2023-03-16 13:39:33 --- content/notes/06-homographies.md | 34 +++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/content/notes/06-homographies.md b/content/notes/06-homographies.md index 37587fdc9..772601365 100644 --- a/content/notes/06-homographies.md +++ b/content/notes/06-homographies.md @@ -36,4 +36,36 @@ homography for rotating camera ![|300](https://i.imgur.com/L6MqmUD.png) -> [!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 \ No newline at end of file +> [!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](https://i.imgur.com/8P81y7T.png) + +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](https://i.imgur.com/lryK0b8.png) + +HOMOGRAPHY ESTIMATION IN OPENCV +- https://docs.opencv.org/4.4.0/d9/d0c/group__calib3d.html#ga4abc2ece9fab9398f2e560d53c8c9780 +- pts1 – Points in first image (std::vector) +- pts2 – Points in second image (std::vector) + +- cv::RANSAC - method to use (we’ll just use RANSAC) +- 3.0 – RANSAC threshold + +cv::Mat H = cv::findHomography(pts1, pts2, cv::RANSAC, 3.0); +