Lec04.2DTransformations2

# 9 163 153 179 208 209 equation of best fit line line

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: r 1997 Recovering Best Affine Transformation n༆  n༆  Given two images with unknown transformation between them… Compute the values for [a1 … a6] Recovering Best Affine T ransformation correspondences • Input: we are given some •  Output: Compute a1 – a6 which relate the images •  This is an optimization problem… Find the ‘best’ set of parameters, given the input data Parameter Optimization: Least Squared Error Solutions •  Let us first consider the ‘simpler’ problem of fitting a line to a set of data points… x 1.3 2.4 3.4 4.6 5.3 6.6 6.4 8.0 8.9 9.2 y 5.7 7.3 10.5 11.8 13.9 16.3 15.3 17.9 20.8 20.9 •  Equation of best fit line ? Line Fitting: Least Squared Error Solution •  Step 1: Identify the model –  Equation of line: y = mx + c •  Step 2: Set up an error term which will give the goodness of every point with respect to the (unknown) model –  Error induced by ith point: –  ei = mxi + c - yi –  Error for whole data: E = Σi ei2 –  E = Σi (mxi + c – yi)2 •  Step 3: Differentiate Error w.r.t. parameters, put equal to zero and solve for minimum point Line Fitting: Least Squared Error Solution x y 2 E = ∑ (mxi + c − yi ) i ∂E = ∑ (mxi + c yi )xi = 0 ∂m i ∂E = ∑ (mxi + c − yi ) = 0 ∂c i ⎡ྎ∑ xi2 ⎢ྎ i ⎢ྎ∑ xi ⎢ྎ i ⎣ྏ ∑ x ⎤ྏ ⎡ྎm⎤ྏ ⎡ྎ∑ x y ⎤ྏ ⎥ྏ ⎢ྎ ⎥ྏ ⎢ྎ c ⎥ྏ = ⎢ྎ ∑1 ⎥ྏ ⎣ྏ ⎦ྏ ⎢ྎ ∑ y ⎥ྏ ⎥ྏ ⎥ྏ ⎣ྏ ⎦ྏ ⎦ྏ i i i i 1.3 2.4 3.4 4.6 5.3 6.6 6.4 8.0 8.9 9.2 5.7 7.3 10.5 11.8 13.9 16.3 15.3 17.9 20.8 20.9 i i i i 380.63 56.1 56.1 10 m c 914.68 = 140.4 Solution: m = 1.9274 c = 3.227 Line Fitting: Least Squared Error Solution Recovering Best Affine T ransformation • Input: Set of correspondences –  Image 1: (xi , yi) Image 2: (xiʹȃ, yiʹȃ) Recovering Best Affine Transformation •  Least Squares Error Solution –  Is the solution (i.e. set of parameters a1 … a6) such that the sum of the square of error in each corresponding point is as minimum as possible –  No other set of parameters exists that may have a lower error (in the squared error sense) Recovering Best Affine Transformation Image 1 Image 2 Overlap of points after recovering the transformation We can try to find the set of parameters in which the error is minimum...
View Full Document

## This note was uploaded on 03/02/2014 for the course CS 436 taught by Professor Sohaibkhan during the Winter '13 term at Lahore University of Management Sciences.

Ask a homework question - tutors are online