블로그 이미지
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 31
  • total
  • today
  • yesterday

Category

2009. 11. 5. 16:12 Computer Vision
Kalman filter 연습 코딩

1차원 간단 예제
// 1-D Kalman filter algorithm exercise
// VIP lab, Sogang University
// 2009-11-05
// ref. Probabilistic Robotics: 42p

#include <iostream>
using namespace std;

int main (int argc, char * const argv[]) {
   
    double groundtruth[] = {1.0, 2.0, 3.5, 5.0, 7.0, 8.0, 10.0};
    double measurement[] = {1.0, 2.1, 3.2, 5.3, 7.4, 8.1, 9.6};
    double transition_noise = 0.1; // covariance of Gaussian noise to control
    double measurement_noise = 0.3; // covariance of Gaussian noise to measurement
   
    double x = 0.0, v = 1.0;    double cov = 0.5;
   
    double x_p, c_p; // prediction of x and cov
    double gain; // Kalman gain
    double x_pre, m;
   
    for (int t=0; t<7; t++)
    {
        // prediction
        x_pre = x;
        x_p = x + v;
        c_p = cov + transition_noise;
        m = measurement[t];
        // update
        gain = c_p / (c_p + measurement_noise);
        x = x_p + gain * (m - x_p);
        cov = ( 1 - gain ) * c_p;
        v = x - x_pre;

        cout << t << endl;
        cout << "estimation  = " << x << endl;
        cout << "measurement = " << measurement[t] << endl;   
        cout << "groundtruth = " << groundtruth[t] << endl;
    }
    return 0;
}

실행 결과:
0
estimation  = 1
measurement = 1
groundtruth = 1
1
estimation  = 2.05
measurement = 2.1
groundtruth = 2
2
estimation  = 3.14545
measurement = 3.2
groundtruth = 3.5
3
estimation  = 4.70763
measurement = 5.3
groundtruth = 5
4
estimation  = 6.76291
measurement = 7.4
groundtruth = 7
5
estimation  = 8.50584
measurement = 8.1
groundtruth = 8
6
estimation  = 9.9669
measurement = 9.6
groundtruth = 10
logout

[Process completed]


2차원 연습
// 2-D Kalman filter algorithm exercise
// lym, VIP lab, Sogang University
// 2009-11-05
// ref. Probabilistic Robotics: 42p

#include <OpenCV/OpenCV.h> // matrix operations

#include <iostream>
#include <iomanip>
using namespace std;

int main (int argc, char * const argv[]) {
    int step = 7;
   
    IplImage *iplImg = cvCreateImage(cvSize(150, 150), 8, 3);
    cvZero(iplImg);
   
    cvNamedWindow("Kalman-2d", 0);
   
    //ground truth of real states
    double groundtruth[] = {10.0, 20.0, 35, 50.0, 70.0, 80.0, 100.0, //x-value
                            10.0, 20.0, 40.0, 55, 65, 80.0, 90.0}; //y-value
    //measurement of observed states
    double measurement_set[] = {10.0, 21, 32, 53, 74, 81, 96,  //x-value
                            10.0, 19, 42, 56, 66, 78, 88};    //y-value
    //covariance of Gaussian noise to control
//    double transition_noise[] = { 0.1, 0.0, 
//                                  0.0, 0.1 }; 
    CvMat* transition_noise = cvCreateMat(2, 2, CV_64FC1); 
    cvmSet(transition_noise, 0, 0, 0.1); //set transition_noise(0,0) to 0.1
    cvmSet(transition_noise, 0, 1, 0.0);
    cvmSet(transition_noise, 1, 0, 0.0);
    cvmSet(transition_noise, 1, 1, 0.1);    
    //covariance of Gaussian noise to measurement
//    double measurement_noise[] = { 0.3, 0.0, 
//                                   0.0, 0.2 };
    CvMat* measurement_noise = cvCreateMat(2, 2, CV_64FC1); 
    cvmSet(measurement_noise, 0, 0, 0.3); //set measurement_noise(0,0) to 0.3
    cvmSet(measurement_noise, 0, 1, 0.0);
    cvmSet(measurement_noise, 1, 0, 0.0);
    cvmSet(measurement_noise, 1, 1, 0.2);        
   
    CvMat* state = cvCreateMat(2, 1, CV_64FC1);    //states to be estimated   
    CvMat* state_p = cvCreateMat(2, 1, CV_64FC1);  //states to be predicted
    CvMat* velocity = cvCreateMat(2, 1, CV_64FC1); //motion controls to change states
    CvMat* measurement = cvCreateMat(2, 1, CV_64FC1); //measurement of states
   
    CvMat* cov = cvCreateMat(2, 2, CV_64FC1);     //covariance to be updated
    CvMat* cov_p = cvCreateMat(2, 2, CV_64FC1); //covariance to be predicted
    CvMat* gain = cvCreateMat(2, 2, CV_64FC1);     //Kalman gain to be updated
   
    // temporary matrices to be used for estimation
    CvMat* Kalman = cvCreateMat(2, 2, CV_64FC1); //
    CvMat* invKalman = cvCreateMat(2, 2, CV_64FC1); //

    CvMat* I = cvCreateMat(2,2,CV_64FC1);
    cvSetIdentity(I); // does not seem to be working properly   
//  cvSetIdentity (I, cvRealScalar (1));   
    // check matrix
    for(int i=0; i<2; i++)
    {
        for(int j=0; j<2; j++)
        {
            cout << cvmGet(I, i, j) << "\t";           
        }
        cout << endl;
    }
 
    // set the initial state
    cvmSet(state, 0, 0, 0.0); //x-value //set state(0,0) to 0.0
    cvmSet(state, 1, 0, 0.0); //y-value //set state(1,0) to 0.0
    // set the initital covariance of state
    cvmSet(cov, 0, 0, 0.5); //set cov(0,0) to 0.5
    cvmSet(cov, 0, 1, 0.0); //set cov(0,1) to 0.0
    cvmSet(cov, 1, 0, 0.0); //set cov(1,0) to 0.0
    cvmSet(cov, 1, 0, 0.4); //set cov(1,1) to 0.4   
    // set the initial control
    cvmSet(velocity, 0, 0, 10.0); //x-direction //set velocity(0,0) to 1.0
    cvmSet(velocity, 1, 0, 10.0); //y-direction //set velocity(0,0) to 1.0
   
    for (int t=0; t<step; t++)
    {
        // retain the current state
        CvMat* state_out = cvCreateMat(2, 1, CV_64FC1); // temporary vector   
        cvmSet(state_out, 0, 0, cvmGet(state,0,0)); 
        cvmSet(state_out, 1, 0, cvmGet(state,1,0));        
        // predict
        cvAdd(state, velocity, state_p); // state + velocity -> state_p
        cvAdd(cov, transition_noise, cov_p); // cov + transition_noise -> cov_p
        // measure
        cvmSet(measurement, 0, 0, measurement_set[t]); //x-value
        cvmSet(measurement, 1, 0, measurement_set[step+t]); //y-value
        // estimate Kalman gain
        cvAdd(cov_p, measurement_noise, Kalman); // cov_p + measure_noise -> Kalman
        cvInvert(Kalman, invKalman); // inv(Kalman) -> invKalman
        cvMatMul(cov_p, invKalman, gain); // cov_p * invKalman -> gain       
        // update the state
        CvMat* err = cvCreateMat(2, 1, CV_64FC1); // temporary vector
        cvSub(measurement, state_p, err); // measurement - state_p -> err
        CvMat* adjust = cvCreateMat(2, 1, CV_64FC1); // temporary vector
        cvMatMul(gain, err, adjust); // gain*err -> adjust
        cvAdd(state_p, adjust, state); // state_p + adjust -> state
        // update the covariance of states
        CvMat* cov_up = cvCreateMat(2, 2, CV_64FC1); // temporary matrix   
        cvSub(I, gain, cov_up); // I - gain -> cov_up       
        cvMatMul(cov_up, cov_p, cov); // cov_up *cov_p -> cov
        // update the control
        cvSub(state, state_out, velocity); // state - state_p -> velocity
       
        // result in colsole
        cout << "step " << t << endl;
        cout << "estimation  = " << cvmGet(state,0,0) << setw(10) << cvmGet(state,1,0) << endl;
        cout << "measurement = " << cvmGet(measurement,0,0) << setw(10) << cvmGet(measurement,1,0) << endl;   
        cout << "groundtruth = " << groundtruth[t] << setw(10) << groundtruth[t+step] << endl;
        // result in image
        cvCircle(iplImg, cvPoint(cvRound(groundtruth[t]), cvRound(groundtruth[t + step])), 3, cvScalarAll(255));
        cvCircle(iplImg, cvPoint(cvRound(cvmGet(measurement,0,0)), cvRound(cvmGet(measurement,1,0))), 2, cvScalar(255, 0, 0));
        cvCircle(iplImg, cvPoint(cvRound(cvmGet(state,0,0)), cvRound(cvmGet(state,1,0))), 2, cvScalar(0, 0, 255));
       
        cvShowImage("Kalman-2d", iplImg);
        cvWaitKey(500);   
   
    }
    cvWaitKey();   
   
    return 0;
}


실행 결과:


step 0
estimation  = 10        10
measurement = 10        10
groundtruth = 10        10
step 1
estimation  = 20.5   19.6263
measurement = 21        19
groundtruth = 20        20
step 2
estimation  = 31.4545   35.5006
measurement = 32        42
groundtruth = 35        40
step 3
estimation  = 47.0763   53.7411
measurement = 53        56
groundtruth = 50        55
step 4
estimation  = 67.6291   69.0154
measurement = 74        66
groundtruth = 70        65
step 5
estimation  = 85.0584   81.1424
measurement = 81        78
groundtruth = 80        80
step 6
estimation  = 99.669    90.634
measurement = 96        88
groundtruth = 100        90



posted by maetel
2009. 10. 27. 23:31 Computer Vision
R. L. Thompson, I. D. Reid, L. A. Munoz, and D. W. Murray,
Providing synthetic views for teleoperation using visual pose tracking in multiple cameras,”
IEEE Transactions on Systems, Man and Cybernetics, Part A, vol. 31, no. 1, pp. 43–54, 2001.

Abstract - This paper describes a visual tool for teleoperative experimentation involving remote manipulation and contact tasks. Using modest hardware, it recovers in real-time the pose of moving polyhedral objects, and presents a synthetic view of the scene to the teleoperator using any chosen viewpoint and viewing direction. The method of line tracking introduced by Harris is extended to multiple calibrated cameras, and afforced by robust methods and iterative ltering. Experiments are reported which determine the static and dynamic performance of the vision system, and its use in teleoperation is illustrated in two experiments, a peg in hole manipulation task and an impact control task.


Line tracking 
http://en.wikipedia.org/wiki/Passive_radar#Line_tracking
The line-tracking step refers to the tracking of target returns from individual targets, over time, in the range-Doppler space produced by the cross-correlation processing. A standard Kalman filter is typically used. Most false alarms are rejected during this stage of the processing.


- Three difficulties using the Harris tracker
First it was found to be easily broken by occlusions and changing lighting. Robust methods to mitigate this problem have been investigated monocularly by Armstrong and Zisserman [20], [21]. Although this has a marked effect on tracking performance, the second problem found is that the accuracy of the pose recovered in a single camera was poor, with evident correlation between depth and rotation about axes parallel to the image plane. Maitland and Harris [22] had already noted as much when recovering the pose of a pointing device destined for neurosurgical application [23].
They reported much improved accuracy using two cameras; but the object was stationary, had an elaborate pattern drawn on it and was visible at all times to both cameras. The third difficulty, or rather uncertainty, was that the convergence properties and dynamic performances of the monocular and multicamera methods were largely unreported.


"Harris' RAPiD tracker included a constant velocity Kalman filter."


posted by maetel
2009. 10. 27. 14:40 Computer Vision
Harris' RAPiD
C. Harris and C. Stennett, “Rapid - a video rate object tracker,” in Proc 1st British Machine Vision Conference, Sep 1990, pp. 73–77.


ref.
C. Harris, “Tracking with rigid models,” in Active Vision, A. Blake and A. Yuille, Eds. MIT Press, 1992, pp. 59–73.

RAPID (Real-time Attitude and Position Determination) is a real-time model-based tracking algorithm for a known three dimensional object executing arbitrary motion, and viewed by a single video-camera. The 3D object model consists of selected control points on high contrast edges, which can be surface markings, folds or profile edges.
The use of either an alpha-beta tracker or a Kalman filter permits large object motion to be tracked and produces more stable tracking results. The RAPID tracker runs at video-rate on a standard minicomputer equipped with an image capture board.

alpha-beta tracker
http://en.wikipedia.org/wiki/Alpha_beta_filter

Kalman filter
http://en.wikipedia.org/wiki/Kalman_filter




posted by maetel
2009. 10. 26. 21:35 Computer Vision

Avoiding moving outliers in visual SLAM by tracking moving objects


Wangsiripitak, S.   Murray, D.W.  
Dept. of Eng. Sci., Univ. of Oxford, Oxford, UK;

This paper appears in: Robotics and Automation, 2009. ICRA '09. IEEE International Conference on
Publication Date: 12-17 May 2009
On page(s): 375-380
ISSN: 1050-4729
ISBN: 978-1-4244-2788-8
INSPEC Accession Number: 10748966
Digital Object Identifier: 10.1109/ROBOT.2009.5152290
Current Version Published: 2009-07-06


http://www.robots.ox.ac.uk/~lav//Research/Projects/2009somkiat_slamobj/project.html

Abstract

parallel implementation of monoSLAM with a 3D object tracker
information to register objects to the map's frame
the recovered geometry

I. Introduction

approaches to handling movement in the environment
segmentation between static and moving features
outlying moving points

1) active search -> sparse maps
2) robust methods -> multifocal tensors
3-1) tracking known 3D objects in the scene
  -2) determining whether they are moving
  -3) using their convex hulls to mask out features

"Knowledge that they are occluded rather than unreliable avoids the need to invoke the somewhat cumbersome process of feature deletion, followed later perhaps by unnecessary reinitialization."

[15] H. Zhou and S. Sakane, “Localizing objects during robot SLAM in semi-dynamic environments,” in Proc of the 2008 IEEE/ASME Int Conf on Advanced Intelligent Mechatronics, 2008, pp. 595–601.

"[15] noted that movement is likely to associated with objects in the scene, and classified them according to the likelihood that they would move."

the use of 3D objects for reasoning about motion segmentation and occlusion

occlusion masks

II. Underlying Processes
A. Visual SLAM

Monocular visual SLAM - EKF

idempotent 멱등(冪等)
http://en.wikipedia.org/wiki/Idempotence
Idempotence describes the property of operations in mathematics and computer science that means that multiple applications of the operation do not change the result.

http://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation
http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles
http://en.wikipedia.org/wiki/Quaternion
http://en.wikipedia.org/wiki/Euler_Angles
Berthold K.P. Horn, "Some Notes on Unit Quaternions and Rotation"

"Standard monocular SLAM takes no account of occlusion."

B. Object pose tracking

Harris' RAPiD
[17] C. Harris and C. Stennett, “Rapid - a video rate object tracker,” in Proc 1st British Machine Vision Conference, Sep 1990, pp. 73–77
[20] C. Harris, “Tracking with rigid models,” in Active Vision, A. Blake and A. Yuille, Eds. MIT Press, 1992, pp. 59–73.

"(RAPiD makes the assumption that the pose change required between current and new estimates is sufficiently small, first, to allow a linearization of the solution and, second, to make trivial the problem of inter-image correspondence.) The correspondences used are between predicted point to measured image edge, allowing search in 1D rather than 2D within the image. This makes very sparing use of image data — typically only several hundred pixels per image are addressed."

aperture problem
http://en.wikipedia.org/wiki/Motion_perception
http://focus.hms.harvard.edu/2001/Mar9_2001/research_briefs.html

[21] R. L. Thompson, I. D. Reid, L. A. Munoz, and D. W. Murray, “Providing synthetic views for teleoperation using visual pose tracking in multiple cameras,” IEEE Transactions on Systems, Man and
Cybernetics, Part A, vol. 31, no. 1, pp. 43–54, 2001.
- "Three difficulties using the Harris tracker":
(1)First it was found to be easily broken by occlusions and changing lighting. Robust methods to mitigate this problem have been investigated monocularly by Armstrong and Zisserman. (2)Although this has a marked effect on tracking performance, the second problem found is that the accuracy of the pose recovered in a single camera was poor, with evident correlation between depth and rotation about axes parallel to the image plane. Maitland and Harris had already noted as much when recovering the pose of a pointing device destined for neurosurgical application. They reported much improved accuracy using two cameras; but the object was stationary, had an elaborate pattern drawn on it and was visible at all times to both cameras. (3)The third difficulty, or rather uncertainty, was that the convergence properties and dynamic performances of the monocular and multicamera methods were largely unreported.
(3) : little solution
(2) => [21] "recovered pose using 3 iterations of the pose update cycle per image"
(1) => [21], [22] : search -> matching -> weighting

[22] M. Armstrong and A. Zisserman, “Robust object tracking,” in Proc 2nd Asian Conference on Computer Vision, 1995, vol. I. Springer, 1996, pp. 58–62.

RANSAC
[23] M. Fischler and R. Bolles, “Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography,” Communications of the ACM, vol. 24, no. 6, pp. 381–395, June 1981.

Least median of squares as the underlying standard deviation is unknown
[24] P. J. Rousseeuw, “Least median of squares regression,” Journal of the American Statistical Association, vol. 79, no. 388, pp. 871–880, 1984.



III. MonoSLAM with Tracked Objects
A. Information from SLAM to the object tracker


B. Information from the object tracker to SLAM


"The convex hull is uniformly dilated by an amount that corresponds to the projection of the typical change in pose."




posted by maetel
2009. 8. 17. 20:15 Computer Vision
Oxford 대학  Active Vision Group에서 개발한
PTAM (Parallel Tracking and Mapping for Small AR Workspaces)
Questions? E-mail ptam@robots.ox.ac.uk
README

맥미니에서의 설치를 끝내고 (test log on mac) 테스트해 보면 성능이 좋지 않아 그대로 쓸 수는 없는 상태이다.


0. Video Input
The software requires a video camera with a wide-angle lens, capable of 640x480x30Hz video capture and an appropriate driver installation (which is supported by libCVD.)




1. Camera Parameters
 
CameraCalibrator를 실행시키면 calibrator_settings.cfg 파일을 읽어 온다.
여기에 gvars (PTAM 라이브러리를 지원하는 Gvars3 라이브러리) settings이 설정되어 있...어야 하는데 빈 채로 주어졌다.

CameraCalibrator를 실행시킨 결과로 연산된 카메라 파라미터는 camera.cfg 파일에 저장된다.
실행 후 열어 보면,
Camera.Parameters=[ 3.02629 6.17916 0.524049 0.291111 2.1234 ]
라는 식으로 CameraCalibrator 실행창에서 나타나는 그대로 되어 있다. save 버튼을 눌렀을 때 저장되는 것.

PTAM을 실행시키면 settings.cfg 파일을 읽어 온다. 파일을 열어 보면, 여기에도 gvars setting을 첨가할 수 있다는 주석이 있고, 다음 명령문으로 위에서 저장한 camera.cfg 파일을 불러서 실행한다.
exec camera.cfg
즉, Camera.Parameters 변수에 값이 assign되는 것.

정리하면,
calibrator_settings.cfg -> CameraCalibrator -> camera.cfg -> settings.cfg -> PTAM







fast feature detection
http://mi.eng.cam.ac.uk/~er258/work/fast.html

ref.
http://en.wikipedia.org/wiki/Feature_detection_%28computer_vision%29



main.cc
1) settings.cfg 파일 로드 GUI.LoadFile("settings.cfg");

2) 사용자 입력 parsing GUI.StartParserThread();

3) 클래스 system (system.h) 실행 s.Run();

atexit
Set function to be executed on exit
The function pointed by the function pointer argument is called when the program terminates normally.

try-if 구문
1) Deitel 823p "catch handler"
2) theuhm@naver: "에러가 발생한 객체는 예외를 발생시킴과 동시에 try블럭 안의 모든 객체는 스코프를 벗어나 참조할 수 없게 되므로 예외를 처리하는 동안 try블럭 안에서 예외를 발생시켰을 수 있는 객체의 참조를 원천적으로 막아 더 안전하고 깔끔한 예외처리를 할 수 있는 환경을 만들어줍니다. 그리고 예외를 던질 때에 예외 객체의 클래스를 적절히 구성하면, 예외 객체에 예외를 처리하는 방법을 담아서 던질 수도 있습니다. 그렇게 구성하면 굉장히 깔끔한 코드를 얻을 수 있죠.

set
Sets are a kind of associative containers that stores unique elements, and in which the elements themselves are the keys. Sets are typically implemented as binary search trees.

namespace

system.h
1) PTAM에서 핵심적 기능을 하는 클래스들과 클래스 "System"을 선언
// Defines the System class
// This stores the main functional classes of the system
class ATANCamera;
class Map;
class MapMaker;
class Tracker;
class ARDriver;
class MapViewer;
class System;



system.cc



ATANCamera.h
FOV distortion model of Deverneay and Faugeras

Duvernay and Faugeras


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

Five-Point algorithm  (0) 2009.08.18
UNIX references  (0) 2009.08.17
PTAM test log on Mac OS X  (7) 2009.08.05
SLAM related generally  (0) 2009.08.04
Kalman Filter  (0) 2009.07.30
posted by maetel
2009. 8. 5. 14:36 Computer Vision
Oxford 대학  Active Vision Group에서 개발한
PTAM (Parallel Tracking and Mapping for Small AR Workspaces)
http://www.robots.ox.ac.uk/~gk/PTAM/

Questions? E-mail ptam@robots.ox.ac.uk


0. requirements 확인

readme 파일에서 언급하는 대로 프로세서와 그래픽카드를 확인하니

