1월, 2009의 게시물 표시

Radial distortion

이미지
카메라 렌즈에서 생기는 영상의 왜곡(distortion)현상은 크게 축 방향(radial)왜곡과 접선 방향 (tangential)왜곡으로 나눌 수 있다. 축 방향 왜곡의 경우 렌즈의 잘못된 곡면성형으로, 접선 방향 왜곡의 경우 렌즈와 카메라의 부적절한 조립으로 인해 생긴다. 아래 자료는 radial distortion에 대한 자료이다. 출처 : http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/FUSIELLO4/tutorial.html#x1-67001r131 A realistic model for a photocamera or a videocamera must take into account non-linear distortions introduced by the lenses, especially when dealing with short focal lengths or low cost devices (e.g. webcams, disposable cameras). The more relevant effect is the radial distortion , which is modeled as a non-linear transformation from ideal (undistorted) coordinates ( u,v ) to real observable (distorted) coordinates ( û , ): where r d 2 = 2 + 2 and ( u 0 ,v 0 ) are the coordinates of the image centre. Estimating k 1 Let us assume that the pinhole model is calibrated. The point m = ( u,v ) projected according to the pinhole model (undistorted) do not coincide with the measured points = ( û , ) beca...

Cholesky decomposition을 이용한 카메라 행렬 분해

카메라보정(camera calibration) 또는 Self-calibration에서 카메라의 내부(intrinsic)/외부(extrinsic) 파라미터를 계산하는 것이 중요한데 그중에서 cholesky decomposition을 이용하는 방법에 대해 쓰고자 한다. Cholesky decompostion을 이용하여 카메라 행렬을 분해하는 방법은 아래 박사학위 논문에 언급되어있다. T.Melen, "Geometrical modelling and calibration of video cameras for underwater navigation," doctoral dissertation, Norwegian Univ. of Science and Technology, Trondheim, Norway, 1994. 이 내용을 정리하면 아래와 같다. --------------------------------------------------------------------------- 계산된 카메라 행렬 P를 QR 분해하여 6개의 내부파라미터(K)와 6개의 외부파라미터(R, t)를 계산할 수 있다. 3x4 크기의 카메라 행렬 P에서 왼쪽 3x3 행렬을 A라고 할 때 A = KR이 된다. 여기서 A-1을 QR 분해하면 식 (1)과 같다. A-1 = QL (1) 여기서 Q는 직교(orthogonal)하고 L은 상삼각(upper triangular)행렬이다. 식 (1)의 역행렬을 계산하면 식 (2)와 같다. A = L-1Q-1 = L-1Qt (2) 여기서 K = L-1이고 R = Qt가 된다. ------------------------------------------------------------------------- 이렇게 하여 카메라 내부파라미터 K와 회전행렬 R을 계산할 수 있다. 이동행렬 t는 카메라 행렬 P = [KR -KRt]로 구성되어 있기 때문에 카메라 행렬 P와 내부파라미터 K, 회전행렬 R을 알면 쉽게 계산할 수 있다. blog.naver...

IPIU2009 & ICCV2009

- IPIU2009 (Workship on Image Processing and Image Understanding) 에 논문을 제출했다. 분야는 다중카메라 보정.... 2월 18일 제주도에 가겠군... 지금까지 다른 주제로 다른 학회에는 참석해봤지만 이쪽분야로는 첫 발표이다. 데뷔전... IPIU http://www.ipiu.or.kr/ - ICCV2009 (The Twelth IEEE International Conference on Computer Vision in Kyoto) 초록 제출기한 : 3월 1일 논문 제출기한 : 3월 10일 컴퓨터비전분야에서 세계적인 학회로 알고있다. 그리고 꼭 만나보고 싶은 Peter Sturm 이라는 분도 Tutorial chairs로 오신다고 한다. ICCV에 참석하는 것이 올해의 목표! ICCV http://www.iccv2009.org/

Motion capture company .. Phoenix Technologies Incorporated

