Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

You can use any two images to stitch. Problem II (50 Points) - Image Stitching Image stitching or photo stitching combines multiple photographic images that

You can use any two images to stitch.

image text in transcribedimage text in transcribed

Problem II (50 Points) - Image Stitching Image stitching or photo stitching combines multiple photographic images that have overlapping fields of view to produce a segmented panorama or high-resolution image. 1. Load both images: left1.jpg and right1.jpg. 2. Use HCD (from Problem I) or any corner detector - you can use packages in Python to detect corners. 3. Extract local neighborhoods around every keypoint in both images, and form descriptors simply by "flattening the pixel values in each neighborhood to a vector. You may instead using descriptors in OpenCV, describe how you get those descriptors and explain the meaning of the descriptors. 4. Compute distances between every descriptor in one image and every descriptor in the other image. Experiment with computing normalized correlation, or Euclidean distance after normalizing all descriptors to have zero mean and unit standard deviation. Report your choices. Note: You are not allowed to use built-in functions to match features for you, including but not limit to cv2. BFMatcher. However, you can use them to debug your code and compare to your implementation. 5. Using the distance matrix, match the pairs of points in the two images that are at a distance below a specific threshold or select a top k-hundred pairs with the least distance. Report your choices. 6. Run RANSAC to estimate homography mapping one image onto the other. For the best fit, report the number of inliers and the average residual for the inliers, and display the locations of inlier matches in both the images. You can use cv2.draw Keypoints to draw matches, Note: You need to implement RANSAC and calculate the transform matrix. You are not allowed to use functions that do RANSAC in one line, including but not limit to cv2. find Homography or cv2.get PerspectiveTransform. However, you can use them to debug your code and compare to your implementation 7. Warp one image onto the other using the estimated transformation. To do this, you will need to learn about cv2.warpPerspective. Please read the documentation. 8. Create a new image big enough to hold the panorama and composite the two images into it. You can composite by simply averaging the pixel values where the two images overlap. Here is a sample output: Problem II (50 Points) - Image Stitching Image stitching or photo stitching combines multiple photographic images that have overlapping fields of view to produce a segmented panorama or high-resolution image. 1. Load both images: left1.jpg and right1.jpg. 2. Use HCD (from Problem I) or any corner detector - you can use packages in Python to detect corners. 3. Extract local neighborhoods around every keypoint in both images, and form descriptors simply by "flattening the pixel values in each neighborhood to a vector. You may instead using descriptors in OpenCV, describe how you get those descriptors and explain the meaning of the descriptors. 4. Compute distances between every descriptor in one image and every descriptor in the other image. Experiment with computing normalized correlation, or Euclidean distance after normalizing all descriptors to have zero mean and unit standard deviation. Report your choices. Note: You are not allowed to use built-in functions to match features for you, including but not limit to cv2. BFMatcher. However, you can use them to debug your code and compare to your implementation. 5. Using the distance matrix, match the pairs of points in the two images that are at a distance below a specific threshold or select a top k-hundred pairs with the least distance. Report your choices. 6. Run RANSAC to estimate homography mapping one image onto the other. For the best fit, report the number of inliers and the average residual for the inliers, and display the locations of inlier matches in both the images. You can use cv2.draw Keypoints to draw matches, Note: You need to implement RANSAC and calculate the transform matrix. You are not allowed to use functions that do RANSAC in one line, including but not limit to cv2. find Homography or cv2.get PerspectiveTransform. However, you can use them to debug your code and compare to your implementation 7. Warp one image onto the other using the estimated transformation. To do this, you will need to learn about cv2.warpPerspective. Please read the documentation. 8. Create a new image big enough to hold the panorama and composite the two images into it. You can composite by simply averaging the pixel values where the two images overlap. Here is a sample output

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions