블로그 이미지
Leeway is... the freedom that someone has to take the action they want to or to change their plans.
maetel

Notice

Recent Post

Recent Comment

Recent Trackback

Archive

calendar

1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
  • total
  • today
  • yesterday

Category

'camera calibration'에 해당되는 글 33건

  1. 2010.09.26 Dazhi Chen & Guangjun Zhan, "A New Sub-Pixel Detector for X-Corners in Camera Calibration Targets"
  2. 2010.09.24 Janne Heikkila & Olli Silven "A Four-step Camera Calibration Procedure with Implicit Image Correction"
  3. 2010.09.24 Learning OpenCV: Chapter 11 Camera Models and Calibration
  4. 2010.09.16 2010ETRIcg: report 0915
  5. 2010.09.15 2010ETRIcg: report 0916
  6. 2010.09.07 OpenCV: chessboard corners detection Test 1
  7. 2010.07.29 Seitz et al. "A Comparison and Evaluation of Multi-View Stereo Reconstruction Algorithms"
  8. 2010.07.21 Cheng-I Chen & Yong-Sheng Chen "Central Catadioptric Camera Calibration using Planar Objects"
  9. 2010.07.20 Ferenc Kahlesz & Cornelius Lilge & Reinhard Klein "Easy–to–Use Calibration of Multiple–Camera Setups"
  10. 2010.07.20 Kai Ide & Steffen Siering & Thomas Sikora, "Automating Multi-Camera Self-Calibration"
  11. 2010.07.20 Gregorij Kurillo & Zeyu Li & Ruzena Bajcsy, "Framework for Hierarchical Calibration of Multi-camera Systems for Teleimmersion"
  12. 2010.07.20 Ivo Ihrke & Lukas Ahrenberg & Marcus Magnor, “External camera calibration for synchronized multi-video systems”
  13. 2010.07.18 Yasutaka Furukawa "Accurate Camera Calibration from Multi-View Stereo and Bundle Adjustment"
  14. 2010.07.16 J. Weng, P. Cohen, and M. Herniou "Camera calibration with distortion models and accuracy evaluation"
  15. 2010.07.16 DLR Camera Calibration Toolbox
  16. 2010.07.07 Tomas Svoboda <Multi-Camera Self-Calibration>
  17. 2010.06.11 김준식 & 권인소 "동심원 패턴을 이용한 카메라 내부변수 보정 시스템 및 카메라 보정 방법" 3
  18. 2010.06.08 4D View Solutions
  19. 2010.06.08 G. Jiang and L. Quan "Detection of concentric circles for camera calibration"
  20. 2010.06.08 Xiaochun Cao & Hassan Foroosh "CAMERA CALIBRATION WITHOUT METRIC INFORMATION USING 1D OBJECTS"
  21. 2010.05.26 virtual studio 구현: camera calibration
  22. 2010.05.18 Jonathan Merritt's Camera Calibration for Blender
  23. 2010.05.18 virtual studio 구현: camera calibration test 1
  24. 2010.05.14 virtual studio 구현: feature points matching test
  25. 2010.04.22 GML C++ Camera Calibration Toolbox
2010. 9. 26. 15:57 Computer Vision
Dazhi Chen & Guangjun Zhan, "A New Sub-Pixel Detector for X-Corners in Camera Calibration Targets," WSCG Short Papers (2005): 97-100



The School of Instrumentation Scienc & Optoelectronics Engineering (SISOE), Beijing University of Aeronautics and Astronautics
posted by maetel
2010. 9. 24. 23:16 Computer Vision
Janne Heikkila, Olli Silven, "A Four-step Camera Calibration Procedure with Implicit Image Correction," cvpr, pp.1106, 1997 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'97), 1997


Matlab toolbox: http://www.ee.oulu.fi/~jth/calibr/

JanneHeikkilä - Machine Vision Group, Computer Science and Engineering Laboratory, University of Oulu
Olli Silven - Information Processing Laboratory, University of Oulu

cf.
http://www.vision.caltech.edu/bouguetj/calib_doc/htmls/parameters.html


1. Introduction

4-step
1) DLT (direct linear transformation) for initial parameter values [Tsai 1987, Abdel-Aziz 1971, Melen 1994]
2) Nonlinear parameter estimation for final parameter values [Slama 1980]
3) Correcting errors sourced from feature extraction
4) image correction: new implicit model to interpolate the correct image points


2. Explicit camera calibration

The pinhole camera model is based on the principle of collinearity, where each point in the object space is projected by a straight line through the projection center into the image plane.

http://en.wikipedia.org/wiki/Euler_angle











posted by maetel
2010. 9. 24. 16:24 Computer Vision
Learning OpenCV ebook
: Chapter 11 Camera Models and Calibration


ref.
opencv v2.1 documentation » cv. Image Processing and Computer Vision » Camera Calibration and 3D Reconstruction (c reference / cpp reference)
Noah Kuntz's OpenCV Tutorial 10 - Chapter 11


370p
detection of light from the world:
light source -> reflected light from a object -> our eye or camera (lens -> retina or imager)


cf. http://en.wikipedia.org/wiki/Electronic_imager


geometry of the ray's travel
 
pinhole camera model

ref. O'Connor 2002
al-Hytham (1021)
Descartes
Kepler
Galileo
Newton
Hooke
Euler
Fermat
Snell

ref.
Trucco 1998
Jaehne 1995;1997
Hartley and Zisserman 2006
Forsyth and Ponce 2003
Shapiro and Stockman 2002
Xu and Zhang 1996


projective geometry

lens distortion

camera calibration
1) to correct mathematically for the main deviations from the simple pinhole model with lenses
2) to relate camera measurements with measurements in the real, 3-dimensional world


3-D scene reconstruction


: Camera Model (371p)

camera calibration => model of the camera's geometry & distortion model of the lens : intrinsic parameters


homography transform

OpenCV function cvCalibrateCamera2() or cv::calibrateCamera

pinhole camera:
single ray -> image plane (projective plane)

(...) the size of the image relative to the distant object is given by a single parameter of the camera: its focal length. For our idealized pinhole camera, the distance from the pinhole aperture to the screen is precisely the focal length.

The point in the pinhole is reinterpreted as the center of projection.

The point at the intersection of the image plane and the optical axis is refereed to as the principal point.

(...) the individual pixels on a typical low-cost imager are rectangular rather than square. The focal length(fx) is actually the product of the physical focal length(F) of the lens and the size (sx) of the individual imager elements. (*sx converts physical units to pixel units.)


: Basic Projective Geometry (373p)

projective transform

homogeneous coordinates

The homogeneous coordinates associated with a point in a projective space of dimension n are typically expressed as an (n+1)-dimensional vector with the additional restriction that any two points whose values are proportional are equivalent.

camera intrinsics matrix (of parameters defining our camera, i.e., fx,fy,cx,and cy)

ref. Heikkila and Silven 1997