내가 설치할 컴퓨터 사양:
Model Name:    Mac mini
  Model Identifier:    Macmini3,1
  Processor Name:    Intel Core 2 Duo
  Processor Speed:    2 GHz
  Number Of Processors:    1
  Total Number Of Cores:    2
  L2 Cache:    3 MB
  Memory:    1 GB
  Bus Speed:    1.07 GHz
  Boot ROM Version:    MM31.0081.B00

그래픽 카드:
NVIDIA GeForce 9400

"Intel Core 2 Duo processors 2.4GHz+ are fine."이라고 했는데, 2.0이면 되지 않을까? 그래픽 카드는 동일한 것이니 문제 없고.


1. library dependency 확인

1. TooN - a header library for linear algebra
2. libCVD - a library for image handling, video capture and computer vision
3. Gvars3 - a run-time configuration/scripting library, this is a sub-project of libCVD.
셋 다 없으므로,

1-1. TooN 다운로드

TooN (Tom's object oriented Numerics)선형대수 (벡터, 매트릭스 연산)를 위해 Cambridge Machine Intelligence lab에서 개발한 C++ 라이브러리라고 한다.

ref. TooN Documentation (<- 공식 홈보다 정리가 잘 되어 있군.)

다음과 같은 명령으로 다운로드를 받는다.
%% cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/toon co TooN

실행 결과:

생성된 TooN 폴더에 들어가서
%%% ./configure

실행 결과:


1-1-1. 더 안정적인(?) 버전을 받으려면

%% cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/toon co -D "Mon May 11 16:29:26 BST 2009" TooN

실행 결과:


1-2. libCVD 다운로드

libCVD (Cambridge Video Dynamics)같은 연구실에서 만든 컴퓨터 비전 관련 이미지 처리를 위한 C++ 라이브러리

ref. CVD documentation

%% cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/libcvd co -D "Mon May 11 16:29:26 BST 2009" libcvd

실행 결과:



1-3. Gvars3 다운로드

Gvars3 (configuration system library)
 
%% cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/libcvd co -D "Mon May 11 16:29:26 BST 2009" gvars3

실행 결과:


2. 다운로드한 기반 라이브러리 설치

2-1. TooN 설치

2-1-1. configure file 실행

configure scripts는 source code를 compile하고 실행시킬 수 있게 만들어 주는 것.

생성된 TooN 폴더에 들어가서
%%% ./configure

실행 결과:

2-1-2. 설치

(TooN은 헤더파일들의 모음이므로 compile이 필요없다.)

%%% sudo make install

실행 결과:
mkdir -p //usr/local/include/TooN
cp *.h //usr/local/include/TooN
cp -r optimization //usr/local/include/TooN/
cp -r internal //usr/local/include/TooN/


2-2. libCVD 설치

2-2-1. configure 파일 실행

생성된 libCVD 폴더에 들어가서
%%% export CXXFLAGS=-D_REENTRANT
%%% ./configure --without-ffmpeg

실행 결과:

2-2-2. documents 생성 (생략해도 되는 듯)

다시 시도했더니
%%% make docs

make: *** No rule to make target `docs'.  Stop.
여전히 안 되는 듯... 아! doxygen을 맥포트로 설치해서 그런가 보다. (데이터베이스가 서로 다르다고 한다.)_M#]


2-2-3. compile 컴파일하기

%%% make

실행 결과:


2-2-4. install 설치하기

%%% sudo make install

실행 결과:


2-3. Gvars3  설치

2-3-1. configure 파일 실행

Gvars3 폴더에 들어가서
%%% ./configure --disable-widgets

실행 결과:


2-3-2. compile 컴파일하기

%%% make

실행 결과:


2-3-3. install 설치하기

%%% sudo make install

mkdir -p //usr/local/lib
cp libGVars3.a libGVars3_headless.a //usr/local/lib
mkdir -p //usr/local/lib
cp libGVars3-0.6.dylib //usr/local/lib
ln -fs  //usr/local/lib/libGVars3-0.6.dylib //usr/local/lib/libGVars3-0.dylib
ln -fs  //usr/local/lib/libGVars3-0.dylib //usr/local/lib/libGVars3.dylib
mkdir -p //usr/local/lib
cp libGVars3_headless-0.6.dylib //usr/local/lib
ln -fs  //usr/local/lib/libGVars3_headless-0.6.dylib //usr/local/lib/libGVars3_headless-0.dylib
ln -fs  //usr/local/lib/libGVars3_headless-0.dylib //usr/local/lib/libGVars3_headless.dylib
mkdir -p //usr/local/include
cp -r gvars3 //usr/local/include


2-4. OS X에서의 컴파일링과 관련하여

ref. UNIX에서 컴파일하기
Porting UNIX/Linux Applications to Mac OS X: Compiling Your Code in Mac OS X



3. PTAM 컴파일

3-1. 해당 플랫폼의 빌드 파일을 PTAM source 디렉토리로 복사

내 (OS X의) 경우, PTAM/Build/OS X에 있는 모든 (두 개의) 파일 Makefile과 VideoSource_OSX.cc를 PTAM 폴더에 옮겼다.

3-2. video source 셋업

카메라에 맞는 video input file을 컴파일하도록 Makefile을 수정해 주어야 한다.
맥의 경우, (아마도 Logitech Quickcam Pro 5000 을 기준으로 하는) 하나의 소스 파일만이 존재하므로 그대로 두면 될 듯.

3-3. video source 추가

다른 비디오 소스들은 libCVD에 클래스로 만들어져 있다고 한다. 여기에 포함되어 있지 않은 경우에는 VideoSource_XYZ.cc 라는 식의 이름을 갖는 파일을 만들어서 넣어 주어야 한다.

3-4. compile

PTAM 폴더에 들어가서
%% make

실행 결과:
g++ -g -O3 main.cc -o main.o -c -I /MY_CUSTOM_INCLUDE_PATH/ -D_OSX -D_REENTRANT
g++ -g -O3 VideoSource_OSX.cc -o VideoSource_OSX.o -c -I /MY_CUSTOM_INCLUDE_PATH/ -D_OSX -D_REENTRANT
g++ -g -O3 GLWindow2.cc -o GLWindow2.o -c -I /MY_CUSTOM_INCLUDE_PATH/ -D_OSX -D_REENTRANT
In file included from OpenGL.h:20,
                 from GLWindow2.cc:1:
/usr/local/include/cvd/gl_helpers.h:38:19: error: GL/gl.h: No such file or directory
/usr/local/include/cvd/gl_helpers.h:39:20: error: GL/glu.h: No such file or directory
/usr/local/include/cvd/gl_helpers.h: In function 'void CVD::glPrintErrors()':
/usr/local/include/cvd/gl_helpers.h:569: error: 'gluGetString' was not declared in this scope
make: *** [GLWindow2.o] Error 1

이 에러 메시지는 다음 링크에서 논의되고 있는 문제와 비슷한 상황인 것 같다.
http://en.allexperts.com/q/Unix-Linux-OS-1064/Compiling-OpenGL-unix-linux.htm


3-4-1. OpenGL on UNIX

PTAM이 OpenGL을 사용하고 있는데, OpenGL이 Mac에 기본으로 설치되어 있으므로 신경쓰지 않았던 부분이다. 물론 system의 public framework으로 들어가 있음을 확인할 수 있다. 그런데 UNIX 프로그램에서 접근할 수는 없는가? (인터넷에서 검색해 보아도 따로 설치할 수 있는 다운로드 링크나 방법을 찾을 수 없다.)

에러 메시지에 대한 정확한 진단 ->
philphys: 일단 OpenGL은 분명히 있을 건데 그 헤더파일과 라이브러리가 있는 곳을 지정해 주지 않아서 에러가 나는 것 같아. 보통 Makefile에 이게 지정되어 있어야 하는데 실행결과를 보니까 전혀 지정되어 있지 않네. 중간에 보면 -I /MY_CUSTOM_INCLUDE_PATH/ 라는 부분이 헤더 파일의 위치를 지정해 주는 부분이고 또 라이브러리는 뒤에 링크할 때 지정해 주게 되어 있는데 거기까지는 가지도 못 했네.
즉, "링커가 문제가 아니라, 컴파일러 옵션에 OpenGL의 헤더파일이 있는 디렉토리를 지정해 주어야 할 것 같다"고 한다.

문제의 Makefile을 들여다보고

Makefile을 다음과 같이 수정하고 (보라색 부분 추가)
COMPILEFLAGS = -I /MY_CUSTOM_INCLUDE_PATH/ -D_OSX -D_REENTRANT -I/usr/X11R6/include/

philphys: /usr/X11R6/include 밑에 GL 폴더가 있고 거기에 필요한 헤더파일들이 모두 들어 있다. 그래서 코드에선 "GL/gl.h" 하는 식으로 explicit하게 GL 폴더를 찾게 된다.

그러고 보면 아래와 같은 설명이 있었던 것이다.
Since the Linux code compiles directly against the nVidia driver's GL headers, use of a different GL driver may require some modifications to the code.

다시 컴파일 하니,
실행 결과:

설치 완료!
두 실행파일 PTAM과 CameraCalibrator이 생성되었다.


3-5. X11R6에 대하여

X11R6 = Xwindow Verion 11 Release 6

Xwindow
X.org



4. camera calibration

CameraCalibrator 파일을 실행시켜 카메라 캘리브레이션을 시도했더니 GUI 창이 뜨는데 연결된 웹캠(Logitech QuickCam Pro 4000)으로부터 입력을 받지 못 한다.

4-0. 증상

CameraCalibrator 실행파일을 열면, 다음과 같은 터미널 창이 새로 열린다.
Last login: Fri Aug  7 01:14:05 on ttys001
%% /Users/lym/PTAM/CameraCalibrator ; exit;
  Welcome to CameraCalibrator
  --------------------------------------
  Parallel tracking and mapping for Small AR workspaces
  Copyright (C) Isis Innovation Limited 2008

  Parsing calibrator_settings.cfg ....
! GUI_impl::Loadfile: Failed to load script file "calibrator_settings.cfg".
  VideoSource_OSX: Creating QTBuffer....
  IMPORTANT
  This will open a quicktime settings planel.
  You should use this settings dialog to turn the camera's
  sharpness to a minimum, or at least so small that no sharpening
  artefacts appear! In-camera sharpening will seriously degrade the
  performance of both the camera calibrator and the tracking system.

그리고 Video란 이름의 GUI 창이 열리는데, 이때 아무런 설정을 바꾸지 않고 그대로 OK를 누르면 위의 터미널 창에 다음과 같은 메시지가 이어지면서 자동 종료된다.
  .. created QTBuffer of size [640 480]
2009-08-07 01:20:57.231 CameraCalibrator[40836:10b] ***_NSAutoreleaseNoPool(): Object 0xf70e2c0 of class NSThread autoreleasedwith no pool in place - just leaking
Stack: (0x96827f0f 0x96734442 0x9673a1b4 0xbc2db7 0xbc7e9a 0xbc69d30xbcacbd 0xbca130 0x964879c9 0x90f8dfb8 0x90e69618 0x90e699840x964879c9 0x90f9037c 0x90e7249c 0x90e69984 0x964879c9 0x90f8ec800x90e55e05 0x90e5acd5 0x90e5530f 0x964879c9 0x94179eb9 0x282b48 0xd9f40xd6a6 0x2f16b 0x2fea4 0x26b6)
! Code for converting from format "Raw RGB data"
  not implemented yet, check VideoSource_OSX.cc.

logout

[Process completed]

그러므로 3-3의 문제 -- set up video source (비디오 소스 셋업) --로 돌아가야 한다.
즉, VideoSource_OSX.cc 파일을 수정해서 다시 컴파일한 후 실행해야 한다.

Other video source classes are available with libCVD. Finally, if a custom video source not supported by libCVD is required, the code for it will have to be put into some VideoSource_XYZ.cc file (the interface for this file is very simple.)

삽질...



4-1. VideoSource_OSX.cc 파일 수정



수정한 VideoSource 파일

터미널 창:
Welcome to CameraCalibrator
  --------------------------------------
  Parallel tracking and mapping for Small AR workspaces
  Copyright (C) Isis Innovation Limited 2008

  Parsing calibrator_settings.cfg ....
  VideoSource_OSX: Creating QTBuffer....
  IMPORTANT
  This will open a quicktime settings planel.
  You should use this settings dialog to turn the camera's
  sharpness to a minimum, or at least so small that no sharpening
  artefacts appear! In-camera sharpening will seriously degrade the
  performance of both the camera calibrator and the tracking system.
>   .. created QTBuffer of size [640 480]
2009-08-13 04:02:50.464 CameraCalibrator[6251:10b] *** _NSAutoreleaseNoPool(): Object 0x9df180 of class NSThread autoreleased with no pool in place - just leaking
Stack: (0x96670f4f 0x9657d432 0x965831a4 0xbc2db7 0xbc7e9a 0xbc69d3 0xbcacbd 0xbca130 0x924b09c9 0x958e8fb8 0x957c4618 0x957c4984 0x924b09c9 0x958eb37c 0x957cd49c 0x957c4984 0x924b09c9 0x958e9c80 0x957b0e05 0x957b5cd5 0x957b030f 0x924b09c9 0x90bd4eb9 0x282b48 0xd414 0xcfd6 0x2f06b 0x2fda4)



4-2. Camera Calibrator 실행


Camera calib is [ 1.51994 2.03006 0.499577 0.536311 -0.0005 ]
  Saving camera calib to camera.cfg...
  .. saved.



5. PTAM 실행


  Welcome to PTAM
  ---------------
  Parallel tracking and mapping for Small AR workspaces
  Copyright (C) Isis Innovation Limited 2008

  Parsing settings.cfg ....
  VideoSource_OSX: Creating QTBuffer....
  IMPORTANT
  This will open a quicktime settings planel.
  You should use this settings dialog to turn the camera's
  sharpness to a minimum, or at least so small that no sharpening
  artefacts appear! In-camera sharpening will seriously degrade the
  performance of both the camera calibrator and the tracking system.
>   .. created QTBuffer of size [640 480]
2009-08-13 20:17:54.162 ptam[1374:10b] *** _NSAutoreleaseNoPool(): Object 0x8f5850 of class NSThread autoreleased with no pool in place - just leaking
Stack: (0x96670f4f 0x9657d432 0x965831a4 0xbb9db7 0xbbee9a 0xbbd9d3 0xbc1cbd 0xbc1130 0x924b09c9 0x958e8fb8 0x957c4618 0x957c4984 0x924b09c9 0x958eb37c 0x957cd49c 0x957c4984 0x924b09c9 0x958e9c80 0x957b0e05 0x957b5cd5 0x957b030f 0x924b09c9 0x90bd4eb9 0x282b48 0x6504 0x60a6 0x11af2 0x28da 0x2766)
  ARDriver: Creating FBO...  .. created FBO.
  MapMaker: made initial map with 135 points.
  MapMaker: made initial map with 227 points.


The software was developed with a Unibrain Fire-i colour camera, using a 2.1mm M12 (board-mount) wide-angle lens. It also runs well with a Logitech Quickcam Pro 5000 camera, modified to use the same 2.1mm M12 lens.

iSight를 Netmate 1394B 9P Bilingual to 6P 케이블로  MacMini에 연결하여 해 보니 더 잘 된다.



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

UNIX references  (0) 2009.08.17
PTAM to be dissected on OS X  (0) 2009.08.17
SLAM related generally  (0) 2009.08.04
Kalman Filter  (0) 2009.07.30
OpenCV 1.0 설치 on Mac OS X  (0) 2009.07.27
posted by maetel
2009. 7. 15. 16:49 Computer Vision
Klein, G. and Murray, D. 2007.
Parallel Tracking and Mapping for Small AR Workspaces
In Proceedings of the 2007 6th IEEE and ACM international Symposium on Mixed and Augmented Reality - Volume 00 (November 13 - 16, 2007). Symposium on Mixed and Augmented Reality. IEEE Computer Society, Washington, DC, 1-10. DOI= http://dx.doi.org/10.1109/ISMAR.2007.4538852

Georg Klein
David Murray
Active Vision Laboratory, Department of Engineering Science, University of Oxford

Source CodeUsage Example


1. parallel threads of tracking and mapping
2. mapping from smaller keyframes: batch techniques (Bundle Adjustment)
3. Initializing the map from 5-point Algorithm
4. Initializing new points with epipolar search
5. mapping thousands of points


Joint Compatibility Branch and Bound (JCBB)
http://en.wikipedia.org/wiki/JCBB

RANdom SAmple Consensus (RANSAC)
http://en.wikipedia.org/wiki/RANSAC

coarse-to-fine approach

batch method
bundle adjustment
http://en.wikipedia.org/wiki/Bundle_adjustment

Structure-from-Motion (SfM)

five-point stereo
http://en.wikipedia.org/wiki/Eight-point_algorithm

5-point algorithm
http://portal.acm.org/citation.cfm?id=987623

Henrik Stew´enius, Christopher Engels, David Nist´er
Recent Developments on Direct Relative Orientation


epipolar feature search

intensity-patch descriptor

(feature-to-feature or camera-to-feature) correlation-based search

NCC (normalized cross correlation) search
http://en.wikipedia.org/wiki/Cross-correlation#Normalized_cross-correlation


Unibrain Fire-i digital camera

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

FAST-10 corner detection
http://wapedia.mobi/en/Corner_detection
http://en.wikipedia.org/wiki/Corner_detection

decaying velocity model

barrel radial distortion
http://en.wikipedia.org/wiki/Distortion_(optics)

lie group SE(3)

affine warp
warping matrix <- (1) back-projecting unit pixel displacements in the source keyframe pyramid level onto the patch's plane and then (2) projecting these into the current (target) frame

inverse compositional image alignment 

Tukey biweight objective function

M-estimator
http://en.wikipedia.org/wiki/M-estimator
Zhengyou Zhang, M-estimators

Shi-Tomasi corner detector

http://en.wikipedia.org/wiki/Levenberg-Marquardt

cubic-cost matrix factorization
http://en.wikipedia.org/wiki/Cubic_function



posted by maetel
2009. 7. 14. 21:23 Computer Vision
ISMAR 2008
7th IEEE/ACM International Symposium on Mixed and Augmented Reality, 2008


Proceedings
State of the Art Report

Trends in Augmented Reality Tracking, Interaction and Display
: A Review of Ten Years of ISMAR
Feng Zhou (Center for Human Factors and Ergonomics, Nanyang Technological University, Singapore)
Henry Been-Lirn Duh (Department of Electrical and Computer Engineering/Interactive and Digital Media Institute, National University of Singapore)
Mark Billinghurst (The HIT Lab NZ, University of Canterbury, New Zealand)


Tracking

1. Sensor-based tracking -> ubiquitous tracking and dynamic data fusion

2. Vision-based tracking: feature-based and model-based
1) feature-based tracking techniques:
- To find a correspondence between 2D image features and their 3D world frame coordinates.
- Then to find the camera pose from projecting the 3D coordinates of the feature into the observed 3D image coordinates and minimizing the distance to their corresponding 3D features.

2) model-based tracking techniques:
- To explicitly use a model of the features of tracked objects such as a CAD model or 2D template of the object based on the distinguishable features.
- A visual serving approach adapted from robotics to calculate camera pose from a range of model features (line, circles, cylinders and spheres)
- knowledge about the scene by predicting hidden movement of the object and reducing the effects of outlier data

3. Hybrid tracking
- closed-loop-type tracking based on computer vision techonologies
- motion prediction
- SFM (structure from motion)
- SLAM (simultaneous localization and mapping)


Interaction and User Interfaces

1. Tangible
2. Collaborative
3. Hybrid


Display

1. See-through HMDs
1) OST = optical see-through
: the user to see the real world with virtual objects superimposed on it by optical or video technologies
2) VST = video see-through
: to display graphical infromation directly on real objects or even daily surfaces in everyday life
2. Projection-based Displays
3. Handheld Displays


Limitations of AR

> tracking
1) complexity of the scene and the motion of target objects, including the degrees of freedom of individual objects and their represenation
=> correspondence analysis: Kalman filters, particle filters.
2) how to find distinguishable objects for "markers" outdoors

> interaction
ergonomics, human factors, usability, cognition, HCI (human-computer interaction)

> AR displays
- HMDs - limited FOV, image distortions,
- projector-based displays - lack mobility, self-occlusion
- handheld displays - tracking with markers to limit the work range

Trends and Future Directions

1. Tracking
1) RBPF (Rao-Blackwellized particle filters) -> automatic recognition systems
2) SLAM, ubiquitous tracking, sensor network -> free from prior knowledge
3) pervasive middleware <- information fusion algorithms

2. Interaction and User Interfaces
"Historically, human knowledge, experience and emotion are expressed and communicated in words and pictures. Given the advances in interface and data capturing technology, knowledge, experience and emotion might now be presented in the form of AR content."

3. AR Displays





Studierstube Augmented Reality Project
: software framework for the development of Augmented Reality (AR) and Virtual Reality applications
Graz University of Technology (TU Graz)

Sharedspace project
The Human Interface Technology Laboratory (HITLab) at the University ofWashington and ATR Media Integration & Communication in Kyoto,Japan join forces at SIGGRAPH 99

The Invisible Train - A Handheld Augmented Reality Game

AR Tennis
camera based tracking on mobile phones in face-to-face collaborative Augmented Reality

Emmie - Environment Management for Multi-User Information Environments

VITA: visual interaction tool for archaeology

HMD = head-mounted displays

OST = optical see-through

VST = video see-through

ELMO: an Enhanced optical see-through display using an LCD panel for Mutual Occlusion

FOV
http://en.wikipedia.org/wiki/Field_of_view_(image_processing)

HMPD = head-mounted projective displays

The Touring Machine

MARS - Mobile Augmented Reality Systems
    
Klimt - the Open Source 3D Graphics Library for Mobile Devices

AR Kanji - The Kanji Teaching application


references  
Ronald T. Azuma  http://www.cs.unc.edu/~azuma/
A Survey of Augmented Reality. Presence: Teleoperators and Virtual Environments 6, 4 (August 1997), 355 - 385. Earlier version appeared in Course Notes #9: Developing Advanced Virtual Reality Applications, ACM SIGGRAPH '95 (Los Angeles, CA, 6-11 August 1995), 20-1 to 20-38.

Ronald Azuma, Yohan Baillot, Reinhold Behringer, Steven Feiner,Simon Julier, Blair MacIntyre
Recent Advances in Augmented Reality.IEEE Computer Graphics and Applications 21, 6 (Nov/Dec 2001),34-47.

Ivan E. Sutherland
The Ultimate Display, IFIP `65, pp. 506-508, 1965

Kato, H.   Billinghurst, M.   Poupyrev, I.   Imamoto, K.   Tachibana, K.   Hiroshima City Univ.
Virtual object manipulation on a table-top AR environment

Sandor, C., Olwal, A., Bell, B., and Feiner, S. 2005.
Immersive Mixed-Reality Configuration of Hybrid User Interfaces.
In Proceedings of the 4th IEEE/ACM international Symposium on Mixed and Augmented Reality(October 05 - 08, 2005). Symposium on Mixed and Augmented Reality. IEEEComputer Society, Washington, DC, 110-113. DOI=http://dx.doi.org/10.1109/ISMAR.2005.37

An optical see-through display for mutual occlusion with a real-time stereovision system
Kiyoshi Kiyokawa, Yoshinori Kurata and Hiroyuki Ohno
Computers & Graphics Volume 25, Issue 5, October 2001, Pages 765-779

Bimber, O., Fröhlich, B., Schmalstieg, D., and Encarnação, L. M. 2005.
The virtual showcase. In ACM SIGGRAPH 2005 Courses (Los Angeles, California, July 31 - August 04, 2005). J. Fujii, Ed. SIGGRAPH '05. ACM, New York, NY, 3. DOI= http://doi.acm.org/10.1145/1198555.1198713

Bimber, O., Wetzstein, G., Emmerling, A., and Nitschke, C. 2005.
Enabling View-Dependent Stereoscopic Projection in Real Environments. In Proceedings of the 4th IEEE/ACM international Symposium on Mixed and Augmented Reality (October 05 - 08, 2005). Symposium on Mixed and Augmented Reality. IEEE Computer Society, Washington, DC, 14-23. DOI= http://dx.doi.org/10.1109/ISMAR.2005.27

Cotting, D., Naef, M., Gross, M., and Fuchs, H. 2004.
Embedding Imperceptible Patterns into Projected Images for Simultaneous Acquisition and Display. In Proceedings of the 3rd IEEE/ACM international Symposium on Mixed and Augmented Reality (November 02 - 05, 2004). Symposium on Mixed and Augmented Reality. IEEE Computer Society, Washington, DC, 100-109. DOI= http://dx.doi.org/10.1109/ISMAR.2004.30

Ehnes, J., Hirota, K., and Hirose, M. 2004.
Projected Augmentation - Augmented Reality using Rotatable Video Projectors. In Proceedings of the 3rd IEEE/ACM international Symposium on Mixed and Augmented Reality (November 02 - 05, 2004). Symposium on Mixed and Augmented Reality. IEEE Computer Society, Washington, DC, 26-35. DOI= http://dx.doi.org/10.1109/ISMAR.2004.47

Arango, M., Bahler, L., Bates, P., Cochinwala, M., Cohrs, D., Fish, R., Gopal, G., Griffeth, N., Herman, G. E., Hickey, T., Lee, K. C., Leland, W. E., Lowery, C., Mak, V., Patterson, J., Ruston, L., Segal, M., Sekar, R. C., Vecchi, M. P., Weinrib, A., and Wuu, S. 1993.
The Touring Machine system. Commun. ACM 36, 1 (Jan. 1993), 69-77. DOI= http://doi.acm.org/10.1145/151233.151239

Gupta, S. and Jaynes, C. 2006.
The universal media book: tracking and augmenting moving surfaces with projected information. In Proceedings of the 2006 Fifth IEEE and ACM international Symposium on Mixed and Augmented Reality (Ismar'06) - Volume 00 (October 22 - 25, 2006). Symposium on Mixed and Augmented Reality. IEEE Computer Society, Washington, DC, 177-180. DOI= http://dx.doi.org/10.1109/ISMAR.2006.297811


Klein, G. and Murray, D. 2007.
Parallel Tracking and Mapping for Small AR Workspaces. In Proceedings of the 2007 6th IEEE and ACM international Symposium on Mixed and Augmented Reality - Volume 00 (November 13 - 16, 2007). Symposium on Mixed and Augmented Reality. IEEE Computer Society, Washington, DC, 1-10. DOI= http://dx.doi.org/10.1109/ISMAR.2007.4538852

Neubert, J., Pretlove, J., and Drummond, T. 2007.
Semi-Autonomous Generation of Appearance-based Edge Models from Image Sequences. In Proceedings of the 2007 6th IEEE and ACM international Symposium on Mixed and Augmented Reality - Volume 00 (November 13 - 16, 2007). Symposium on Mixed and Augmented Reality. IEEE Computer Society, Washington, DC, 1-9. DOI= http://dx.doi.org/10.1109/ISMAR.2007.4538830

posted by maetel
2008. 7. 28. 10:56 Hardware/sensors
http://xsens.com/en/products/human_motion/mtx.php



Platform: Windows 2000/XP (1)
Output:
• 3D orientation
o Quaternions
o Euler Angles (xyz)
o Rotation Matrix
• 3D rate of turn
• 3D acceleration
• 3D magnetic field strength
• Temperature

Dynamic Range: all angles in 3D
Angular Resolution: 0.05° RMS (2)
Static Accuracy: <1° (3)
Dynamic Accuracy: 3° RMS (4)
Turn On Time: 50 ms (5)
Sample Frequency: 100 Hz (6)


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

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

*** http://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation

*** http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles

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

ECEF stands for Earth-Centered, Earth-Fixed, and is a Cartesian coordinate system used for GPS, and is sometimes known as a "conventional terrestrial" system[1]. It represents positions as an X, Y, and Z coordinate. The point (0,0,0) denotes the mass center of the earth, hence the name Earth-Centered. The z-axis is defined as being parallel to the earth rotational axes, pointing towards north. The x-axis intersects the sphere of the earth at the 0° latitude, 0° longitude. This means the ECEF rotates with the earth around its z-axis. Therefore, coordinates of a point fixed on the surface of the earth do not change, hence the name earth-fixed.

http://www.aerojockey.com/papers/meng/node7.html

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

http://en.wikipedia.org/wiki/Comma-separated_values


MT9 Sensor Fact Table
Accelerometers - Solid state, capacitative readout
Rate of turn sensor 'Gyroscope' - Solid state, “tuning fork concept”
Magnetometer - Thin film magnetoresistive

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

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

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


RS-232 Serial Connection Settings
Setting: Value
Bits/second: 115200
Data bits: 8
Parity: none
Stop bits: 1
Flow control: none


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

In computing, endianness is the byte (and sometimes bit) ordering used to represent some kind of data. Typical cases are the order in which integer values are stored as bytes in computer memory (relative to a given memory addressing scheme) and the transmission order over a network or other medium. When specifically talking about bytes, endianness is also referred to simply as byte order.

http://en.wikipedia.org/wiki/Endianness#Big-endian


http://www.webopedia.com/TERM/b/baud.html


Data packet MT9
Preamble (2B) Sensor ID (2B) Accelerometer (6B)Gyroscoop (6B) Magneto (6B) Temperature (2B) Checksum (1B)


Physical Specifications overview
Interface: Serial digital (RS-232/RS-485)
Operating Voltage: 6 V (adapter included)
Power Consumption: 35 mA
Temperature Operating Range: 5°C - 45°C
Outline Dimensions: 39 x 54 x 28 mm (W x L x H)


http://www.xsens.com/en/support/faq/mti_mtig_and_mtx.php#3.1

3 Sensor hardware Topics

3.1 Q: What are the measurement principles of the physical sensors in the MTi / MTx?
A: Rate of turn sensors (gyros):
MEMS, solid state, “vibrating structure" concept.
Linear accelerometers: MEMS, solid state, capacitative readout.
Magnetic field sensors: Thin-film magneto-resistive.


3.2 Q: What is the accelerometer range of the MTi / MTx?
A: The standard version of the MTx/MTi comes with 5g accelerometers (±50 m/s2 range). Full scales of 1.7g and 10g are available as well. Please, contact us at info@xsens.com if you need other specifications.


3.3 Q: Can I disconnect/connect the MTi / MTx as I please?
A: Yes. But keep in mind that for optimal accuracy the electronics of the MTi / MTx should be 'warmed up' for about 10-15 minutes.


3.4 Q: What kind of anti-aliasing (low-pass) filters does the MTx/MTi have?
A:What kind of anti-aliasing (low-pass) filters does the MTx/MTi have?
A: To avoid aliasing the MT uses low-pass (LP) filters on all inertial data channels (not on temperature and magnetometers). The filters used are effective second order and are available in different cut-off frequencies depending on your requirements. The standard MT is delivered with 40 Hz LP on the rate-of-turn sensors and 30 Hz LP on the accelerometers.


3.5 Q: Is there a USB version of the MTi / MTx?
A: The MTi and MTx are delivered with an Xsens USB Converter. The communication from sensor to USB Converter can be either RS-232, RS-422 or RS-485.


3.6 Q: What is the connector type on the MT inertial measurement unit (IMU)?
A: For the MTx the connector type is 'Binder 719'. For the MTi the connector type is ‘ODU L-series 7’. Pin-definitions are listed in the MTi and MTx User Manual. Please contact Xsens (info@xsens.com) and we will send you a copy.

3.7 Q: What are the pin definitions on the connectors (to save us buzzing the MT out)?
A:The pin-definitions are listed in the MTi and MTx User Manual. Please contact Xsens (info@xsens.com) and we will send you a copy.


3.8 Q: When you say that your MT samples at 100 Hz, does that mean that each sensor (accelerometers, gyroscope, etc.) is sampling at 100 Hz or that the total throughput is 100 Hz—i.e. that the true sampling rate is 100/number of sensors?
A: When we say 100 Hz we mean that each sensor channel is sampled at 100 Hz, so actually for the MT 10 channels of data (3D accelerometer, 3D rate of turn, 3D magnetometer and temperature) are transmitted at 100 Hz, some would call it 1000 Hz throughput.


3.9 Q: Is it possible to connect the MTx/MTi to a PocketPC?
A:Yes, most PocketPC's support standard RS232 input (mostly with supplied RS232 synch cable) so you can develop software for the PocketPC using binary data from the MTi or MTx or log the inertial data on the PocketPC (please contact us if you would like to receive a simple binary datalogger for the PocketPC).

Using the Xbus Master you can also easily connect to a PocketPC using Bluetooth.


firmware
http://webopedia.com/TERM/f/firmware.html
Software (programs or data) that has been written onto read-only memory (ROM). Firmware is a combination of software and hardware. ROMs, PROMs and EPROMs that have data or programs recorded on them are firmware.

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

In computing, firmware is a computer program that is embedded in a hardware device, for example a microcontroller. It can also be provided on flash memory or as a binary image file that can be uploaded onto existing hardware by a user.

As its name suggests, firmware is somewhere between hardware and software. Like software, it is a computer program which is executed by a microprocessor or a microcontroller. But it is also tightly linked to a piece of hardware, and has little meaning outside of it.


http://terms.empas.com/dicsearch/view.html?i=3018166
①처리 과정 동안 컴퓨터에 의해 동적으로 변경이 불가능한 부류의 기억 장치에 적재된 컴퓨터 프로그램과 자료들.
②사용자 입장에서 변경할 수 없는 컴퓨터 프로그램과 자료가 들어 있는 하드웨어. 즉, 펌웨어에 들어 있는 컴퓨터 프로그램과 자료는 소프트웨어로 분류되고, 그 프로그램과 자료가 들어 있는 전기 회로는 하드웨어로 분류된다.
③읽기용 기억 장치(ROM)에 저장된 프로그램 명령어들.
④정상적인 동작을 하는 동안에는 변하지 않는, 기능적 개체를 구성하고 있는 컴퓨터 프로그램과 하드웨어가 1개의 단위로 이루어진 집합체. 그 하드웨어 단위에 저장된 컴퓨터 프로그램은 특정한 응용이나 작용에 맞는 요구를 만족시킬 고정된 논리 윤곽을 가진 집적 회로(IC)로서 저장된다.

'Hardware > sensors' 카테고리의 다른 글

[월간 전자기술] 센서의 활용  (0) 2008.08.02
myGyro300SPI  (0) 2008.08.02
WSN (Wireless Sensor Network)  (0) 2007.01.19
sensor terms  (0) 2007.01.19
accelerometer 가속도 센서 - MMA7260Q datasheet  (0) 2006.12.14
posted by maetel
2007. 8. 11. 12:35 Hardware/network
library for p5:
1) JMyron: http://webcamxtra.sourceforge.net
    -> library (for intel mac): http://www.jibberia.com/projects
2) LibCV - alternative video capture for Processing: http://toxi.co.uk/p5/libcv  (mac에서는 안 되는 것으로 보임. JMF)

