Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Perform RANSAC to find the best affine transformation that maps the most points from image 2 to image 1. To do this, perform the following

image text in transcribed

image text in transcribed

Perform RANSAC to find the best affine transformation that maps the most points from image 2 to image 1. To do this, perform the following steps: a. Randomly pick three matching points, in the format computed in part 2.

b. Compute the affine transformation, A, that relates them, using part 3.

c. Apply A to all points in image 2.

d. For each point, p, in image 2, that has been matched to point q in image 1, find out whether Ap is close to q (close might mean their Euclidean distance is less than 2).

e. Count the number of points that are mapped by A to be close to their matching point.

f. Repeat steps a-e many times (maybe a thousand?) and choose the A with the highest total.

% This function finds the affine transform that best relates the input % points, p1 and p2 % In: p1, input points % In: p2, input points % Out: A, the 2x3 transformation matrix function [ A ] = affine_transformation( p1, p2 )

% First, create an augmented matrix p1_augmented = [p1; ones(1,3)];

% Check determinant of matrix before inverting it if abs(det(p1_augmented))

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