OpenCV function cvConvertPointsHomogeneous() or cv::convertPointsHomogeneous

cf. cvReshape or cv::reshape

For a camera to form images at a faster rate, we must gather a lot of light over a wider area and bend (i.e., focus) that light to converge at the point of projection. To accomplish this, we uses a lens. A lens can focus a large amount of light on a point to give us fast imaging, but it comes at the cost of introducing distortions.


: Lens Distortions (375p)

Radia distortions arise as a result of the shape of lens, whereas tangential distortions arise from the assembly process of the camera as a whole.


radial distortion:
External points on a frontfacing rectangular grid are increasingly displaced inward as the radial distance from the optical center increases.

"barrel" or "fish-eye" effect -> barrel distortion


tangential distortion:
due to manufacturing defects resulting from the lens not being exactly parallel to the imaging plane.


plumb bob (연직 추, 측량 추) model
ref. D. C. Brown, "Decentering distortion of lenses", Photogrammetric Engineering 32(3) (1966). 7: 444–462.
http://www.vision.caltech.edu/bouguetj/calib_doc/htmls/parameters.html

distortion vector (k1, k2, p1, p2, k3); 5-by-1 matrix


: Calibration (378p)

ref. http://www.vision.caltech.edu/bouguetj/calib_doc/

cvCalibrateCamera2() or cv::calibrateCamera
The method of calibration is to target the camera on a known structure that has many individual and identifiable points. By viewing this structure from a variety of angles, it is possible to then compute the (relative) location and orientation of the camera at the time of each image as well as the intrinsic parameters of the camera.


얘네는 뭔 있다 없다 하니...

cv::initCameraMatrix2D

cvFindExtrinsicCameraParams2



: Rotation Matrix and Translation Vector (379p)

Ultimately, a rotation is equivalent to introducing a new description of a point's location in a different coordinate system.


Using a planar object, we'll see that each view fixed eight parameters. Because the six parameters on two additional parameters that we use to resolve the camera intrinsic matrix. We'll then need at least two views to solve for all the geometric parameters.


: Chessboards (381p)

OpenCV opts for using multiple view of a planar object (a chessboard) rather than one view of  a specially constructed 3D object. We use a pattern of alternating black and white squares, which ensures that there is no bias toward one side or the other in measurement. Also, the resulting gird corners lend themselves naturally to the subpixel localization function.

use a chessboard grid that is asymmetric and of even and odd dimensions - for example, (5,6). using such even-odd asymmetry yields a chessboard that has only one symmetry axis, so the board orientation can always be defined uniquely.


The chessboard interior corners are simply a special case of the more general Harris corners; the chessboard corners just happen to be particularly easy to find and track.







cf. Chapter 10: Tracking and Motion: Subpixel Corners
319p: If you are processing images for the purpose of extracting geometric measurements, as opposed to extracting features for recognition, then you will normally need more resolution than the simple pixel values supplied by cvGoodFeaturesToTrack().

fitting a curve (a parabola)
ref. newer techniques
Lucchese02
Chen05


cvFindCornerSubpix() or cv::cornerSubPix (cf. cv::getRectSubPix )



ref.
Zhang99; Zhang00
Sturm99


: Homography (384p)




posted by maetel
2010. 9. 16. 00:40

보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.

2010. 9. 15. 21:33

보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.

2010. 9. 7. 17:29 Computer Vision
OpenCV 함수 cvFindChessboardCorners()와 cvDrawChessboardCorners() 사용


bool findChessboardCorners(const Mat& image, Size patternSize, vector<Point2f>& corners, int flags=CV_CALIB_CB_ADAPTIVE_THRESH+ CV_CALIB_CB_NORMALIZE_IMAGE)

Finds the positions of the internal corners of the chessboard.

Parameters:
  • image – Source chessboard view; it must be an 8-bit grayscale or color image
  • patternSize – The number of inner corners per chessboard row and column ( patternSize = cvSize(points _ per _ row,points _ per _ colum) = cvSize(columns,rows) )
  • corners – The output array of corners detected
  • flags

    Various operation flags, can be 0 or a combination of the following values:

    • CV_CALIB_CB_ADAPTIVE_THRESH use adaptive thresholding to convert the image to black and white, rather than a fixed threshold level (computed from the average image brightness).
    • CV_CALIB_CB_NORMALIZE_IMAGE normalize the image gamma with EqualizeHist before applying fixed or adaptive thresholding.
    • CV_CALIB_CB_FILTER_QUADS use additional criteria (like contour area, perimeter, square-like shape) to filter out false quads that are extracted at the contour retrieval stage.



file:///Users/lym/opencv/src/cv/cvcalibinit.cpp
https://code.ros.org/trac/opencv/browser/tags/2.1/opencv/src/cv/cvcalibinit.cpp



void drawChessboardCorners(Mat& image, Size patternSize, const Mat& corners, bool patternWasFound)

Renders the detected chessboard corners.

Parameters:
  • image – The destination image; it must be an 8-bit color image
  • patternSize – The number of inner corners per chessboard row and column. (patternSize = cvSize(points _ per _ row,points _ per _ colum) = cvSize(columns,rows) )
  • corners – The array of corners detected
  • patternWasFound – Indicates whether the complete board was found or not . One may just pass the return value FindChessboardCorners her



Learning OpenCV: Chapter 11. Camera Models and Calibration: Chessboards
381p


chessboard.bmp

640x480





console:
finding chessboard corners...
what = 1
chessboard corners: 215.5, 179
#0=(215.5, 179)    #1=(237.5, 178.5)    #2=(260.5, 178)    #3=(283.5, 177.5)    #4=(307, 177)    #5=(331.5, 175.5)    #6=(355.5, 174.5)    #7=(380.5, 174)    #8=(405.5, 173.5)    #9=(430.5, 172.5)    #10=(212.5, 201.5)    #11=(235.5, 201.5)    #12=(258, 200.5)    #13=(280.5, 200.5)    #14=(305.5, 199.5)    #15=(330, 198.5)    #16=(354.5, 198)    #17=(379.5, 197.5)    #18=(405.5, 196.5)    #19=(430.5, 196)    #20=(210, 224.5)    #21=(232.5, 224.5)    #22=(256, 223.5)    #23=(280, 224)    #24=(304, 223)    #25=(328.5, 222.5)    #26=(353.5, 222)    #27=(378.5, 221.5)    #28=(404.5, 221.5)    #29=(430.5, 220.5)    #30=(207, 247.5)    #31=(230.5, 247.5)    #32=(253.5, 247.5)    #33=(277.5, 247)    #34=(303, 247)    #35=(327, 246.5)    #36=(352, 246.5)    #37=(377.5, 246)    #38=(403.5, 245.5)    #39=(430, 245.5)    #40=(204.5, 271.5)    #41=(227.5, 271.5)    #42=(251.5, 271.5)    #43=(275.5, 271.5)    #44=(300, 272)    #45=(325.5, 271.5)    #46=(351, 271)    #47=(376.5, 271.5)    #48=(403, 271.5)    #49=(429.5, 271)    #50=(201.5, 295.5)    #51=(225.5, 295.5)    #52=(249.5, 296)    #53=(273.5, 296.5)    #54=(299, 297)    #55=(324, 296)    #56=(349.5, 296.5)    #57=(375.5, 296.5)    #58=(402.5, 296.5)    #59=(429, 297)   

