less than 1 minute read

2D planar and linear transformation

image

RANSAC

기존 방식의 문제 : solving for translation

image

매칭이 잘못되는 문제가 생긴다.

이유는 outliers 때문이다.

그렇게 나온것이 RANSAC이다.

(RANdom SAmlpe Consensus)

Learning technique to estimate parameters of a model by random sampling of observed data

RANSAC의 절차

  1. Sample a set of matching points (1 pair)
  2. Solve for transformation parameters
  3. Score parameters with number of inliers
  4. Repeat steps 1-3 N times

Affine transform

Affine transformations are combinations of

uniform scaling + shearing + rotation + translation

image

translation = [[1, 0, 350],
               [0, 1, 350],
               [0, 0, 1]]
rotation = [[np.cos(theta), -np.sin(theta), 0],
            [np.sin(theta), np.cos(theta), 0],
            [0, 0, 1]]
scaling = [[2, 0, 0],
           [0, 2, 0],
           [0, 0, 1]]

M = np.dot(np.dot(translation, rotation), scaling)
  • np.dot을 이용해 행렬을 곱해준다. combination구현

Tags:

Categories:

Updated: