ahtamjidi/3PRE

How to select image set?

Opened this issue · 7 comments

Saums commented

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.

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 commented

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.

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 commented

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

Saums commented

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?

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 commented

It solved that problem. Thanks.