finished









finding chessboard corners...
what = 0
chessboard corners: 0, 0
#0=(0, 0)    #1=(0, 0)    #2=(0, 0)    #3=(0, 0)    #4=(0, 0)    #5=(0, 0)    #6=(0, 0)    #7=(0, 0)    #8=(0, 0)    #9=(0, 0)    #10=(0, 0)    #11=(0, 0)    #12=(0, 0)    #13=(0, 0)    #14=(0, 0)    #15=(0, 0)    #16=(0, 0)    #17=(0, 0)    #18=(0, 0)    #19=(0, 0)    #20=(0, 0)    #21=(0, 0)    #22=(0, 0)    #23=(0, 0)    #24=(0, -2.22837e-29)    #25=(-2.22809e-29, -1.99967)    #26=(4.2039e-45, -2.22837e-29)    #27=(-2.22809e-29, -1.99968)    #28=(4.2039e-45, 1.17709e-43)    #29=(6.72623e-44, 1.80347e-42)    #30=(0, 0)    #31=(4.2039e-45, 1.45034e-42)    #32=(-2.2373e-29, -1.99967)    #33=(4.2039e-45, 2.52094e-42)    #34=(-2.2373e-29, -1.99969)    #35=(-2.22634e-29, -1.99968)    #36=(4.2039e-45, 1.17709e-43)    #37=(6.72623e-44, 1.80347e-42)    #38=(0, 0)    #39=(0, 1.80347e-42)    #40=(3.36312e-44, 5.46787e-42)    #41=(6.45718e-42, 5.04467e-44)    #42=(0, 1.80347e-42)    #43=(6.48101e-42, 5.48188e-42)    #44=(0, 1.4013e-45)    #45=(4.2039e-45, 0)    #46=(1.12104e-44, -2.22837e-29)    #47=(-2.22809e-29, -1.99969)    #48=(4.2039e-45, 6.72623e-44)    #49=(6.16571e-44, 1.80347e-42)    #50=(0, 0)    #51=(1.4013e-45, -2.27113e-29)    #52=(4.56823e-42, -1.99969)    #53=(4.2039e-45, -2.20899e-29)    #54=(-2.2373e-29, -1.9997)    #55=(-2.22619e-29, -1.99969)    #56=(4.2039e-45, 6.72623e-44)    #57=(-1.9997, 1.80347e-42)    #58=(0, -2.22957e-29)    #59=(-2.23655e-29, -2.20881e-29)   

finished










finding chessboard corners...
what = 0
chessboard corners: 0, 0
#0=(0, 0)    #1=(0, 0)    #2=(0, 0)    #3=(0, 0)    #4=(0, 0)    #5=(0, 0)    #6=(0, 0)    #7=(0, 0)    #8=(0, 0)    #9=(0, 0)    #10=(0, 0)    #11=(0, 0)    #12=(0, 0)    #13=(0, 0)    #14=(0, 0)    #15=(0, 0)    #16=(0, 0)    #17=(0, 0)    #18=(0, 0)    #19=(0, 0)    #20=(0, 0)    #21=(0, 0)    #22=(0, 0)    #23=(0, 0)    #24=(0, -2.22837e-29)    #25=(-2.22809e-29, -1.99967)    #26=(4.2039e-45, -2.22837e-29)    #27=(-2.22809e-29, -1.99968)    #28=(4.2039e-45, 1.17709e-43)    #29=(6.72623e-44, 1.80347e-42)    #30=(0, 0)    #31=(4.2039e-45, 1.45034e-42)    #32=(-2.2373e-29, -1.99967)    #33=(4.2039e-45, 2.52094e-42)    #34=(-2.2373e-29, -1.99969)    #35=(-2.22634e-29, -1.99968)    #36=(4.2039e-45, 1.17709e-43)    #37=(6.72623e-44, 1.80347e-42)    #38=(0, 0)    #39=(0, 1.80347e-42)    #40=(3.36312e-44, 5.46787e-42)    #41=(6.45718e-42, 5.04467e-44)    #42=(0, 1.80347e-42)    #43=(6.48101e-42, 5.48188e-42)    #44=(0, 1.4013e-45)    #45=(4.2039e-45, 0)    #46=(1.12104e-44, -2.22837e-29)    #47=(-2.22809e-29, -1.99969)    #48=(4.2039e-45, 6.72623e-44)    #49=(6.16571e-44, 1.80347e-42)    #50=(0, 0)    #51=(1.4013e-45, -2.27113e-29)    #52=(4.56823e-42, -1.99969)    #53=(4.2039e-45, -2.20899e-29)    #54=(-2.2373e-29, -1.9997)    #55=(-2.22619e-29, -1.99969)    #56=(4.2039e-45, 6.72623e-44)    #57=(-1.9997, 1.80347e-42)    #58=(0, -2.22957e-29)    #59=(-2.23655e-29, -2.20881e-29)   

finished







source code:
// Test: chessboard detection

#include <OpenCV/OpenCV.h> // frameworks on mac
//#include <cv.h>
//#include <highgui.h>

#include <iostream>
using namespace std;


int main()
{

    IplImage* image = cvLoadImage( "DSCN3310.jpg", 1 );
   
/*    IplImage* image = 0;
    // initialize capture from a camera
    CvCapture* capture = cvCaptureFromCAM(0); // capture from video device #0
    cvNamedWindow("camera");
                
    while(1) {
        if ( !cvGrabFrame(capture) ){
            printf("Could not grab a frame\n\7");
            exit(0);
        }
        else {
            cvGrabFrame( capture ); // capture a frame
            image = cvRetrieveFrame(capture); // retrieve the captured frame
*/           
//            cvShowImage( "camera", image );
            cvNamedWindow( "camera" );  cvShowImage( "camera", image );
   
            cout << endl << "finding chessboard corners..." << endl;
            CvPoint2D32f corners[60];
            int numCorners[60];
            //cvFindChessboardCorners(<#const void * image#>, <#CvSize pattern_size#>, <#CvPoint2D32f * corners#>, <#int * corner_count#>, <#int flags#>)
            int what = cvFindChessboardCorners( image, cvSize(10,6), corners, numCorners, CV_CALIB_CB_ADAPTIVE_THRESH );
            cout << "what = " << what << endl;
            cout << "chessboard corners: " << corners[0].x << ", " << corners[0].y << endl;            
       
    for( int n = 0; n < 60; n++ )
    {
        cout << "#" << n << "=(" << corners[n].x << ", " << corners[n].y << ")\t";
    }
    cout << endl;
       
            // cvDrawChessboardCorners(<#CvArr * image#>, <#CvSize pattern_size#>, <#CvPoint2D32f * corners#>, <#int count#>, <#int pattern_was_found#>)
    cvDrawChessboardCorners( image, cvSize(10,6), corners, 60, what );   
   
   
    cvNamedWindow( "chessboard" ); cvMoveWindow( "chessboard", 200, 200 ); cvShowImage( "chessboard", image );
    cvSaveImage( "chessboard.bmp", image );       
            cvWaitKey(0);
//        }
//    }
   
    cout << endl << "finished" << endl;
//   cvReleaseCapture( &capture ); // release the capture source
    cvDestroyAllWindows();
   
    return 0;
}





