블로그 이미지
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

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. 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. 27. 22:19 Computer Vision
ref. 2010/04/27 - [Visual Information Processing Lab] - virtual studio 구현: grid pattern generator

case #1

Visual Studio: project 속성 > 구성 속성 > 디버깅 > 명령 인수
가로선: 40(개수) 15(최소 픽셀수) 45(최대 픽셀수) 20
세로선: 30 15 45 20

세로선 40개 간격:  가로선 30개 간격: 





세로선 40개, 가로선 30개로 생성된 패턴 (400x300pixels)

오른쪽의 패턴을 7배 확대한 영상


현재 코드는 검은색 바탕에 흰색 사각형을 그리게 되는데, 소수 값을 정수 값 (픽셀의 위치 좌표)으로 변환하는 과정에서 오차가 발생한다. 얼핏 격자 무늬로 보이는 오른쪽 그림을 확대한 왼쪽 그림을 보면, 격자 사이가 벌어지거나 겹치는 부분이 생긴다는 것을 알 수 있다.


그리는 방법을 달리했더니 해결된다. 이미지와 같은 높이의 세로 막대들을 하얀색으로 먼저 그리고 나서, 이미지와 같은 너비의 가로 막대들을 하얀색으로 그리고, 막대들이 서로 교차하는 (하얀색으로 두 번 그린 셈인) 부분을 다시 검은색으로 그렸다. (이건 뭔... 컴퓨터 비전도 이미지 프로세싱도 아니고 그렇다고 컴퓨터 그래픽스라고 보기도 우습고,  중학교 수학 경시대회 난이도 중상 정도의 문제를 푸는 기분이다. )

세로선 40개, 가로선 30개로 생성된 패턴 (400x300pixels)

오른쪽의 패턴을 7배 확대한 영상








각 꼭지점에서의 x방향과 y방향의 cross ratio 값을 계산한 결과는 다음과 같다. 이 중 값이 "-1"로 나온 것은 그 점에서 해당 방향의 직선에 대해 cross ratio를 계산할 수 없는 경우를 표시하기 위해 초기값으로 주었던 것이다.

CRworldX:
0.386312  0.094615  0.414865  0.284612  0.161689  0.323677  0.132262  0.471754  0.166943  0.114793  0.526767  0.146283  0.268856  0.254384  0.210419  0.282485  0.229261  0.262292  0.233925  0.302709  0.107159  0.385672  0.237546  0.276318  0.328597  0.0923081  0.439814  0.151013  0.295795  0.157482  0.342474  0.354428  0.0689949  0.5625  0.0725959  0.503555  0.0725959  -1  -1  -1 
CRworldY:
0.144347  0.293357  0.3338  0.212505  0.221081  0.232091  0.287101  0.203252  0.312434  0.113198  0.555337  0.105233  0.283001  0.261716  0.167103  0.452516  0.180647  0.218986  0.240322  0.260169  0.24469  0.125  0.5625  0.071018  0.512553  0.071018  0.384156  -1  -1  -1 





source code:
// calculate cross ratios in the world coordinate on real pattern
void crossRatioWorld( vector<CvPoint2D32f>& CRworld, vector<CvPoint3D32f>& world,  int dxListSize, int dyListSize, CvPoint2D32f scale )
{
    //    vector<CvPoint2D32f> crossRatioWorld; // cross ratios in the world coordinate on real pattern
    float crX = -1.0, crY = -1.0;
   
    for( int i = 0; i < dxListSize; i++ )   
    {
        for( int j = 0; j < dyListSize; j++ )
        { 
            CRworld.push_back(cvPoint2D32f(crX, crY));
        }
    }
   
    cout << "CRworld.size = " << CRworld.size() << endl;
   
    //  "cr[iP] = p1 * p3 / ((p1 + p2) * (p2 + p3))" in psoBasic.cpp: 316L
    // that is (b-a)(d-c)/(c-a)(d-b) with 4 consecutive points, a, b, c, and d
    float a, b, c, d;
    // cross ratios in horizontal lines
    for( int i = 0; i < dxListSize-3; i++ )   
    {
        a = world[i*dyListSize].x;
        b = world[(i+1)*dyListSize].x;
        c = world[(i+2)*dyListSize].x;
        d = world[(i+3)*dyListSize].x;
       
        crX = ( (b-a)*(d-c) ) / ( (c-a)*(d-b) ) ;
       
        for( int j = 0; j < dyListSize; j++ )
        {
            CRworld[i*dyListSize+j].x = crX;
        }
    }
   
    // cross ratios in vertical lines
    for( int j = 0; j < dyListSize-3; j++ )
    {
        a = world[j].y;
        b = world[j+1].y;
        c = world[j+2].y;
        d = world[j+3].y;
       
        crY = ( (b-a)*(d-c) ) / ( (c-a)*(d-b) ) ;
       
        for( int i = 0; i < dxListSize; i++ )
        {
            CRworld[i*dyListSize+j].y = crY;
        }
    }
   
    cout << "CRworldX: " << endl;
    for( int i = 0; i < dxListSize; i++ )
    {
        cout << /* "CRworldX[" << i << "] = " << */ CRworld[i*dyListSize].x << "  ";
    }
    cout << endl << "CRworldY: " << endl;
    for( int j = 0; j < dyListSize; j++ )
    {
        cout << /* "CRworldY[" << j << "] = " << */ CRworld[j].y << "  ";
    }
   
    // just to check
    /*    for( int i = 0; i < dxListSize; i++ )   
     {
     for( int j = 0; j < dyListSize; j++ )
     {
     cout << "CRworld[" << i << "," << j << "] = " << CRworld[i*dyListSize+j].x << ", " << CRworld[i*dyListSize+j].y << endl;;
     }
     }
     cout << endl;
     */  
}



Grids 40x30 Dim.s 4000x3000







case #2

Visual Studio: project 속성 > 구성 속성 > 디버깅 > 명령 인수
가로선: 15(개수) 10(최소 픽셀수) 40(최대 픽셀수) 20
세로선: 12 10 40 20




dxListSize = 15     dyListSize = 12
worldSize = 180
scale = 1.11126, 0.833261
CRworld.size = 180
CRworldX:
0.267229  0.236729  0.124688  0.485958  0.0692628  0.545564  0.0944922  0.443539  0.171158  0.294299  0.195769  0.150979  -1  -1  -1  
CRworldY:
0.165879  0.399442  0.23958  0.189141  0.133199  0.575565  0.0899842  0.341729  0.207025  -1  -1  -1  



Grids 15x12 Dim.s 1500x1200


posted by maetel
2010. 4. 27. 22:07

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

2010. 4. 22. 20:50 Computer Vision
ref.
swPark_2000rti 439쪽: In the initial identification process, we first extract and identify vertical and horizontal lines of the pattern by comparing their cross-ratios, and then we compute the intersections of the lines. Theoretically with this method, we can identify feature points in every frame automatically, but several situations cause problems in the real experiments.


박승우_1999전자공학회지 94쪽: 초기 인식과정에서는 패턴 상의 교점을 인식하기 위해 패턴의 제작과정에서 설명한 것처럼 영상에서 구해진 가로선과 세로선의 Cross-ratio를 패턴의 가로선과 셀로선이 가지는 Cross-ratio와 비교함으로써 몇번째 선인지를 인식하게 된다. 이러한 방법을 이용해 영상으로부터 자동으로 특징점을 찾고 인식할 수 있지만, 실제 적용 상에서는 몇 가지 제한점이 따르게 된다.



0. NMS (Non Maximum Suppression)을 적용한 Hough transform에 의한 Line 찾기

OpenCV 라이브러리의 HoughLines2() 함수는 전에 기술한 바( http://leeway.tistory.com/801 )와 같이 실제 패턴에서는 하나의 직선 위에 놓인 점들에 대해 이미지 프레임에서 검출된 edges을 가지고 여러 개의 직선을 찾는 결과를 보인다. 이는 HoughLines2() 함수가 출력하는, 직선을 정의하는 두 파라미터 rho와 theta에 대해 ( x*cos(theta) + y*sin(theta) = rho ) 계산된 값들이 서로 비슷하게 나오는 경우에 최적값을 선별하는 과정을 거치지 않고 모든 값들을 그대로 내보내기 때문이다. 그래서 OpenCV의 이 함수를 이용하지 않고, 따로 Hough transform을 이용하여 선을 찾는 함수를 만들되 여기에 NMS (Non Maximum Suppression)를 적용하도록 해 보았다. 하지만 이 함수를 실시간 비디오 카메라 입력에 대해 매 프레임마다 실행시키면 속도가 매우 느려져 쓸 수 없었다. 그래서, 속도 면에서 월등한 성능을 보이는 OpenCV의 HoughLines2() 함수를 그대로 따 오고 대신 여기에 NMS 부분을 추가하여 수정한 함수를 매 입력 프레임마다 호출하는 방법을 택하였고, 실시간 처리가 가능해졌다. (->소스코드)


http://en.wikipedia.org/wiki/Feature-point_detection



1. 직선의 순서 매기기

산출된 수직선들을 이미지 프레임의 왼쪽에서부터 오른쪽으로 나타난 순서대로 번호를 매기고 (아래 그림의 붉은색 번호), 수평선들을 위로부터 아래로 나타난 순서대로 번호를 매긴다 (아래 그림의 푸른색 번호). 이 과정에서 수직선의 경우 x절편, 수평선의 경우 y절편의 값을 기준으로 하여 계산하였다. 



아래 코드에서 "line.x0"가 "line" 직선의 x절편임
// rearrange lines from left to right
void indexLinesY ( CvSeq* lines, IplImage* image )
{   
    // retain the values of "rho" & "theta" of found lines
    int numLines = lines->total;
    // line_param line[numLines]; 이렇게 하면 나중에 이 변수를 밖으로 빼낼 때 (컴파일 에러는 안 나지만) 문제가 됨.
    line_param *line = new line_param[numLines];

    for( int n = 0; n < numLines; n++ )
    {
        float* newline = (float*)cvGetSeqElem(lines,n);
        line[n].rho = newline[0];
        line[n].theta = newline[1];
    }
   
    // rearrange "line" array in geometrical order
    float temp_rho, temp_theta;
    for( int n = 0; n < numLines-1; n++ )
    {
        for ( int k = n+1; k < numLines; k++ )
        {
            float x0_here = line[n].rho / cos(line[n].theta);
            float x0_next = line[k].rho / cos(line[k].theta);
            if( x0_here > x0_next ) {
                temp_rho = line[n].rho;        temp_theta = line[n].theta;
                line[n].rho = line[k].rho;        line[n].theta = line[k].theta;
                line[k].rho = temp_rho;        line[k].theta = temp_theta;
            }
        }
    }
    // calculate the other parameters of the rearranged lines
    for( int n = 0; n < numLines; n++ )
    {
        line[n].a = cos(line[n].theta);
        line[n].b = sin(line[n].theta);
        line[n].x0 = line[n].rho / line[n].a;
        line[n].y0 = line[n].rho / line[n].b;
       
        cout << "x[" << n << "] = " << line[n].x0 << "    y[" << n << "] = " << line[n].y0 ;
        cout << "    rho[" << n << "] = " << line[n].rho << "    theta[" << n << "] = " << line[n].theta << endl;
       
        char txt[100]; sprintf(txt, "%d", n);
        cvPutText(image, txt, cvPoint(line[n].x0, 10+n*10), &cvFont(0.8), CV_RGB(255,50,50));
    }
}

초록색으로 칠한 줄에 대한 설명:
void indexLinesY( CvSeq* lines, IplImage* image ) 함수를 line_param* indexLinesY( CvSeq* lines, IplImage* image )라고 바꾸어 structure로 선언한 line_param 형태의 배열을 출력하도록 하고, 이 출력값을 교점을 구하는 함수의 입력으로 하면
line_param line[numLines];
이렇게 함수 안에서 선언했던 부분이 함수 밖으로 출력되어 다른 함수의 입력이 될 때 입력값이 제대로 들어가지 않는다. 다음과 같이 바꾸어 주어야 함.
line_param *line = new line_param[numLines];

ref. http://cplusplus.com/reference/std/new/



상기 0-1의 과정을 적용한 코드의 실행 결과




그런데 다음과 같은 문제를 발견함.

x방향 DoG 필터링한 영상

y방향 DoG 필터링한 영상

Hough transform에 NMS를 적용하여 검출한 직선에 순번을 매긴 결과


이미지 프레임에서 찾은 수평선들을 보면 제일 위쪽의 직선이 0번이 아니라 4번부터 순번이 매겨져 있다. 프레임 바깥에 (위쪽에) 세 개의 직선이 더 있다는 뜻인데...

수직성 상의 edges 검출 영상

수평선 상의 edges 검출 영상

수직선들을 왼쪽부터 오른쪽으로, 수평선들을 위에서 아래로 정열한 결과


왼쪽 두 개는 line detection에 입력으로 쓰인 영상이고, 마지막 것은 이로부터 순서대로 정열한 직선을 규정하는 매개변수 출력값이다. 0번부터 3번 수평선의 y절편 값이 음수로 나타나고 있다.



2. 교점의 순서 매기기

격자 무늬의 직선들의 교점(intersections)을 과정1에서 계산한 직선의 순번을 이용하여 indexing한다. 빨간 세로선 0번과 파란 가로선 0번의 교점은 00번, 이런 식으로.

// index intersection points of lines in X and Y
CvPoint* indexIntersections ( line_param* lineX, line_param* lineY, int numLinesX, int numLinesY, IplImage* image )
// find intersections of lines, "linesX" & "linesY", and draw them in "image"
{
    int numPoints = (numLinesX+1) * (numLinesY+1);
    CvPoint *p = new CvPoint[numPoints]; // the intersection point of lineX[i] and lineY[j]
    char txt[100]; // text to represent the index number of an intersection
   
    for( int i = 0; i < MIN(numLinesX,100); i++ )
    {
        for( int j = 0; j < MIN(numLinesY,100); j++ )
        {             
            int indexP = i*numLinesY + j;     
            float Px = ( lineX[i].rho*lineY[j].b - lineY[j].rho*lineX[i].b ) / ( lineX[i].a*lineY[j].b - lineX[i].b*lineY[j].a ) ;
            float Py = ( lineX[i].rho - lineX[i].a*Px ) / lineX[i].b ;
            p[indexP].x = cvRound(Px);
            p[indexP].y = cvRound(Py);
           
            // display the points in an image
            cvCircle( image, p[indexP], 3, CV_RGB(0,255,50) /* , <#int line_type#>, <#int shift#> */ );   
            sprintf(txt, "%d", indexP);   
            cvPutText(image, txt, p[indexP], &cvFont(0.7), CV_RGB(50,255,250));           
        }
    }       
    return p;
}


입력 영상 input을 단일 채널 temp로 바꾸어 1차 DoG 필터링을 하여 검출된 edges를 양 방향 세기 비교와 NMS를 통해 수평 방향과 수직 방향으로 나눈 영상 detected edges를 입력으로 하여 Hough transform에 NMS를 적용하여 line detection을 한 결과를 input 창에 그리고, 이미지 프레임 좌표를 기준으로 검출된 직선들에 순서를 매겨 이로부터 교차점의 위치와 순번을 계산하여 input 창에 표시한다.



현재 상태의 문제점: (1) 패턴과 카메라 모두 정지하여 입력 영상(상좌)이 고정된 경우에, DoG 필터링한 결과(중)는 비교적 안정적이지만 수평, 수직 방향 세기 비교와 NMS를 통해 각 방향에 대해 뽑은 edges를 표시한 영상(하)은 프레임이 들어올 때마다 변화가 있다. 그래서 이 두 영상을 입력으로 하여 직선 찾기를 한 결과(상좌 빨간색 선들)와 이로부터 계산한 교차점들의 위치 및 순번(상좌 연두색 동그라미와 하늘색 숫자)도 불안정하다. (2) 또한 패턴과의 거리에 대해 카메라 렌즈의 초점이 맞지 않으면 결과가 좋지 않다.     





3. 교점의 cross ratio 구하기

각 교점에서 수평 방향으로 다음 세 개의 교점, 수직 방향으로 다음 세 개의 교점을 지나는 직선에 대한 cross ratios를 구한다. 

직선 검출에 오차나 오류가 적을 경우, 아래 테스트 결과에서 보듯 입력 영상의 교차점에 대해 실제 패턴의 직선을 1대 1로 즉각적으로 찾는다.



matching 시험 결과 영상 (위: 실제 패턴 / 아래: 입력 영상)




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


posted by maetel
2010. 3. 2. 20:31 Computer Vision
Tricodes: A Barcode-Like Fiducial Design for Augmented Reality Media - 2006
Jonathan Mooser, Suya You, Ulrich Neumann
International Conference on Multimedia Computing and Systems/International Conference on Multimedia and Expo - ICME(ICMCS)

posted by maetel
2010. 3. 2. 20:26 Computer Vision
Design Patterns for Augmented Reality Systems - 2004
Asa Macwilliams, Thomas Reicher, Gudrun Klinker, Bernd Brügge
Conference: Workshop on Exploring the Design and Engineering of Mixed Reality Systems - MIXER


Figure 2: Relationships between the individual patterns for augmented reality systems. Several approaches are used in combination within an augmented reality system. One approach might require the use of another approach or prevent its usage.


posted by maetel
2010. 2. 26. 01:11 Computer Vision
cross ratio test


Try #1. pi 값 이용

pi = 3.14159265358979323846264338327950288...
pi 값을 이용하여 cross ratio를 구해 보면, 다음과 같이 나온다.



cross ratio = 1.088889
cross ratio = 2.153846
cross ratio = 1.185185
cross ratio = 1.094737
cross ratio = 2.166667
cross ratio = 1.160714
cross ratio = 1.274510
cross ratio = 1.562500
cross ratio = 1.315789
cross ratio = 1.266667
cross ratio = 1.266667
cross ratio = 1.446429
cross ratio = 1.145455
cross ratio = 1.441176
cross ratio = 1.484848
cross ratio = 1.421875
cross ratio = 1.123457
cross ratio = 1.600000
cross ratio = 1.142857
cross ratio = 1.960784
cross ratio = 1.142857
cross ratio = 1.350000
cross ratio = 1.384615
cross ratio = 1.529412
cross ratio = 1.104575
cross ratio = 1.421875
cross ratio = 1.711111
cross ratio = 1.178571
cross ratio = 1.200000
cross ratio = 1.098039
cross ratio = 2.800000
cross ratio = 1.230769
cross ratio = 1.142857


다른 식 적용

cross ratio = 0.040000
cross ratio = 0.666667
cross ratio = 0.107143
cross ratio = 0.064935
cross ratio = 0.613636
cross ratio = 0.113636
cross ratio = 0.204545
cross ratio = 0.390625
cross ratio = 0.230769
cross ratio = 0.203620
cross ratio = 0.205882
cross ratio = 0.316406
cross ratio = 0.109375
cross ratio = 0.300000
cross ratio = 0.360000
cross ratio = 0.290909
cross ratio = 0.090909
cross ratio = 0.400000
cross ratio = 0.100000
cross ratio = 0.562500
cross ratio = 0.100000
cross ratio = 0.257143
cross ratio = 0.285714
cross ratio = 0.363636
cross ratio = 0.074380
cross ratio = 0.290909
cross ratio = 0.466667
cross ratio = 0.125000
cross ratio = 0.156250




Try #2. swPark_2000rti: 43p: figure 7의 cross ratio 값들로 패턴의 그리드 (격자 위치)를 역추산
 
40개의 수직선에 대한 37개의 cross ratio :
0.47, 0.11, 0.32, 0.17, 0.44, 0.08, 0.42, 0.25, 0.24, 0.13, 0.46, 0.18, 0.19, 0.29, 0.21, 0.37, 0.16, 0.38, 0.23, 0.09, 0.37, 0.26, 0.31, 0.18, 0.30, 0.15, 0.39, 0.16, 0.32, 0.27, 0.20, 0.28, 0.39, 0.12, 0.23, 0.28, 0.35
20개의 수평선에 대한 17개의 cross ratio :
0.42, 0.13, 0.32, 0.16, 0.49, 0.08, 0.40, 0.20, 0.29, 0.19, 0.37, 0.13, 0.26, 0.38, 0.21, 0.16, 0.42




뭥미?????

# of cross-ratios in vertical lines = 37
# of cross-ratios in horizontal lines = 17

x[0]=1  x[1]=2  x[2]=4
x[3]=-2.87805  x[4]=-1.42308  x[5]=-0.932099  x[6]=-0.787617  x[7]=-0.596499  x[8]=-0.55288  x[9]=-0.506403  x[10]=-0.456778  x[11]=-0.407892  x[12]=-0.390887  x[13]=-0.363143  x[14]=-0.338174  x[15]=-0.324067  x[16]=-0.312345  x[17]=-0.305022  x[18]=-0.293986  x[19]=-0.286594  x[20]=-0.273759  x[21]=-0.251966  x[22]=-0.244977  x[23]=-0.238299  x[24]=-0.231391  x[25]=-0.219595  x[26]=-0.20838  x[27]=-0.192558  x[28]=-0.183594  x[29]=-0.16952  x[30]=-0.159689  x[31]=-0.147983  x[32]=-0.131036  x[33]=-0.114782  x[34]=-0.0950305  x[35]=0.0303307  x[36]=0.964201  x[37]=-0.959599  x[38]=-0.519287  x[39]=-0.356521 


posted by maetel
2010. 2. 26. 00:07 Computer Vision
Optimal Grid Pattern for Automated Camera Calibration Using Cross Ratio

Chikara MATSUNAGA  Yasushi KANAZAWA  Kenichi KANATANI 

Publication IEICE TRANSACTIONS on Fundamentals of Electronics, Communications and Computer Sciences  Vol.E83-A  No.10  pp.1921-1928
Publication Date: 2000/10/20
Online ISSN: 
Print ISSN: 0916-8508
Type of Manuscript: Special Section PAPER (Special Section on Information Theory and Its Applications)
Category: Image Processing
Keyword: cross ratioMarkov processerror analysisreliability evaluationvirtual studio
Full Text:
출처:  http://www.suri.it.okayama-u.ac.jp/~kanatani/data/ejournal.html

MVA2000 IAPR Workshop on Machine Vision Applications, Nov. 28-30,2000, The University of Tokyo, Japan
13-28
Optimal Grid Pattern for Automated Matching Using Cross Ratio
Chikara Matsunaga (Broadcast Division, FOR-A Co. Ltd.)
Kenichi Kanatanit (Department of Computer Science, Gunma University)


Kenichi Kanatani  金谷健一   http://www.suri.it.okayama-u.ac.jp/%7Ekanatani/
Yasushi Kanazawa 金澤靖     http://www.img.tutkie.tut.ac.jp/~kanazawa/

IEICE (
The Institute of Electronics Information and Communication Engineers)   http://www.ieice.org
IAPR (International Association of Pattern Recognition)   http://www.iapr.org
IAPR - Machine Vision & Applications



Summary: 
With a view to virtual studio applications, we design an optimal grid pattern such that the observed image of a small portion of it can be matched to its corresponding position in the pattern easily. The grid shape is so determined that the cross ratio of adjacent intervals is different everywhere. The cross ratios are generated by an optimal Markov process that maximizes the accuracy of matching. We test our camera calibration system using the resulting grid pattern in a realistic setting and show that the performance is greatly improved by applying techniques derived from the designed properties of the pattern.


Camera calibration is a first step in all vision and media applications.
> pre-calibration (Tsai) vs. self-calibration (Pollefeys)
=> "simultaneous calibration" by placing an easily distinguishable planar pattern in the scene

Introducing a statistic model of image noise, we generate the grid intervals by an optimal Markov process that maximizes the accuracy of matching.
: The pattern is theoretically designed by statistical analysis

If the cross rations are given, the sequence is determined as follows.


To find a sequence of cross ratios such that the sequence of numbers is a homogeneous increasing with the average interval being 1 and the minimum width as specified.
=> To generate the sequence of cross ratios stochastically, according to a probability distribution defined in such a way that the resulting sequence of numbers has the desired properties
=> able to optimize the probability distribution so that the matching performance is maximized by analyzing the statistical properties of image noise

 



 

출처: C. Matsunaga, Y. Kanazawa, and K. Kanatani, Optimal grid pattern for automated camera calibration using cross ratio , IEICE Transactions on Fundamentals of Electronics, Communications and Computer Sciences, Vol. E83-A, No. 10, pp. 1921--1928, 2000. 중 1926쪽 Fig.8 4배 확대 캡처





'Computer Vision' 카테고리의 다른 글

"Design Patterns for Augmented Reality Systems"  (0) 2010.03.02
virtual studio 구현: cross ratio test  (0) 2010.02.26
virtual studio 구현: workflow  (0) 2010.02.23
chroma keying  (0) 2010.02.22
3차원 인터페이스 시장조사  (1) 2010.02.22
posted by maetel