8/18/2011
Camera calibration using pattern image / C++ source (OpenCV) / 패턴 그림을 이용한 카메라 캘리브레이션 소스
Created Date : 2008.11
Language : C/C++
Tool : Microsoft Visual C++
Library & Utilized : OpenCV 1.0
Reference : Learning OpenCV Book
I made Camera calibration source for my convenience using the book that is "Learning OpenCV".
First of all, prepare several pattern images. And make same file name with ordered index.
Ex) pattern1.jpg, pattern2.jpg, pattern3.jpg ...
And answer the some questions.
Pattern width box count(black box number), height box count, the number of image
and file path and file name. Then point extraction is processed.
After all processing, below file is saved in the folder that is same location as images.
Distortion.xml
Distortion.txt
intrinsic.xml
intrinsic_matrix.txt
rotation_matricex.txt
rotation_matricex.xml
translation_matrices.txt
translation_matrices.xml
The points of each pattern image is saved as below file names.
pattern1.txt, pattern2.txt, pattern3.txt......
This source uses 'cvFindChessboardCorners' and 'cvFindCornerSubPix' functions for detecting pattern point. And for drawing, 'cvDrawChessboardCorners' function is used. 'cvCalibrateCamera2' is used for calibration.
This code is programed by Microsoft Visual studio 6.0 and OpenCV 1.0 Lib.
All OpenCv 1.0 dlls are included in the zip file.
You can download heare - > < entire source >
If you have any progressive agenda, Plz give me using reply.
Thank you.
(Please understand my bad english ability. If you point out my mistake, I would correct pleasurably. Thank you!!)
------------------------------------------------------------------------------
OpenCV를 이용한 카메라 캘리브레이션(캡쳐된 이미지를 이용함)
체스 보드 패턴의 교정판을 사용함
프로그램 실행후
패턴의 가로, 세로 점 개수 입력
패턴의 경로 입력 (예: ./p1/image)
패턴의 개수 입력 (10으로 입력하면 ./p1/image1.jpg ./p1/image2.jpg ... ./p1/image10.jpg)
이미지 한 장씩 교정점을 찾는다.
교정점을 제대로 찾지 못한 이미지는 실패로 간주하고 사용하지 않는다.
입력된 이미지를 모두 다 처리한 후
Zhang's 캘리브레이션을 수행
콘솔 창에 내부 파라미터 Instrinsic Matrirx와 왜곡 계수 Distortion Vector 값을 출력 해주고
또한 각각을 xml 파일로 저장한다.
그리고 각 패턴에 대한 Rotion 과 Translation Matrix 또한 콘솔 창에 출력하고 xml파일로 저장한다.
저장된 Instrinsic parameter, distortion coffecient를 이용하여 어플리케이션 구현이 가능하다.
체스보드에서 교정점을 찾는 방법은
cvFindChessboardCorners, cvFindCornerSubPix 함수를 이용하였으며
찾은 교정점을 그려주는 함수는 cvDrawChessboardCorners를 이용
캘리브레이션은 cvCalibrateCamera2 함수를 이용함
본 소스는 microsoft visual studio 6.0, opencv 1.0을 이용하여 만든 소스입니다.
여기서 다운 받을수 있습니다. - > < entire source >
Subscribe to:
Post Comments (Atom)
-
* Introduction - The solution shows panorama image from multi images. The panorama images is processing by real-time stitching algorithm...
-
As you can see in the following video, I created a class that stitching n cameras in real time. https://www.youtube.com/user/feelmare/sear...
-
This is GPU version of this page -> http://feelmare.blogspot.kr/2013/12/finding-largest-subset-images-that-is.html Please refer detail ...
-
Image size of origin is 320*240. Processing time is 30.96 second took. The result of stitching The resul...
-
My Environment : MS VS 2008 & MFC(Dialog Based) Joy Stick : Logitech Extreme 3D pro (XBox Type) Cteated Date : 2012. 03 [source code]...
-
Created Date : 2011.10 Language : C/C++ Tool : Microsoft Visual C++ 2008 Library & Utilized : OpenCV 2.3 Reference : SIFT referenc...
-
Created Date : 2007.8 Language : C/C++ Tool : Microsoft Visual C++ 6.0 (MFC) Library & Utilized : - Reference : Simplified approach ...
-
This is example class creation. RotatedRect tRect(Point2f(p2.x, p2.y), Size2f(W,H), atan(mn.first)*180/3.1415); In Here, p2.x, p2.y is ...
-
Video stabilization example source code. The principle is like that... Firstly, to obtain 2 adjacent images extract good feature to t...
-
numberList = [ 1 , 2 , 3 , 4 , 5 ] strList = [ 'one' , 'two' , 'three' , 'five' ] # No iterables are passe...
Your study is very interesting!! I hope that you attach to next subjects. Always Thank you.
ReplyDeletecan you plz Sir send me the source code to my email :
yahyaalkhaldi@yahoo.com
Hello yahya, I have linked the source code in here -> https://docs.google.com/file/d/0B7Z5A9fd6h29MWUxNTllMmQtMzJmMi00NGM2LWIzZmUtYmM5ZmUyNjM1YjU2/edit?hl=ko
ReplyDeletethank you