posted by maetel
2010. 7. 29. 17:08 Computer Vision
Seitz, S. M., Curless, B., Diebel, J., Scharstein, D., and Szeliski, R. 2006. A Comparison and Evaluation of Multi-View Stereo Reconstruction Algorithms. In Proceedings of the 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition - Volume 1 (June 17 - 22, 2006). CVPR. IEEE Computer Society, Washington, DC, 519-528. DOI= http://dx.doi.org/10.1109/CVPR.2006.19


S. Seitz et al. Multi-view stereo evaluation web page
http://vision.middlebury.edu/mview/
posted by maetel
2010. 7. 21. 15:51 Computer Vision
Central Catadioptric Camera Calibration using Planar Objects
Cheng-I Chen and Yong-Sheng Chen
Proceedings of the 5th International Conference on Computer Vision Systems (ICVS 2007)
Published in 2007 by Applied Computer Science Group, Bielefeld University, Germany, ISBN 978-3-00-020933-8
This document and other contributions archived and available at: http://biecoll.ub.uni-bielefeld.de


posted by maetel
Easy–to–Use Calibration of Multiple–Camera Setups
Ferenc Kahlesz, Cornelius Lilge & Reinhard Klein
University of Bonn, Institute of Computer Science II, Computer Graphics Group
http://biecoll.ub.uni-bielefeld.de
Proceedings of the ICVS(International Conference on Computer Vision Systems)  Workshop on Camera Calibration Methods for Computer Vision Systems - CCMVS2007 Published in 2007 by Applied Computer Science Group, Bielefeld University, Germany


posted by maetel
2010. 7. 20. 16:10 Computer Vision
Kai Ide & Steffen Siering & Thomas Sikora, "Automating Multi-Camera Self-Calibration", IEEE Workshop on Applications of Computer Vision, 2009

posted by maetel
2010. 7. 20. 15:41 Computer Vision
Kurillo, G., Li, Z., and Bajcsy, R. 2009. Framework for hierarchical calibration of multi-camera systems for teleimmersion. In Proceedings of the 2nd international Conference on Immersive Telecommunications (Berkeley, California, May 27 - 29, 2009). International Conference on Immersive Telecommunications. ICST (Institute for Computer Sciences Social-Informatics and Telecommunications Engineering), ICST, Brussels, Belgium, 1-6.

posted by maetel
2010. 7. 20. 15:17 Computer Vision
Ivo Ihrke & Lukas Ahrenberg & Marcus Magnor, “External camera calibration for synchronized multi-video systems”,
Journal of WSCG(the 12th International Conference in Central Europe on Computer Graphics, Visualization and Computer Vision), 2004                    
posted by maetel
2010. 7. 18. 17:05 Computer Vision
Accurate Camera Calibration from Multi-View Stereo and Bundle Adjustment
Yasutaka Furukawa & Jean Ponce, CVPR 2008

Yasutaka Furukawa
http://www.cs.washington.edu/homes/furukawa/

Jean Ponce
http://www.di.ens.fr/~ponce/
http://www-cvr.ai.uiuc.edu/ponce_grp/

DxO Labs (렌즈 왜곡 교정 소프트웨어)
http://www.dxo.com/

PMVS (Patch-based Multi-view Stereo Software) version 2
http://grail.cs.washington.edu/software/pmvs/

CMVS (Clustering Views for Multi-view Stereo)
http://grail.cs.washington.edu/software/cmvs/

sba : A Generic Sparse Bundle Adjustment C/C++ Package Based on the Levenberg-Marquardt Algorithm (Manolis Lourakis)
http://www.ics.forth.gr/~lourakis/sba/


image-based modeling

multi-view stereovision (MVS)

> two main approach camera calibration problem
1) chart-based calibration (CBC)
2) structure from motion (SFM) + auto-calibration + bundle adjustment (BA)

* selection of feature correspondences (SFC)
eg. RANSAC


Standard BA algorithms optimize both the scene point and camera parameters by minimizing the sum of squared reprojection errors.

Unlike BA algorithms, multi-view stereo algorithms are aimed at recovering scene information alone given fixed camera parameters.

DxO Optics Pro - Lens Distortion


In practice, we have found PMVS to be robust to errors in camera parameters as long as the image resolution matches the corresponding reprojection errors - that is, when features to be matched are roughly within two pixels of the corresponding 3D points.


> Algorithm

1) initializing feature correspondences
1-1) building image pyramids
1-2) for the given camera parameters, obtaining a conservative estimate of the expected reprojection error
1-3) sub-sampling

2) refining feature correspondences
2-1) determining a patch and the local image texture inside
2-2) optimizing the reference camera with the conjugate gradient method
2-3) removing outliers and updating the corresponding visibility information

3) updating the camera parameters with the SBA bundle adjustment software

4) repeat 1)-3) 4 times with the updated expected reprojection error and the fixed pyramid level







posted by maetel
J. Weng, P. Cohen, and M. Herniou. "Camera calibration with distortion models and accuracy evaluation." In IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI), 14(10): 965-980, 1992.


posted by maetel
The DLR Camera Calibration Toolbox
http://www.dlr.de/rm/desktopdefault.aspx/tabid-3925/


Institute of Robotics and Mechatronics, German Aerospace Center (DLR)



> 특징
스테레오 (두 대 이상의 카메라)
자동 캘리브레이션(카메라 렌즈 왜곡, 내부/외부 파라미터)
Hand-Eye Calibration
수동 조작 가능


[1] K. H. Strobl and G. Hirzinger. "Optimal Hand-Eye Calibration." In Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS 2006), Beijing, China, pp. 4647-4653, October 2006.

[2] J. Weng, P. Cohen, and M. Herniou. "Camera calibration with distortion models and accuracy evaluation." In IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI), 14(10): 965-980, 1992.

[3] K. H. Strobl and G. Hirzinger. "More Accurate Camera and Hand-Eye Calibrations with Unknown Grid Pattern Dimensions." In Proceedings of the IEEE International Conference on Robotics and Automation (ICRA 2008), Pasadena, California, USA, May 2008, in press.


posted by maetel
http://cmp.felk.cvut.cz/~svoboda/SelfCal/

