let us not love with words or tongue but actions and truth.

IT/영상처리분석

여러 종류의 Feature descriptor

sarah0518 2022. 5. 16. 19:20

지난 내용 복습

descriptor 사용 이유:

key point를 추출하고 두 개의 이미지의 유사성을 비교하기 위해

→ panorama stiching 등에 활용

너무 큰 이미지나, 중복이 많은 이미지의 압축을 위해

 

scale invariant특성을 가지는 descriptor: SIFT, SURF, LIFT

(하지만 LIFT는 scale invarient 성능을 장담할 수 없음)

(LIFT는 학습시에 다양한 scale을 사용하지만, 과정에서 scale정보를 추출하지는 않음)

 

land mark vs. keypoint

land mark: 보통 set로 사용

→ 얼굴의 finger points들, skeleton points

이미지 안에있는 데이터들을 처리하기 위해서 활용됨

data analysis

key point는 corner point라고도 함

이미지 사이의 연관성을 분석하기위해 활용됨

correspondence

 

affine transformation: view point 변화로 인해 바뀌는 이미지들

 

requirements of a local features

 Repetitive : Detect the same points independently in each image

• Invariant to translation, rotation, scale

• Invariant to affine transformation

• Invariant to presence of noise, blur, etc

• Locality : Robust to occlusion, clutter and illumination change

• Distinctiveness : The region should contain “interesting” structure

• Quantity : There should be enough points to represent the image

                   (over constraint 되지 않는 것 중요)

• Computation and time efficient

 

 

여러 종류의 descriptor

기본적인 descriptor: LBP(Local Binary Patterns)

- gray scale 이미지를 주로 사용

- 3x3 grides를 사용

- 주변 pixel이 중심 pixel보다 크거나 같으면 1로 표시해줌(반시계방향으로 이동)

최종적으로 이미지가 하나의 값을 갖는 형태로 표현됨

- 주변값과 비교하여 상대적인 값으로 변환되는 것임

- 8 bit binary값을 10진수로 변환함

  밝기변환, contrast 변환에 대해서 invarient하게 이미지의 값을 표현할 수 있음

→ rotation, scale에는 invarient하지 않음

(시작점이 고정되어있으므로: rotation하면 어려워짐)

(3x3으로 고정이므로: scale하면 어려움)

 

 

Uniform LBP

0에서 1로 바뀌거나, 1에서 0으로 바뀌는 변환을 2번까지만 반영하는 것

장점: rotation에 어느정도 invarient 함

59가지의 서로다른 pattern이 나타날 수 있음

 

Multi-scale LBP

ㅡ more than one scale of neighbors

장점: scale에 어느정도 invarient 함

왜냐하면 반지름을 P라고 할때 이미지가 2배인 것은 

P를 2배로 한 multi-scale LBP를 사용하면 되기 때문임

단, 계산이 많이 필요함

 

SIFT: 

Affine distortion: 45도 단위로 보기 때문에 그 범위에서의 affine distortion은 어느정도 가능함

Illumination: gradient orientation과 magnitude를 사용하므로 가능함

- 4x4 gradient window를 사용

- gaussian weighting을 주면 원형태의 descriptor를 갖게 됨

→ Gaussian weighting around center

모서리쪽에 작은 weight를 줌

- major orientation값을 구할때 큰 값이 2개있으면

동일한 keypoint에서 2개의 descriptor가 나옴

  keypoint 개수 < descriptor의 개수

 

 

GLOH: window를 강제로 원형으로 만든 descriptor

→ rotation에 더 invarient함

- 단 가운데에는 오차가 많을 수 있기 때문에 

가운데 부분은 큰 영역으로 가져감

- 오른쪽그림에서 총 17개의 구획임

그러므로 total 17x16= 272의 dimentsions.

- 128차원으로 PCA를 사용하여 축소함

 

 

SURF: 

4*4 sub-regions에서 아래의 값을 구함

4x16= 64의 feature vector를 얻게됨

harr wavelet을 통해 구함 

 

 

 

DAISY: 

rotation에 invarient한 descriptor를 뽑기위해 원형의 window사용

(계산이 복잡한) dense computation할 때 효과적임

(8+8+8)x(#of bins) 의 vector size

rotation을 하더라도, 중심점에서 바깥쪽으로 나가는 orientation은 동일 함.

이미지에 대한 여러 orientation에 대한 gradient를 미리 구한 뒤, 최종 descriptor를 추출함

각 orientation에 대한 gradient를 계산해놓음, 원의 색 별로 scale이 다름

DAISY는 SIFT에 비해 이미지 처리 시간은 줄어들지만(parallelize에 유리함),

메모리 사용량은 증가함

→ 왜냐하면 SIFT는 각각에 pixel에 대해서 gradient를 구할 때

아래 그림에서와 같이 중복되는 부분은 계산을 다시 해줘야함

(그러므로 시간이 daisy에 비해 오래 걸림)

 

 

BRISK (Binary Robust Invariant Scalable Keypoints)

주변의 60개의 지점들을 설정함

60개 point의 intensity를 계산(빨간원안에있는 파란색 point들)

파란색 점끼리의 gradient를 계산함

빨간원의 size는 시그마값(blur 정도에 비례)

 

파란색원을 연결하면 1770개의 pair가 나옴

S: 가까운 거리에 있는 pairings (binary descriptor를 building 할 때 사용함)

L: 먼거리에 있는 parings ( overall keypoint direction vector구할 때 사용함)

 

overall keypoint direction 벡터는 아래와 같은 식으로 구함

L을 사용

binary descriptor는 아래 식으로 구함

S를 사용

 

 

LATCH: (Learned Arrangements of Three Patch Codes)

3개의 pixel patches에서 생성된 조합을 사용

중심포인트(anchor point)와 다른 2개의 주변point와의 비교를 통해 descriptor를 구성함

descriptor의 quality를 측정하기위해 Mikolajczyk benchmark dataset을 사용함

(blur, illumination, jpeg 압축은 중요도가 낮음, 쉬움)

(rotation, zoom, viewpoint change가 어려운 변환에 속함)

 

 

LIFT (Learned Invariant Feature Transform)

deep learning에 기반한 descriptor

CNN방식을 사용

LIFT의 3가지 구성요소: the Detector, the Orientation Estimator, and the Descriptor.

학습 순서: descriptor를 먼저 학습 → orientation estimator 학습 → keypoint detector 학습

(mining: 이미지에서 대응되는 keypoint들을 이용해서 필요한만큼의 descriptor를 추출해서 학습에 사용함)

LIFT는 keypoint와 descriptor를 둘 다 추출 함

desriptor를 학습할 때 3개의 patch를 사용함

P1, P2는 matching이 되고, P3는 matching이 안되는 patch임

(genuine, imposter pair를 128개씩 준비)

genuine: 같은 위치에 대한 다른 이미지

P4: keypoint가 아닌 이미지 (negative example)

genuine pair사이의 거리는 최소화, imposter pair사이의 거리는 최대화
hinge loss를 사용

아래에서 말하는 성능은 keypoint detector와 descriptor 성능 두가지를 합쳐서 비교한 내용임

** 아직까지 deep learning 방법은 scale-invarient한 window size를 구하기

어렵다는 점에서 SIFT의 성능을 이기지 못하고 있음

 

 

 

'IT > 영상처리분석' 카테고리의 다른 글

Face recognition  (0) 2022.05.30
Face Detection  (0) 2022.05.23
keypoint detection - Harris, SIFT, SURF, LIFT  (0) 2022.04.18
Line & Ellipse detection  (0) 2022.04.17
Edge Detection  (0) 2022.03.31