이 회사의 웹사이트는 여기(http://www.ptiphoenix.com/VZmodels.php)이다 이 회사의 모션 장비는 스테레오비전으로 모션캡처 장비를 구현하였다. 대신 카메라 사이의 간격이 상당히 넓다. 이 회사에 홈페이지에 들어갔을때 놀랐던것은 Sensing Volume: ~ 190 cubic meters of useful space, over 7.0 meters radius (at min. exposure) Minimum Sensing Distance: 0.5 meter Position Resolution: 0.015 mm at 1.2m distance Number of Markers: 512 max (no 'swapping' problem) Number of Subjects: 512 maximum Calibration: Not required for an individual tracker Not required for multi-tracker systems either, if VZAutoCal™ used Scalability: 1~24 trackers Accuracy (nominal): 0.65±0.05 mm RMS or better (3D combined; data range: 0.6~2.2m distance, ±40° yaw, ± 30° pitch) Operation Angle: 90° (± 45°) in both pitch and yaw; 107° diagonally at 5m distance Sensing Rate: 3300 3D data points per second (single sampling) 2666 3D data points per second (double sampling) Data Latency: Computer Communication: Serial RS232/RS422 (921.6kbps) Mounting Orientation: Any (no 'bl...

Motion capture technology on BBC

캐러비안의 해적에서 데이비 존스의 얼굴이 어떻게 만들어 졌는지와 모션캡처에 대한 내용 http://news.bbc.co.uk/1/hi/technology/6571491.stm

Harris corner detector

영상의 특징점을 추출하는 방법중에 코너점을 특징점으로 하는 방법이 있는데 그중에서 Harris corner detector라는 것이 있다. 자세한 내용은 첨부파일에 있는 pdf파일에 나와있다. 그리고 가장 중요한 소스코드는 두가지 종류를 찾을 수 있었다. 먼저 Mathwork사의 홈페이지에 있는 http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=9272&objectType=FILE 코드가 있고 주옥같은 매트랩 코드가 많은 아래 홈페이지에서도 찾을 수 있다. http://www.csse.uwa.edu.au/~pk/Research/MatlabFns/

Homography

카메라 3대에서 다음과 같은 특징점(frame_data.txt)을 추출하였다면 cam1 cam2 cam3 191 426 243 442 263 453 422 457 467 419 430 394 183 363 233 376 263 388 422 388 469 355 434 338 173 292 228 305 259 317 422 311 473 284 440 275 161 207 220 213 261 234 422 215 477 198 447 205 148 117 214 127 263 150 422 117 479 113 451 136 136 27 206 33 263 63 422 13 484 19 457 63 Matlab 코드는 아래와 같다. ----------------------------------------------------------------------- load frame_data.txt fcam1 = [frame_data(:,1) frame_data(:,2) ones(length(frame_data),1)]'; fcam2 = [frame_data(:,3) frame_data(:,4) ones(length(frame_data),1)]'; fcam3 = [frame_data(:,5) frame_data(:,6) ones(length(frame_data),1)]'; Homo12 = HomographyDLT(fcam2, fcam1); Homo13 = HomographyDLT(fcam3, fcam1); 위과 같이 호모그래피를 계산하는 함수를 이용하면 된다. 호모그래피 계산 함수는 아래와 같다. Marco Zuliani 라는 분이 만든 코드로 좌표에 대한 정규화까지 수행하여 호모그래피를 계산한다. 조금더 정확한 결과를 얻고자...

RANSAC(RANdom SAmple Consensus) 알고리즘

self-calibration을 하려다보니 제일 먼저 공부해야하는 것이 RANSAC(RANdom SAmple Consensus)이다. matlab 코드를 다운로드 받을 수 있는 곳. http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=18555&objectType=file 호모그래피를 계산할때나 포인트매칭을 할 때 유용한 방법이다. 어떻게보면 별거아닌 아이디어지만 참 실용적이다. 이런 연구를 해야할텐데.. 위 사이트보다는 http://www.csse.uwa.edu.au/~pk/research/matlabfns/ 이 사이트가 더 유용할것 같다. 정말이지 영상처리하는 사람에게 필요한 코드가 많은 곳이다.

Camera calibration toolbox for Matlab

Camera calibration toolbox for Matlab Modern CCD cameras are usually capable of a spatial accuracy greater than 1/50 of the pixel size. However, such accuracy is not easily attained due to various error sources that can affect the image formation process. Current calibration methods typically assume that the observations are unbiased, the only error is the zero-mean independent and identically distributed random noise in the observed image coordinates, and the camera model completely explains the mapping between the 3D coordinates and the image coordinates. In general, these conditions are not met, causing the calibration results to be less accurate than expected. 위 내용은 http://www.ee.oulu.fi/~jth/calibr/에서 퍼온 내용중 일부이다. 이 사이트에 들어가시면 matlab 소스 코드까지 받을 수 있다. 참고로 난 아직 안 써봤음..

Direct linear transfomation (DLT)

매트랩 함수로 DLT를 이용해서 카메라 보정하는 함수를 만들었다. 카메라에 찍은 u,v 좌표와 3차원 좌표를 알고있는 통제점의 좌표(x,y,z)가 입력으로 들어간다. 소스코드는 아래와 같다. 통제점의 개수에 상관없이 카메라 보정을 할 수 있다. 카메라 행렬 P는 3x4 행렬이기 때문에 총 12개의 파라미터가 있다. 12번째 파라미터를 1로 고정하고 계산하는 inhomogeneous 방법이 있고 아래의 코드처럼 12번째 파라미터를 1로 고정하지 않고 그냥 변수로 고려하는 homogeneous 방법이 있다. homogeneous 방법으로 12개 파라미터의 값을 구하기 위하여 SVD를 이용하였다. function [L] = sky_homoDLT_2d_to_3d(u, v, x, y, z) %function [L] = sky_homoDLT_2d_to_3d(u, v, x, y, z) % %L : Direct linear transformation parameter %u : u coordinate of camera plane %v : v coordinate of camera plane %x, y, z : Marker data of Object plane %u, v, x, y, z must be matrix % %-------------------------------------------- %Data : 2008.06.19 %Made by : Ki-Young, Shin (Ph.D course) %University : Sungkyunkwan University if length(u) == length(x) %----------------------------------------------------- %DLT Parameter를 계산하기 위한 행렬 for i=1:length(u) X(2*i-1,:) = [x(i) y(i) z(i) 1 0 0 0 0 -u(i)*x(i) -u(i)*y(i) -u(i)*z(i) -u(i)]; ...

[Paper review] Calibration of 3D kinematic systems using orthogonality constraints

Tomislav Pribanic, Peter Sturm, Mario Cifrek, "Calibration of 3D kinematic systems using orthogonality constraints", Machine vision and applications (2007) 18:367-381. 동작분석기를 위한 다중 카메라 보정방법에 대한 따끈따근한 논문이다. 봉을 이용한 캘리브레이션 논문이 흔하지 않은데 찾다보니 Peter strum의 인턴으로 있던 사람이 쓴 논문이다. 카메라 보정을 위해 3축이 있는 보정틀과 마커가 3개 붙어있는 보정봉을 이용하였다. 논문은 첨부파일에... abstract 부분 번역 내용은 아래와 같다. ---------------------------------------------------------------------------- Abstract. 다중카메라시스템에 의해 획득된 영상을 처리하는 것은 오늘날 3차원복원 수행의 효과적이고 편리한 방법이다. 점의 3차원 위치와 같은 기본적인 값을 통해 속도와 가속도 같은 추가적인 운동학적 데이터에 대한 정보를 얻을 수 있다. 그러므로 많은 복원 시스템은 3차원 운동학적 시스템 같은 것을 이용하고 동작분석을 위해 폭넓게 이용되고 있다. 점들의 실제좌표 복원을 위해 선행되어야 할 것은 다중카메라 시스템의 보정이다. 현재 많은 유명한 3차원 운동학적인 시스템은 마커를 붙인 막대기를 이용하는 막대보정(wand calibration)이라고 부르는 방법을 제공한다. 이 막대 보정은 많은 엔드유저의 관점에서 많은 전통적인 방법을 넘어 선호되는 방법이다. 이 연구에서 다른 보정 방법에 대한 간단한 비평과 3차원 운동학적인 시스템을 위한 전통적인 보정방법이 설명된다. 게다가 특히 카메라 보정의 초기화 단계에 적용될 수 있는 다른 방법이 제안된다. 특별히 제안된 방법은 마커사이 거리의 고정 뿐만 아니라 두 개 또는 세 개의 연결된 막대기의 직교성에 의존한다. 또한 제안된 아이디어...

[Paper review] Calibration of 3D kinematic systems using orthogonality constraints

Tomislav Pribanic, Peter Sturm, Mario Cifrek, "Calibration of 3D kinematic systems using orthogonality constraints", Machine vision and applications (2007) 18:367-381. 동작분석기를 위한 다중 카메라 보정방법에 대한 따끈따근한 논문이다. 봉을 이용한 캘리브레이션 논문이 흔하지 않은데 찾다보니 Peter strum의 인턴으로 있던 사람이 쓴 논문이다. 카메라 보정을 위해 3축이 있는 보정틀과 마커가 3개 붙어있는 보정봉을 이용하였다. 논문은 첨부파일에... abstract 부분 번역 내용은 아래와 같다. ---------------------------------------------------------------------------- Abstract. 다중카메라시스템에 의해 획득된 영상을 처리하는 것은 오늘날 3차원복원 수행의 효과적이고 편리한 방법이다. 점의 3차원 위치와 같은 기본적인 값을 통해 속도와 가속도 같은 추가적인 운동학적 데이터에 대한 정보를 얻을 수 있다. 그러므로 많은 복원 시스템은 3차원 운동학적 시스템 같은 것을 이용하고 동작분석을 위해 폭넓게 이용되고 있다. 점들의 실제좌표 복원을 위해 선행되어야 할 것은 다중카메라 시스템의 보정이다. 현재 많은 유명한 3차원 운동학적인 시스템은 마커를 붙인 막대기를 이용하는 막대보정(wand calibration)이라고 부르는 방법을 제공한다. 이 막대 보정은 많은 엔드유저의 관점에서 많은 전통적인 방법을 넘어 선호되는 방법이다. 이 연구에서 다른 보정 방법에 대한 간단한 비평과 3차원 운동학적인 시스템을 위한 전통적인 보정방법이 설명된다. 게다가 특히 카메라 보정의 초기화 단계에 적용될 수 있는 다른 방법이 제안된다. 특별히 제안된 방법은 마커사이 거리의 고정 뿐만 아니라 두 개 또는 세 개의 연결된 막대기의 직교성에 의존한다. 또한 제안된 아이디어...

The image of the absolute conic

* http://www.cse.iitd.ernet.in/~suban/vision/geometry/node45.html에 가면 The image of the absolute conic에 대한 내용이 있다. ---------------------------------------------------------------------------------- Cholesky decomposition을 이용하여 카메라의 내부파라미터 K(위 자료에서는 C)를 구하려고 시도했던적이 있었다. 내부파라미터를 계산하기 위해서 positive definite matrix가 되어야 한다.

Multi-Camera Wand Calibration

http://www.ee.surrey.ac.uk/CVSSP/VMRG/WandCalibration/에 있는 내용중 일부입니다. Multi-Camera Wand Calibration The use of multiple CCD cameras for generating three-dimensional data of visual scenes is becoming more and more widespread. Once such example is the Prometheus Project, using multiple cameras to generate 3D television content. As part of the project, a fast wand-based method was developed to calibrate the cameras so they can be used for accurate 3D reconstruction. As an aid to researchers working in this area, this site contains linux binaries, a full C++ implementation of the calibration technique, and details of the method. Calibration Wand The calibration wand used in this work is shown on the right. Its purpose is to provide two spheres separated by a known distance and easily distinguishable by their colour. We used two standard tennis balls, spray-painted bright red and bright green. The balls are held a fixed distance apart by a piece of wooden dowel passing through them ...

[Paper review]A convenient multi-camera self-calibration for virtual environments

Tomáš Svoboda, Daniel Martinee and Tomáš Pajdla, "A convenient multi-camera self-calibration for virtual environments," Teleoperators and virtual environments(2005), 14(4):407-422. 2005년에 나온 레이저포인터를 이용한 다중 카메라 보정 논문이다. 논문중에 abstract만 번역한 내용. -------------------------------------------------------------------------- Abstract. 가상몰입환경(virtual immersive environments) 또는 원격존재구조(telepresence setups)는 보정되어야하는 다중카메라로 구성되어있다. 이 연구에서는 카메라 보정을 위한 편리한 방법을 소개한다. 이 알고리즘에 적용하기 위한 최소의 카메라대수는 3대이며 최대는 제한이 없다. 이 방법은 완전히 자동이며 자유롭게 움직이는 밝은 점이 카메라 보정 물체로 사용된다. 가상 3차원 점들은 측정하고자하는 범위에서 밝은 점을 움직이는 것에 의해 계산된다. 그 점의 투영은 서브픽셀 정확도를 가지며 강건한 RANSAC 분석에 의해 검증된다. 카메라들은 모든 점들을 볼 수 없다. 실질적으로 카메라사이의 겹침으로 인해 보이는 마커만을 묶은 서브그룹이 필요하다. 사영 구조(projective structures)는 rank-4 인수분해를 통해 계산되고 기하학적인 구속조건에 의해 유클라디안 공간으로 변환된다. 이러한 선형계산에 의한 값은 완전히 자동적인 비선형외곡의 계산을 위한 초기해로 사용된다. 본 연구에서는 카메라 보정 물체로써 아주 일반적인 레이저 포인터를 어떻게 사용할 수 있는지 제안한다. 16대의 카메라가 있는 가상몰입환경에서 30분 이내에 재투영에러(reprojection error)가 약 1/5 픽셀에 도달하는 것이 가능함을 보인다. 이 방법은 많은...

cholesky 분해를 이용한 카메라 내부 파라미터 계산

책에 있는 내용을 참고해서 직접 작성한 코드입니다. 직교성을 가진 소실점(vanishing point)이 주어졌을 때 cholesky 분해를 이용하여 카메라 내부 파라미터 K를 계산하는 코드입니다. 여기서 가정은 square pixel이라는 것과 초점거리 fx = fy 가 같다는 것입니다. cholesky 분해를 위해서는 Omega 행렬이 positive definite 해야만 합니다. 소실점의 값이 제대로 계산되어 입력되지 않으면 cholesky 분해에서 positive definite이 아니라는 에러가 나올 것입니다. function K = sky_K_from_IAC(v1, v2) % function K = sky_K_from_IAC(v1, v2) % Input : v1, v2 -> vanishing points % Output : K -> internal parameters % % Reference : Multiple view geometry in computer vision, second edition(p.226) % Assumption : w11 = w22, w12 = w21 = 0 % w = [w1 0 w2; % 0 w1 w3; % w2 w3 w4]; % % Shin, Ki-Young % Biomedical Engineering Lab. % Sungkyunkwan univ. % Data : 2008/12/4 for i=1:length(v1) A(i,:) = [ v1(i,1) * v2(i,1) + v1(i,2) * v2(i,2) v1(i,3) * v2(i,1) + v1(i,1) * v2(i,3) v1(i,3) * v2(i,2) + v1(i,2) * v2(i,3) v1(i,3) * v2(i,3)]; end [U, S, V] = svd(A); W = V(:,end); % Omega must be positive definite Omega = [W(1) 0 W(2); 0 W(...

3개 마커를 이용한 소실점(vanishing point) 계산

모션 장비에서 카메라 보정을 위해서 wand calibration 방법을 사용한다. wand 로 카메라를 보정하는 방법은 여러가지가 있다. 그중에서 소실점(vanishing point)으로 카메라 내부파라미터를 계산하고 3차원 복원을 하는 방법이 있다. 소실점을 계산하기 위해서 보통 마커가 3개 있는 wand를 사용한다. 3개의 마커를 이용하여 소실점을 계산하는 방법은 cross ratio를 이용하는 방법이 있다. [참고자료 : www.geom.uiuc.edu/docs/forum/photo/ ] 이와같이 P, M1, M3라는 실좌표계에 점과 카메라 센터인 projection point, 그리고 image plane에 있는 점을 사이에 소실점(IH)를 계산하는 방법은 [dist(M2,P)/dist(M2,M1)] = [dist(IM2,IP)/dist(IM2,IM1)]/[dist(IH,IP)/dist(IH,IM1)]. 식을 이용하면 된다. 결국 거리의 비를 이용하여 소실점의 좌표를 계산할 수 있다. ------------------------------------------------------------------------------------------ 2005년 논문에 좀더 자세한 설명이 나와있다. F.C.Wu, Z.Y.Hu, H.J.Zhu, 'Camera calibration with moving one-dimensional objects", Pattern recognition, vol. 38, pp. 755-765, 2005.

[Paper review]Estimation of relative camera positions for uncalibrated cameras

Richard I. Hartley, Estimation of relative camera positions for uncalibrated cameras, Computer vision - ECCV '92, Lecture notes in computer science-series, vol. 588, pp. 579-587, 1992. 이 논문은 Essential matrix를 분해하여 R, t를 계산한뒤 카메라 행렬을 만들었다. 카메라 행렬이 4가지로 계산되어 뭘 선택해야하는지 애매하다. 물론 알고리즘 10번항에 According to the requirement that the matched points must lie in front of both camears 라는 말이 있긴하다. 직접 구현해서 어떤 점이 좋고 나쁜지 봐야겠다. 논문은 첨부파일에... 논문내용중에 Theorem 2. Suppose the matrix Q can be factored into a product RS where R is orthogonal and S is skew-symmetric. Let the Singular Value Decomposition of Q be UDV' where D=diag(k,k,0). Then up to a scale factor the factorization is one of the following: S = VZV' ; R = UEV' or UE'V' ; Q = RS. where E = [0 1 0; -1 0 0; 0 0 1], Z = [0 -1 0; 1 0 0; 0 0 0] 이고 카메라 행렬 P2는 P2 = (R -RT) is equal to (UEV' -U(0,0,1)') 이라는 내용이 있다.

Calculating the camera intrinsic parameter using cholesky decomposition

Camera calibration을 할 때 Absolute conic을 이용하여 카메라 내부 행렬을 계산할 때나 Homography를 이용하여 내부 행렬을 계산하기 위해서는 cholesky decomposition을 해야한다. ω 행렬(카메라 내부 행렬로 구성)을 무사히 cholesky decomposition하기 위해서는 ω 행렬이 반드시 positive definite이어야 한다. 만약 positive definite이 아니면 RANSAC을 다시 수행해서 ω 행렬을 다시 계산하던지 아니면 실험을 다시해서 ω 행렬을 다시 구해야만 한다. 관련된 논문 : Richard I. Hartley, Eric Hayman, Lourdes de Agapito and Ian Reid, Camera calibration and the search for infinity. The Proceedings of the seventh IEEE international conference on computer vision, vol. 1, pp. 510-517, 1999. 논문 내용중에 ... "If the computed ω is not positive definite, then this final step of Cholesky factorization is not possible."

RESUME Personal

Date of Birth: 1979.3.14 Age: 30 Sex: male Place of Birth: South Korea E-mail: shinky@skku.edu Education 2006/03 ~ present: doctoral course student (Sungkyunkwan Univ.) 2004/03 ~ 2006/02: mater degree (Sungkyunkwan Univ.) Research topic: Plantar pressure sensor using PZT ceramic 1998/03 ~ 2004/02: undergraduate (Sungkyunkwan Univ.) International paper (4) - Ki Young Lee, Ki-Young Shin , Hyo Shin Kim, Joung H. Mun (2009): 'Estimating muscle fatigue of the biceps brachii using high to low band ratio in EMG during isotonic exercise', International journal of precision engineering and manufacturing, Vol. 10, No. 3, pp. 147-153. - Sang Sik Lee, Ki-Young Shin , Joung H. Mun (2006): 'Development of Portable and Wireless Surface EMG', Key Engineering Materials , Vol.321-323, pp.1107-1110. - Sang Sik Lee, Ki-Young Shin , Joung H. Mun (2006): 'Development of an Algorithm for a PZT Ceramic Foot Sensor', Key Engineering Materials , Vol.321-323, pp.1111-1114. - Won-Ki Kim, K...