Center for Machine Perception, Department of Cybernetics, Czech Technical University in Prague
posted by maetel
2010. 6. 11. 21:28 Computer Vision
- 특허명 : 동심원 패턴을 이용한 카메라 내부변수 보정 시스템 및 카메라 보정 방법
- 등록인 : 김준식, 권인소, 한국과학기술원
- 등록번호 : 386090

http://bsrc.kaist.ac.kr/board/read.cgi?board=s2_license

http://ppms.kaist.ac.kr:8087/sub01_1_view.html?mode=patent&ref_code=P-01246


posted by maetel
2010. 6. 8. 21:39 Computer Vision
Camera Calibration Software, 4D View Solutions: http://r24085.ovh.net/technology.html


Perception research group: Interpretation and Modeling of Images and Videos
&
MOAIS research group
in
GrImage (Grid and Image) lab, INRIA Grenoble

 
posted by maetel
2010. 6. 8. 14:18 Computer Vision
G. Jiang and L. Quan. Detection of concentric circles for camera calibration. Computer Vision, IEEE International Conference on, 1:333– 340, 2005.

Long Quan


matlab code

posted by maetel
2010. 6. 8. 12:27 Computer Vision
CAMERA CALIBRATION WITHOUT METRIC INFORMATION USING 1D OBJECTS

Xiaochun Cao and Hassan Foroosh
School of Computer Science, University of Central Florida



Classical techniques for camera calibration [1, 2, 3] require a so called calibration rig, with a set of correspondences between known points in the 3D space and their projections in the 2D image plane. Recent techniques propose more flexible plane-based calibration approaches [4, 5].

posted by maetel
2010. 5. 26. 22:59 Computer Vision
2010/02/10 - [Visual Information Processing Lab] - Seong-Woo Park & Yongduek Seo & Ki-Sang Hong
2010/05/18 - [Visual Information Processing Lab] - virtual studio 구현: camera calibration test



1. 내부 파라미터 계산

cvCalibrateCamera2() 함수를 이용하여 카메라 내부/외부 파라미터와 렌즈 왜곡 변수를 얻는다.


frame # 191  ---------------------------
# of found lines = 8 vertical, 6 horizontal
vertical lines:
horizontal lines:
p.size = 48
CRimage.size = 48
# of corresponding pairs = 15 = 15

camera matrix
fx=286.148 0 cx=207.625
0 fy=228.985 cy=98.8437
0 0 1

lens distortion
k1 = 0.0728017
k2 = -0.0447815
p1 = -0.0104295
p2 = 0.00914935

rotation vector
-0.117104  -0.109022  -0.0709096

translation vector
-208.234  -160.983  163.298



이 결과를 가지고 cvProjectPoints2()를 써서 패턴의 점에 대응되는 이미지 상의 점을 찾은 결과는 아래와 같다.




1-1.

카메라 내부 파라미터와 외부 파라미터를 모두 계산하는 cvCalibrateCamera2() 함수 대신 내부 파라미터만 계산하는
cvInitIntrinsicParams2D() 함수를 써 본다.



2. lens distortion(kappa1, kappa2)을 가지고 rectification

패턴 인식이 성공적인 경우 당연히 카메라 캘리브레이션 결과가 정확해지며, 이로부터 가상의 물체를 합성하기 위해 필요한 object 또는 graphic coordinate을 실시간으로 계산할 수 있다. 현재 우리 프로그램에서 패턴 인식이 실패하는 원인은 직선 검출의 오차인데, 이 오차의 원인으로는 여러가지가 있지만 가장 큰 것은 렌즈 왜곡이다. (현재 렌즈 왜곡을 고려하지 않고 있다.) 그래서 실제로는 하나의 직선에 대해 여러 개 (2-3개)의 직선을 검출하며 (NMS 알고리즘만으로는 이 오차를 줄이는 데 한계를 보이고 있어), 이로부터 계산된 교차점들의 위치 좌표 오차는 cross ratio 계산에 결정적인 오차로 작용한다. 현재 방식의 패턴 생성과 패턴 인식은 cross ratios 값에 절대적으로 의존하고 있기 때문에 이 문제를 반드시 해결해야 한다. 그러므로 렌즈 왜곡을 고려하여 입력 이미지를 펴서 (rectification) 기존의 패턴 인식 알고리즘을 적용하자.

ref.
Learning OpenCV: Chapter 6: Image Trasnforms
opencv v2.1 documentation — Geometric Image Transformations


1) Undistortion

Learning OpenCV: 396p
"OpenCV provides us with a ready-to-use undistortion algorithm that takes a raw image and the distortion coefficients from cvCalibrateCamera2() and produces a corrected image (see Figure 11-12). We can access this algorithm either through the function cvUndistort2(), which does everything we need in one shot, or through the pair of routines cvInitUndistortMap() and cvRemap(), which allow us to handle things a little more efficiently for video or other situations where we have many images from the same camera. ( * We should take a moment to clearly make a distinction here between undistortion, which mathematically removes lens distortion, and rectifi cation, which mathematically aligns the images with respect to each other. )

입력 영상 (렌즈 왜곡)

출력 영상 (왜곡 제거)






 

# of corresponding pairs = 30 = 30

camera matrix
fx=94.6664 0 cx=206.772
0 fy=78.3349 cy=158.782
0 0 1

lens distortion
k1 = 0.0130734
k2 = -0.000955421
p1 = 0.00287948
p2 = 0.00158042









            if ( ( k1 > 0.3 && k1 < 0.6 ) && ( cx > 150.0 && cx < 170.0 ) && ( cy > 110 && cy < 130 ) )


# of corresponding pairs = 42 = 42

camera matrix
fx=475.98 0 cx=162.47
0 fy=384.935 cy=121.552
0 0 1

lens distortion
k1 = 0.400136
k2 = -0.956089
p1 = 0.00367761
p2 = 0.00547217







2) Recitifaction




cvInitUndistortRectifyMap



3. line detection




4. 패턴 인식 (대응점 찾기)




5. 외부 파라미터 계산 (4의 결과 & lens distortion = 0 입력)
cvFindExtrinsicCameraParams2()



6. reprojection
2에서 얻은 rectificated image에 할 것




posted by maetel
2010. 5. 18. 01:43 Computer Vision
http://jmerritt.warpax.com/pytsai/

Jonathan Merritt (j.merritt@pgrad.unimelb.edu.au), PhD Student (Equine Biomechanics), The University of Melbourne Equine Centre

posted by maetel
2010. 5. 18. 00:26 Computer Vision
ref.
2010/02/10 - [Visual Information Processing Lab] - R. Y. Tsai "A Versatile Camera Calibration Technique for High Accuracy 3-D Maching Vision Metrology Using Off-the-shelf TV Cameras and Lenses"


(1) 고정되어 있는 것으로 가정한 카메라의 내부 파라미터 값들을 구하고 (2) 실시간으로 들어오는 이미지 프레임마다 카메라의 회전과 이동을 계산하기 위하여 Tsai 알고리즘을 쓰기로 하고, C 또는 C++로 구현된 소스코드 또는 라이브러리를 찾아서 붙여 보기로 한다.


Try #1.
처음에는 CMU의 Reg Willson가 C로 짠 Tsai Camera Calibration 코드 에서 필요한 부분을 include하여 쓰려고 했는데, C++ 문법에 맞지 않는 구식 C 문법으로 코딩된 부분이 많아서 고치는 데 애를 먹었다. (Xcode의 C++ 프로젝트에서 .c 파일을 include하면 compile은 되지만, linking error가 난다. 때문에 .c를 .cpp로 바꾸어야 함.)  그런데 결정적으로, "cal_main.cpp" 파일에 정의된, 캘리브레이션의 최종 결과값을 주는 함수들이 호출하는 optimization을 실행하는 함수 lmdif_()가  Fortan 파일 "lmdif.f"에 정의되어 있고, Fortran을 C로 변환해 주는 "f2c.h"에 의해 이것을 "lmdif.c"로 하여 가지고 있다는 문제가 있었다. lmdif.c를 lmdif.cpp 형태로 만들기 위해서는 Fortran 언어와 Fortran을 C++로 변환하는 방법을 알아야 하므로, 결국 포기했다.



Try #2.
Michigan State University Charles B. Owen Display-Relative Calibration (DRC)을 구현한 DRC 프로그램( DRC.zip )에서 카메라 캘리브레이션에 Tsai의 알고리즘 libtsai.zip을 쓰고 있다. 이 라이브러리는 위의 C 코드를 C++로 수정하면서 "CTsai"라는 클래스를 사용하고 여러 함수들을 수정/보완/결합한 것인데, Visual Studio 용 프로젝트 프로그램을 만들면서 Windows 환경에 기반하여 MFC를 활용하였다. 그래서 이것을 나의 Mac OS X 기반 Xcode 프로젝트에서 그대로 가져다 쓸 수는 없다. 용법은 다음과 같다.

DRC/DisplayRelativeCalibration.cpp:
bool CDisplayRelativeCalibration::ComputeCameraCalibration(void)
{
    CTsai tsai;

    tsai.Width(m_camerawid);
    tsai.Height(m_camerahit);

    for(std::list<Corr>::const_iterator i=m_cameracorr.begin();  i!=m_cameracorr.end();  i++)
    {
        tsai.Point(i->x, i->y, i->z, i->u, i->v);
    }

    if(tsai.PointCount() < 8)
        return Error("Didn't get enough points");

    if(!tsai.Compute())
        return Error("Camera calibration failed");

    for(int n=0;  n<tsai.PointCount();  n++)
    {
        double ux, uy;
        tsai.WorldToImage (tsai.PointX(n), tsai.PointY(n), tsai.PointZ(n), ux, uy);

        m_cameraproj.push_back(CGrPoint(ux, uy, 0));
    }

   
    m_cameraf = tsai.F();
    m_cameracx = tsai.Cx();
    m_cameracy = tsai.Cy();
    m_camerakappa1 = tsai.Kappa1();
    m_camerasx = tsai.Sx();
    memcpy(m_cameramatrix, tsai.CameraMatrix(), sizeof(double) * 16);

    return true;
}




문제점#1.

class CTsai 안의 member functions 중에  ncc_compute_exact_f_and_Tz( )와 ncc_compute_exact_f_and_Tz_error( )가 있는데,

libtsai.h:21
class CTsai
{

    bool ncc_compute_exact_f_and_Tz();
    bool ncc_compute_exact_f_and_Tz_error (int m_ptr, int n_ptr, const double *params, double *err);

};

전자인 ncc_compute_exact_f_and_Tz()가 정의된 부분을 보면, 

Tsai_ncc.cpp:274
bool CTsai::ncc_compute_exact_f_and_Tz()
{
    CLmdif<CTsai> lmdif;

    lmdif.Lmdif (this, ncc_compute_exact_f_and_Tz_error,
            m_point_count, NPARAMS, x,
            NULL, NULL, NULL, NULL);
}

클래스 형태의 템플릿( CLmdif )으로 선언된 "lmdif"의 member function "Lmdif"를 호출할 때, 

min/Lmdif.h:48
template<class T> class CLmdif : private CLmdif_
{

int Lmdif(T *p_user, bool (T::*p_func)(int m, int n, const double *parms, double *err),
        int m, int n, double *x, double *fvec, double *diag, int *ipvt, double *qtf)

};

후자인 같은 member function, ncc_compute_exact_f_and_Tz_error()를 인자로 넣고 있고 (위 부분 코드들 중 오렌지 색 부분), 컴파일 하면 이 부분을 <unknown type>으로 인식하지 못 하겠다는 에러 메시지를 보낸다. 그리고 다음과 같은 형태를 추천한다고 한다.
 
note: candidates are: int CLmdif<T>::Lmdif(T*, bool (T::*)(int, int, const double*, double*), int, int, double*, double*, double*, int*, double*) [with T = CTsai]

function pointer의 형태가 틀린 모양인데, 오렌지색 부분을 그냥 함수가 아닌 어떤 class의 non-static member function을 가리키는 pointer로  &CTsai::ncc_compute_exact_f_and_Tz_error 이렇게 바꾸어 주면, 에러 메시지가 다음과 같이 바뀐다.

error: no matching function for call to 'CLmdif<CTsai>::Lmdif(CTsai* const, bool (*)(int, int, const double*, double*), int&, const int&, double [3], NULL, NULL, NULL, NULL)'

연두색 부분 대신 CTsai::ncc_compute_exact_f_and_Tz_error 이렇게 바꾸어 주면, 에러 메시지가 다음과 같다.

error: no matching function for call to 'CLmdif<CTsai>::Lmdif(CTsai* const, bool (&)(int, int, const double*, double*), int&, const int&, double [3], NULL, NULL, NULL, NULL)'

해결:
편법으로, class CLmdif를 클래스 형 템플릿이 아닌 그냥 클래스로 바꾸어서 선언하고 연두색 부분처럼 호출하면 에러는 안 나기에 일단 이렇게 넘어가기로 한다.


문제점#2.
코드에서 Windows OS 기반 MFC를 사용하고 있어 Mac OS X에서 에러가 난다.

해결:
MFC를 사용하는 "StdAfx.h"는 모두 주석 처리한다.


문제점#3.
Lmdif.h



... 기타 등등의 문제점들을 해결하고, 캘리브레이션을 수행한 결과가 맞는지 확인하자.

source code:
           if ( CRimage.size() > 0 ) // if there is a valid point with its cross ratio
            {  
                correspondPoints(indexI, indexW, p, CRimage, linesYorder.size(), linesXorder.size(), world, CRworld, dxList.size(), dyList.size(), iplMatch, scale );
            }  
            cvShowImage( "match", iplMatch );
            cvSaveImage( "match.bmp", iplMatch );
           
            cout << "# of pairs = " << indexI.size() << " = " << indexW.size() << endl;
           
            // # 6. camera calibration
           
            int numPair = indexI.size();
           
            tsai.Clear();
           
            for( int n = 0;  n < numPair;  n++ )
            {
                tsai.Point(world[indexW[n]].x, world[indexW[n]].y, world[indexW[n]].z, p[indexI[n]].x, p[indexI[n]].y);
               
                cout << "pair #" << n << ": " << p[indexI[n]].x << "  " <<  p[indexI[n]].y << "  : "
                    << world[indexW[n]].x << "  " << world[indexW[n]].y << "  " << world[indexW[n]].z << endl;
            }
           
            if( numPair < 8 )
                cout << "Didn't get enough points" << endl;
           
            if(!tsai.Compute())
                cout << "Camera calibration failed" << endl;
           
            cout << endl << "camera parameter" << endl
            << "focus = " << tsai.F() << endl
            << "principal axis (x,y) = " <<  tsai.Cx() << ", " <<  tsai.Cy() << endl
            << "kappa1 (lens distortion) = " <<  tsai.Kappa1() << endl
            << "skew_x = " << tsai.Sx() << endl;
          
            // reproject world points on to the image frame to check the result of computing camera parameters
            for(int n=0;  n<tsai.PointCount();  n++)
            {
                double ux, uy;
                tsai.WorldToImage (tsai.PointX(n), tsai.PointY(n), tsai.PointZ(n), ux, uy);
                CvPoint reproj = cvPoint( cvRound(ux), cvRound(uy) );
                cvCircle( iplInput, reproj, 3, CV_RGB(200,100,200), 2 );
            }
           
// draw a cube on the image coordinate computed by camera parameters according to the world coordinate
            drawcube( tsai, iplInput, patSize );
            cvShowImage( "input", iplInput );  



아래 사진은 구해진 카메라 내부/외부 파라미터들을 가지고 (1) 실제 패턴의 점에 대응하는 이미지 프레임 (image coordinate) 상의 점을 찾아 (reprojection) 보라색 원으로 그리고, (2) 실제 패턴이 있는 좌표 (world coordinate)를 기준으로 한 graphic coordinate에 직육면체 cube를 노란색 선으로 그린 결과이다.

이미지 프레임과 실제 패턴 상의 점을 1 대 1로 비교하여 연결한 16쌍의 대응점

구한 카메라 파라미터를 가지고 실제 패턴 위의 점들을 이미지 프레임에 reproject한 결과 (보라색 점)와 실제 패턴의 좌표를 기준으로 한 그래픽이 이미지 프레임 상에 어떻게 나타나는지 그린 결과 (노란색 상자)

 

위 왼쪽 사진에서 보여지는 16쌍의 대응점들의 좌표값을 "이미지 좌표(x,y) : 패턴 좌표 (x,y,z)"로 출력한 결과:
# of pairs = 16 = 16
pair #0: 7.81919  36.7864  : 119.45  82.8966  0
pair #1: 15.1452  71.2526  : 119.45  108.484  0
pair #2: 26.1296  122.93  : 119.45  147.129  0
pair #3: 36.6362  172.36  : 119.45  182.066  0
pair #4: 77.3832  20.4703  : 159.45  82.8966  0
pair #5: 85.4293  53.7288  : 159.45  108.484  0
pair #6: 97.8451  105.05  : 159.45  147.129  0
pair #7: 109.473  153.115  : 159.45  182.066  0
pair #8: 96.6046  15.962  : 171.309  82.8966  0
pair #9: 105.046  48.8378  : 171.309  108.484  0
pair #10: 118.177  99.9803  : 171.309  147.129  0
pair #11: 130.4  147.586  : 171.309  182.066  0
pair #12: 145.469  4.50092  : 199.965  82.8966  0
pair #13: 154.186  36.5857  : 199.965  108.484  0
pair #14: 168.033  87.5497  : 199.965  147.129  0
pair #15: 180.732  134.288  : 199.965  182.066  0


그런데 위 오른쪽 사진에서 보여지는 결과는 이전 프레임에서 20쌍의 대응점으로부터 구한 카메라 파라미터 값을 가지고 계산한 결과이다.
# of found lines = 8 vertical, 7 horizontal
vertical lines:
horizontal lines:
p.size = 56
CRimage.size = 56

# of pairs = 20 = 20
pair #0: -42.2331  53.2782  : 102.07  108.484  0
pair #1: -22.6307  104.882  : 102.07  147.129  0
pair #2: -4.14939  153.534  : 102.07  182.066  0
pair #3: 1.81771  169.243  : 102.07  193.937  0
pair #4: -10.9062  41.1273  : 119.45  108.484  0
pair #5: 8.69616  92.7309  : 119.45  147.129  0
pair #6: 27.0108  140.945  : 119.45  182.066  0
pair #7: 32.9779  156.653  : 119.45  193.937  0
pair #8: 57.4164  14.6267  : 159.45  108.484  0
pair #9: 77.7374  65.9516  : 159.45  147.129  0
pair #10: 96.3391  112.934  : 159.45  182.066  0
pair #11: 102.524  128.555  : 159.45  193.937  0
pair #12: 76.5236  7.21549  : 171.309  108.484  0
pair #13: 97.5633  58.2616  : 171.309  147.129  0
pair #14: 116.706  104.705  : 171.309  182.066  0
pair #15: 123.108  120.238  : 171.309  193.937  0
pair #16: 125.015  -11.5931  : 199.965  108.484  0
pair #17: 146.055  39.453  : 199.965  147.129  0
pair #18: 164.921  85.2254  : 199.965  182.066  0
pair #19: 171.323  100.758  : 199.965  193.937  0

camera parameter
focus = 3724.66
principal axis (x,y) = 168.216, 66.5731
kappa1 (lens distortion) = -6.19473e-07
skew_x = 1



대응점 연결에 오차가 없으면, 즉, 패턴 인식이 잘 되면, Tsai 알고리즘에 의한 카메라 파라미터 구하기가 제대로 되고 있음을 확인할 수 있다. 하지만, 현재 full optimization (모든 파라미터들에 대해 최적화 과정을 수행하는 것)으로 동작하게 되어 있고, 프레임마다 모든 파라미터들을 새로 구하고 있기 때문에, 속도가 매우 느리다. 시험 삼아 reprojection과 간단한 graphic을 그리는 과정은 속도에 큰 영향이 없지만, 그전에 카메라 캘리브레이션을 하는 데 필요한 계산 시간이 길다. 입력 프레임이 들어오는 시간보다 훨씬 많은 시간이 걸려 실시간 구현이 되지 못 하고 있다.

따라서, (1) 내부 파라미터는 첫 프레임에서 한 번만 계산하고 (2) 이후 매 프레임마다 외부 파라미터 (카메라의 회전과 이동)만을 따로 계산하는 것으로 코드를 수정해야 한다.




Try#3.
OpenCV 함수 이용

1) 내부 파라미터 계산
cvCalib
rateCamera2


2) lens distortion(kappa1, kappa2)을 가지고 rectification
cvInitUndistortRectifyMap

3) line detection

4) 패턴 인식 (대응점 찾기)

5) 외부 파라미터 계산 (4의 결과 & lens distortion = 0 입력)
cvFindExtrinsicCameraParams2

6) reprojection
2)에서 얻은 rectificated image에 할 것


posted by maetel
2010. 5. 14. 21:50 Computer Vision
Test on the correspondences of feature points
특징점 대응 시험

교점의 cross ratio 값을 구하고, 그 값과 가장 가까운 cross ratio 값을 가지는 점을 패턴에서 찾아 대응시킨다.


Try #1. one-to-all

입력 영상에서 검출한 직선들로부터 생기는 각 교점에서 수평 방향으로 다음 세 개의 교점, 수직 방향으로 다음 세 개의 교점을 지나는 직선에 대한 cross ratio (x,y)값을 구한다. 이상적으로, 1에서 구한 cross ratio 값과 일치하는 cross ratio 값을 가지는 패턴의 격자점이 입력 영상의 해당 교차점과 실제로 대응하는 점이라고 볼 수 있다.

직선 검출에 오차나 오류가 적을 경우, 아래 테스트 결과에서 보듯 입력 영상의 교차점에 대해 실제 패턴의 직선을 1대 1로 즉각적으로 찾는다. 즉, 입력 영상의 한 점에서의 수평 방향 cross ratio 값에 대해 패턴의 모든 수평선들의 cross ratio 값을 일일이 대조하여 가장 근접한 값을 가지는 직선을 대응시키는 방식이다. (아래 오른쪽 사진은 같은 방식으로 수직 방향 cross ratio 값을 가지고 대응되는 직선을 찾는 경우임.) (point-to-line)

수평선 위의 점들에 대한 cross ratio 값만 비교한 결과

수선 위의 점들에 대한 cross ratio 값만 비교한 결과



입력 영상에서 하나의 교차점의 x방향 cross ratio 값과 같은 cross ratio 값을 가지는 세로선을 실제 패턴에서 찾고, y방향 cross ratio 값에 대해서 가로선을 찾으면, 패턴 위에 그 세롯선과 가로선이 교차하는 점 하나가 나온다. 입력 이미지 상의 한 점에 대해 패턴의 모든 직선을 (가로선의 개수+세로선의 개수) 번 비교하여 대응점을 연결하는 것이다. (point-to-point)

(패턴 인식이 성공적인 경우)

(잘못된 대응점 연결이 발생한 경우)




그러므로 현재는 (1) 입력 영상에서 한 직선 위에 있는 것으로 추산된 일련의 점들에서의 cross ratio 값들의 수치적 경향을 고려하지 않고 있으며, (2) 입력 영상에 실제 패턴의 어느 부분(위치나 범위)이 잡힌 것인지를 판단하지 않고 무조건 전체 패턴의 모든 격자점들에 대해서 cross ratio 값을 비교하고 있다.      




Try #2. line-to-line




잘 되는 경우:
# of pairs = 25 = 25
# of imagePoints = 25 , 25
# of worldPoints = 25 , 25
imagePoint (0, 0) : worldPoint (4, 1)
imagePoint (0, 1) : worldPoint (4, 2)
imagePoint (0, 2) : worldPoint (4, 3)
imagePoint (0, 3) : worldPoint (4, 4)
imagePoint (0, 4) : worldPoint (4, 5)
imagePoint (1, 0) : worldPoint (5, 1)
imagePoint (1, 1) : worldPoint (5, 2)
imagePoint (1, 2) : worldPoint (5, 3)
imagePoint (1, 3) : worldPoint (5, 4)
imagePoint (1, 4) : worldPoint (5, 5)
imagePoint (2, 0) : worldPoint (6, 1)
imagePoint (2, 1) : worldPoint (6, 2)
imagePoint (2, 2) : worldPoint (6, 3)
imagePoint (2, 3) : worldPoint (6, 4)
imagePoint (2, 4) : worldPoint (6, 5)
imagePoint (3, 0) : worldPoint (7, 1)
imagePoint (3, 1) : worldPoint (7, 2)
imagePoint (3, 2) : worldPoint (7, 3)
imagePoint (3, 3) : worldPoint (7, 4)
imagePoint (3, 4) : worldPoint (7, 5)
imagePoint (4, 0) : worldPoint (8, 1)
imagePoint (4, 1) : worldPoint (8, 2)
imagePoint (4, 2) : worldPoint (8, 3)
imagePoint (4, 3) : worldPoint (8, 4)
imagePoint (4, 4) : worldPoint (8, 5)



잘 안 되는 경우:
# of pairs = 28 = 28
# of imagePoints = 28 , 28
# of worldPoints = 28 , 28
imagePoint (0, 0) : worldPoint (4, 6)
imagePoint (0, 1) : worldPoint (4, 7)
imagePoint (0, 2) : worldPoint (4, 1)
imagePoint (0, 3) : worldPoint (4, 2)
imagePoint (0, 4) : worldPoint (4, 3)
imagePoint (0, 5) : worldPoint (4, 4)
imagePoint (0, 6) : worldPoint (4, 5)
imagePoint (1, 0) : worldPoint (9, 6)
imagePoint (1, 1) : worldPoint (1, 7)
imagePoint (1, 2) : worldPoint (5, 1)
imagePoint (1, 3) : worldPoint (5, 2)
imagePoint (1, 4) : worldPoint (5, 3)
imagePoint (1, 5) : worldPoint (5, 4)
imagePoint (1, 6) : worldPoint (5, 5)
imagePoint (2, 0) : worldPoint (9, 6)
imagePoint (2, 1) : worldPoint (3, 7)
imagePoint (2, 2) : worldPoint (6, 1)
imagePoint (2, 3) : worldPoint (6, 2)
imagePoint (2, 4) : worldPoint (6, 3)
imagePoint (2, 5) : worldPoint (6, 4)
imagePoint (2, 6) : worldPoint (6, 5)
imagePoint (3, 0) : worldPoint (9, 6)
imagePoint (3, 1) : worldPoint (0, 7)
imagePoint (3, 2) : worldPoint (7, 1)
imagePoint (3, 3) : worldPoint (7, 2)
imagePoint (3, 4) : worldPoint (7, 3)
imagePoint (3, 5) : worldPoint (7, 4)
imagePoint (3, 6) : worldPoint (7, 5)

posted by maetel
2010. 4. 22. 20:05 Computer Vision
Graphics and Media Lab
CMC department, Moscow State University
http://graphics.cs.msu.ru/en/science/research/calibration/cpp
posted by maetel