Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Try the RANSAC option to compute homography. Change the RANSAC parameters, and explain your results. Print and analyze the inlier numbers. [ ] # Your

Try the RANSAC option to compute homography. Change the RANSAC parameters, and explain your
results. Print and analyze the inlier numbers.
[] # Your code to display book location after RANSAC here
# using RANSAC
H, mask = cv2.findHomography(src_pts, dst_pts, cv2.RANSAC)
# draw frame
# draw inliers
inlier number 3. Estimate a homography transformation based on the matches, using
cv2. findHomography (). Display the transformed outline of the first reference book cover
image on the query image, to see how well they match.
We provide a function draw_outline() to help with the display, but you may need to edit
it for your needs.
Try the 'least square method' option to compute homography, and visualize the inliers by
using cv2. drawMatches(). Explain your results.
Again, you don't need to compare results numerically at this stage. Comment on what you
observe visually.
"!I'I This is just an example to show the steps involved. Inputs: query: query imageIIIIpts = np.float32([[0,0],[0,h-1],[w-1,h-1],[w-1,0]]).reshape(-1,1,2)img = query.copy()plt.imshow(img, 'gray'), plt.show()
def draw_inliers(img1, img2, kp1, kp2, matches, matchesMask): Draw inlier between images kp1/ kp2: their keypoints matchesMask: Inlier mask returned in cv2.findHomography()matchesMask = matchesMask.ravel().tolist() singlePointColor = None, flags =2)plt.imshow(img3, 'gray'),plt.show()
The provided original draw_outline and draw_inliers in the second image
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

1st Edition

1597496251, 978-1597496254

More Books

Students also viewed these Databases questions

Question

2. How do these vengeful heroes exorcise their daemons?

Answered: 1 week ago