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)
-
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...
-
Image size of origin is 320*240. Processing time is 30.96 second took. The result of stitching The resul...
-
* Introduction - The solution shows panorama image from multi images. The panorama images is processing by real-time stitching algorithm...
-
In the YUV color format, Y is bright information, U is blue color area, V is red color area. Show the below picture. The picture is u-v col...
-
In past, I wrote an articel about YUV 444, 422, 411 introduction and yuv <-> rgb converting example code. refer to this page -> ht...
-
fig 1. Left: set 4 points (Left Top, Right Top, Right Bottom, Left Bottom), right:warped image to (0,0) (300,0), (300,300), (0,300) Fi...
-
CUDA_ARCH_BIN Table for gpu type Jetson Products GPU Compute Capability Jetson AGX Xavier 7.2 Jetson Nano 5.3 Jetson TX2 6.2 Jetson TX1 5.3 ...
-
This article explain how to access the thread index when you make block and thread with two dimensions. please refer to this page about me...
-
This is example for background subtraction on opencv 3.2 version previously, I post 2.7 version example on here. http://study.marearts.co...
-
If you have 4 byte array, for example buffer[4], you can change the byte buffer to float. ex) union BitConvert{ float f; unsigned long ...
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