본문 바로가기

Computer Vision/3D Reconstruction

(3) Stereo matching

 Disparitystereo 정합을 위한 left image, right image에서의 객체의 위치상의 다른 차이를 말한다. 이 차이를 parallax 하게 만드는 것을 disparity map이라고 한다.

 

 

 

 

disparity map

 

 

post-processing

 

 StereoBM_create()함수를 이용해 numDisparitiesblockSize를 정해주고(blockSize가 클 경우 smooth해지고 blockSize가 작을 경우 noise가 많이 생기지만 detail이 좋아지는 특성이 있다.) left imageright imagedispartiy map을 구해준다. StereoBM16bit integer type이기 때문에 .astype(‘unit8’)을 사용해 8bit unsigned integer type으로 바꿔주었다.

 구한 disparity map의 모든 pixel이 올바른 값이 나오는 것은 아니다. 범위에 벗어나는 구간은 3D reconstruction을 할 때 사용하지 않아야 하기 때문에 신뢰할 수 없는 구간은 post-processing을 해준다. disp8.min()값이 0이고 disp8.max() 값이 240이기 때문에 1~239 범위에 있지 않은 부분은 0으로 post-processing 해주었다.

 

'Computer Vision > 3D Reconstruction' 카테고리의 다른 글

(5) Source Code  (1) 2021.08.11
(4) 3D Reconstruction  (0) 2021.08.11
(2) Undistortion of stereo images  (0) 2021.08.11
(1) Camera calibration  (0) 2021.08.11