http://processing.org/reference/libraries/video/index.html

1) Ken Perlin's Physical Media (Graduate), Spring 2006: VIDEO TRACKING WORKING IN PROCESSING

2) Dan O'Sullivan's Physical Computing: ProcVid: Video Tracking in Processing


vdig for QT on windows:
http://www.abstractplane.com/products/vdig.jsp
http://blog.maxray.net/index.php?pl=183
http://a.parsons.edu/~getFrame/students/jacqueline/src/WinVDIG.exe

macam on mac:
http://webcam-osx.sourceforge.net
http://www.vimicro.com/english/product/pc003.htm
Damian at appleforum: "UVC라는 표준규격을 만족하는 웹캠은 별도의 드라이버 없이 Mac OS X 10.4.3 이후 버젼에서 바로 인식한다고 하는 군요. macam 홈페이지에서도 해당 모델을 확인할 수 있습니다. 다만, 이런 모델들은 10만원 대에서 가격이 형성되어 있어 iSight와 큰 차이가 없습니다."

USB 연장선
http://en.wikipedia.org/wiki/USB#Version_history
http://www.icoda.co.kr/i_product/pro_view.html?it_num=67368
리피터 (5m 이상일 경우): http://www.icoda.co.kr/i_product/pro_view.html?it_num=80036


related projects:
http://itp.nyu.edu/%7Edbo3/proj/index.htm#webcam


* (informed by 오동훈)
USB 연장선으로 노이즈가 발생할 정도로 긴 거리에서라면 1394용 카메라를 써야 한다. (약 50만원 안팎)
http://www.cylod.com/



'Hardware > network' 카테고리의 다른 글

RS232 data communication - MT9  (0) 2008.08.16
UART (범용 비동기화 송수신기)  (0) 2008.07.02
bluetooth on Mac  (0) 2008.06.17
posted by maetel