Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to select image set? #1

Open
Saums opened this issue May 2, 2016 · 7 comments
Open

How to select image set? #1

Saums opened this issue May 2, 2016 · 7 comments

Comments

@Saums
Copy link

Saums commented May 2, 2016

I was trying to get Javier's code to run (didn't succeed) and I came across this github link.
I changed the path of image files in your code but I come across this question, what is the purpose of this?

"Which step do you want to start from?"

Thank you.

@ahtamjidi
Copy link
Owner

This code was for a long time ago. I guess it determines which step you
want to start from in the sequence of images. For example suppose that you
have 100 images but in the first 50, camera is standing still, there is no
point in starting from 1. Instead you would start from 50 where the actual
motion starts. I hope this is helpful.

On Mon, May 2, 2016 at 3:35 AM, Saums notifications@github.com wrote:

I was trying to get Javier's code to run (didn't succeed) and I came
across this github link.
I changed the path of image files in your code but I come across this
question, what is the purpose of this?

"Which step do you want to start from?"

Thank you.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#1

Amirhossein Tamjidi, PhD student
Department of Aerospace Engineering
Texas A&M University
Tel : 001-501-551-6270
Email: ahtamjidi@tamu.edu

@Saums
Copy link
Author

Saums commented May 3, 2016

Also, did you understand the initialize_cam.m file? It is called once in the mono_slam.m file. Some parameters have been set in that file but no explanation on what basis.

@ahtamjidi
Copy link
Owner

These are the camera parameters. I obtained them for the camera I had,
using the matlab camera calibration toolbox. If you search camera model you
understand the meaning of the parameters. Whenever you are using a code be
careful the model your code is using is exactly the same as the one that
your camera calibration code uses.

On Tue, May 3, 2016 at 3:51 AM, Saums notifications@github.com wrote:

Also, did you understand the initialize_cam.m file? It is called once in
the mono_slam.m file. Some parameters have been set in that file but no
explanation on what basis.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#1 (comment)

Amirhossein Tamjidi, PhD student
Department of Aerospace Engineering
Texas A&M University
Tel : 001-501-551-6270
Email: ahtamjidi@tamu.edu

@Saums
Copy link
Author

Saums commented May 3, 2016

Thank you for replying. That probably is the reason I'm getting errors, I was using default values.

@Saums
Copy link
Author

Saums commented May 3, 2016

I ran the camera calibration tool. I got the following output:

cameraParams = 
  cameraParameters with properties:

   Camera Intrinsics
    IntrinsicMatrix: [3x3 double]
   Lens Distortion
        RadialDistortion: [0.1416 -0.3889]
    TangentialDistortion: [0 0]
   Camera Extrinsics
      RotationMatrices: [3x3x10 double]
    TranslationVectors: [10x3 double]
   Accuracy of Estimation
    MeanReprojectionError: 0.3291
       ReprojectionErrors: [54x2x10 double]
   Calibration Settings
                        NumPatterns: 10
                        WorldPoints: [54x2 double]
                         WorldUnits: 'mm'
                       EstimateSkew: 0
    NumRadialDistortionCoefficients: 2
       EstimateTangentialDistortion: 0

But the initialize_cam.m doesn't have the same naming convention.

function cam = initialize_cam()

d =     0.0112;
nRows = 240;
nCols = 320;
Cx =    1.7945 / d;
Cy =    1.4433 / d;
k1=     6.333e-2;
k2=     1.390e-2;
f =     2.1735;

cam.k1 =    k1;
cam.k2 =    k2;
cam.nRows = nRows;
cam.nCols = nCols;
cam.Cx =    Cx;
cam.Cy =    Cy;
cam.f =     f;
cam.dx =    d;
cam.dy =    d;
cam.model = 'two_distortion_parameters';

cam.K =     sparse( [ f/d   0     Cx;
                0  f/d    Cy;
                0    0     1] );

Do you know the correspondence?

@ahtamjidi
Copy link
Owner

Look here I believe everything is explained.
http://www.vision.caltech.edu/bouguetj/calib_doc/htmls/parameters.html
If I remember correctly the camera distortion model is slightly different
in Javiers code. I think I changed the code accordingly. That is what I
meant when I said that you have to check that the model that the code uses
is the same as the one that camera calibration uses.

On Tue, May 3, 2016 at 6:05 AM, Saums notifications@github.com wrote:

I ran the camera calibration tool. I got the following output:

cameraParams =
cameraParameters with properties:

Camera Intrinsics
IntrinsicMatrix: [3x3 double]
Lens Distortion
RadialDistortion: [0.1416 -0.3889]
TangentialDistortion: [0 0]
Camera Extrinsics
RotationMatrices: [3x3x10 double]
TranslationVectors: [10x3 double]
Accuracy of Estimation
MeanReprojectionError: 0.3291
ReprojectionErrors: [54x2x10 double]
Calibration Settings
NumPatterns: 10
WorldPoints: [54x2 double]
WorldUnits: 'mm'
EstimateSkew: 0
NumRadialDistortionCoefficients: 2
EstimateTangentialDistortion: 0

But the initialize_cam.m doesn't have the same naming convention.

function cam = initialize_cam()

d = 0.0112;
nRows = 240;
nCols = 320;
Cx = 1.7945 / d;
Cy = 1.4433 / d;
k1= 6.333e-2;
k2= 1.390e-2;
f = 2.1735;

cam.k1 = k1;
cam.k2 = k2;
cam.nRows = nRows;
cam.nCols = nCols;
cam.Cx = Cx;
cam.Cy = Cy;
cam.f = f;
cam.dx = d;
cam.dy = d;
cam.model = 'two_distortion_parameters';

cam.K = sparse( [ f/d 0 Cx;
0 f/d Cy;
0 0 1] );


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#1 (comment)

Amirhossein Tamjidi, PhD student
Department of Aerospace Engineering
Texas A&M University
Tel : 001-501-551-6270
Email: ahtamjidi@tamu.edu

@Saums
Copy link
Author

Saums commented May 6, 2016

It solved that problem. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants