Computer Vision - Feature Matching

DYN.kim·2024년 10월 7일

computer vision

목록 보기
4/6
post-thumbnail

aligment는 translation이 발생한 두 이미지를 정렬시키는 것으로 영상에서 두 프레임 사이에 새로운 이미지 프레임을 interpolation하는데에도 활용되는 매우 중요한 기술이다.

matching #1 template matching
template 이미지를 움직이면서 픽셀값이 비슷한 부분을 찾는 방법으로 정확도는 높을 수 있으나 time complexity가 높다는 단점이 있다.

matching #2 pyramid template matching
image pyramid를 사용하여 더 작은 image에서 template matching을 수행하여 속도를 증가시키는 방법이다.

matching #3 model refinement
1초에 30 프레임의 영상이 있다고 가정해보자 물체가 프레임별로 거의 이동하지 않을 것이다. 이러한 상황처럼 good initial solution에서 시작하여 matching을 수행하여 time complexity를 줄이는 방법이다.

위 매칭방법들은 rigid transformation 발생만을 가정한 방법이다.

rigid transformation: shape와 size는 유지한 채 translation과 rotation만 발생하는 transformation

similarity transformation: rigid transformation에 scale change가 추가된 transoformation

affine transformation: 직선간 길이 비율과 평행 관계가 유지되는 transformation

transformation 예시

affine transformation matrix는 다음과 같이 나타낼 수 있다.

algignment warped image와 template 이미지와의 pixel값의 ssd를 최소화 하는 parameter set p를 찾아야 한다.

예를 들어 affine transform의 parameter은 6개이고 image가 10X10 image이면 x는 총 100개의 픽셀값이 될 것이다. 위 문제는 naive하게 풀기에는 optimize하기 너무 어렵다.

이러한 alignment를 더 쉽게 하기 위한 방법으로 Lucas-Kanade alignment라는 방법이 있다. 이 방법은 p를 바로 찾기 보다 좋은 initial position에서 시작하여 p의 small increment를 찾는 방법이다.

위 수식을 first order approximation과 chain rule을 이용하여 linear appoximation형태로 정리할 수 있다.

이를 통해 p의 increment를 계산할 수 있다.

profile
AI 개발자를 목표로 하고 있는 꿈 많은 공대생입니다. a deo vocatus rite paratus

0개의 댓글