Result doesn't match with real calibration with artificially generated datas

137 views
Skip to first unread message

Paul Baksic

unread,
May 2, 2018, 5:39:49 AM5/2/18
to MultiCamSelfCal
Hi !

I am using artifical datas that i produce with a matlab script. And the calibration a obtain is quite strange... The datas are not noisy, so I don't understand why I don't have good results.

    First of all I compute the camera calibration matrix  by applying the P2KRtC fuction from the core functions on the P matix in the *.Pmat.cal files -->  Am I doing it right ?
    I tried with 7 and 5 cameras with differents internal parametters with 700 and 900 piont, from a mean of 90% of points seen by each camera to 70% on points seen by each camera. The focal length are distributed from 8 to 12mm.
    Those are the best results I got :

    Calibration matrix I was expecting :
    K =
      [1,1] =

         450.40308     0.00000   585.00000
           0.00000   456.74396   381.00000
           0.00000     0.00000     1.00000

      [1,2] =

         1.2966e+03   0.0000e+00   6.7800e+02
         0.0000e+00   1.2839e+03   3.9600e+02
         0.0000e+00   0.0000e+00   1.0000e+00

      [1,3] =

         9.8436e+02   0.0000e+00   6.1700e+02
         0.0000e+00   1.0384e+03   4.0700e+02
         0.0000e+00   0.0000e+00   1.0000e+00

      [1,4] =

         533.37837     0.00000   595.00000
           0.00000   445.89059   326.00000
           0.00000     0.00000     1.00000

      [1,5] =

         1.0578e+03   0.0000e+00   7.1600e+02
         0.0000e+00   8.6711e+02   3.8900e+02
         0.0000e+00   0.0000e+00   1.0000e+00

      [1,6] =

         544.10940     0.00000   535.00000
           0.00000   525.22185   358.00000
           0.00000     0.00000     1.00000

      [1,7] =

         2.0015e+03   0.0000e+00   6.2200e+02
         0.0000e+00   1.7788e+03   3.1200e+02
         0.0000e+00   0.0000e+00   1.0000e+00

    Calibration matrix I got (with a good reprojection error and Square_Pixels: 1)
    K2 =
    {
      [1,1] =

         -73.01112  -292.88129  -728.41268
           0.00000  -203.27019   -87.84830
          -0.00000     0.00000    -1.00000

      [1,2] =

        -506.72115   -44.60617  -754.17705
           0.00000  -529.75402  -206.86508
           0.00000     0.00000    -1.00000

      [1,3] =

         5.7276e+02  -2.2779e+02  -1.4421e+03
         0.0000e+00  -1.2195e+03  -2.1008e+02
        -5.5511e-17  -3.4694e-18  -1.0000e+00

      [1,4] =

        -2.4990e+02   8.4287e+00  -6.1523e+02
         1.4211e-14  -2.0970e+02  -2.4071e+02
         5.5511e-17  -2.7756e-17  -1.0000e+00

      [1,5] =

         516.49032   710.43828   -18.03180
           0.00000  -762.98946   138.73418
           0.00000     0.00000    -1.00000

      [1,6] =

        -199.32738    -1.51103  -552.76619
           0.00000  -202.31882  -387.76460
          -0.00000     0.00000    -1.00000

      [1,7] =

        -803.70727    89.97739  -421.81710
           0.00000  -749.74615   -28.55961
           0.00000    -0.00000    -1.00000
    Many things are unsettling : The skew factor should be equal to 0, and then the whole rest, it feels like totally random results. Considering the fact that my datas are not noisy, it should give me verry good results !
    Can you help me through this ? The configuration wasn't degenerate, my cameras where not even lying on a shpere, and the point cloud was dense and in 3D.

Andrew Straw

unread,
May 7, 2018, 2:27:48 PM5/7/18
to multica...@googlegroups.com
What are your reprojection errors with the calibration?


Best,
Andrew

--
You received this message because you are subscribed to the Google Groups "MultiCamSelfCal" group.
To unsubscribe from this group and stop receiving emails from it, send an email to multicamselfc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paul Baksic

unread,
May 8, 2018, 4:51:03 PM5/8/18
to multica...@googlegroups.com
The calibration error given by the algorith was a mean of 0.34 and a std of 0.28 which was pretty good... At least with noisy data, although here I have "perfect data" so it should maybe even less...

I'll check this function when I have the time, thank you...

To unsubscribe from this group and stop receiving emails from it, send an email to multicamselfcal+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "MultiCamSelfCal" group.
To unsubscribe from this group and stop receiving emails from it, send an email to multicamselfcal+unsubscribe@googlegroups.com.

Paul Baksic

unread,
May 15, 2018, 3:43:54 AM5/15/18
to MultiCamSelfCal
After thinking about your answer, it seems strange to me. You said that the self calibration algorithm is accurate up to an homography, but isn't finding this homography the whole purpose of this algorithm ? The euclidean reconstruction ?
If you meant up to a similarity which is more logical given the function you gave me, I wonder how would a similarity change the skew factor ? And how are we supposed to know the real coordinates of the points with real experimental datas ?

Best,

Paul
Message has been deleted

Paul Baksic

unread,
May 15, 2018, 4:40:20 AM5/15/18
to MultiCamSelfCal
Here are pictures with all the points seen by the cameras (these are not the ones given to the algorithm, I gave the pics with only one dot, but this is all the point seen by the camera for this calibration), and the cameras position and orientation with respect to the point cloud.
Those are the results :
Expected :
K =
{
  [1,1] =

     1.0421e+03  -8.7617e-14  -7.1300e+02
     0.0000e+00  -1.1748e+03  -3.7800e+02
    -5.5511e-17   0.0000e+00  -1.0000e+00

  [1,2] =

     1.0933e+03   2.5991e-13  -6.0300e+02
     2.8422e-14  -1.3232e+03  -3.7100e+02
     5.5511e-17   2.7756e-17  -1.0000e+00

  [1,3] =

     1.0636e+03   0.0000e+00  -6.1200e+02
     0.0000e+00  -1.0653e+03  -3.0700e+02
     0.0000e+00   0.0000e+00  -1.0000e+00

  [1,4] =

     969.91998     0.00000  -648.00000
       0.00000  -804.89064  -380.00000
       0.00000     0.00000    -1.00000

  [1,5] =

     890.40813     0.00000  -609.00000
       0.00000  -766.97879  -356.00000
       0.00000     0.00000    -1.00000

}

Retrieved :
K2 =
{
  [1,1] =

     144.48084   -37.00650  -902.55180
       0.00000  -301.14044  -352.51429
       0.00000     0.00000    -1.00000

  [1,2] =

     -78.95937   171.81226  -414.87924
       0.00000  -213.71474  -222.76975
      -0.00000    -0.00000    -1.00000

  [1,3] =

    -221.97832   -36.30201  -432.22878
       0.00000  -298.84824  -356.46664
       0.00000     0.00000    -1.00000

  [1,4] =

     192.04483    43.25061  -545.71375
       0.00000  -196.51795  -347.82942
      -0.00000     0.00000    -1.00000

  [1,5] =

    -219.89201    31.95313  -689.69948
       0.00000  -179.23014  -346.02173
       0.00000     0.00000    -1.00000

}
cloud.pdf
pic1.pdf
pic2.pdf
pic3.pdf
pic4.pdf
pic5.pdf

Paul Baksic

unread,
May 28, 2018, 9:10:06 AM5/28/18
to MultiCamSelfCal
OK I found my mistake :
I put Square_Pixels: 1
Which I though would say "Pixels are squares don't try to change this parameter", but in fact it was the total opposite...

Thank you for your help anyway !

Andrew Straw

unread,
May 29, 2018, 12:14:23 PM5/29/18
to multica...@googlegroups.com
Dear Paul,

On 28 May 2018, at 3:10 PM, Paul Baksic <paulb...@gmail.com> wrote:

OK I found my mistake :
I put Square_Pixels: 1
Which I though would say "Pixels are squares don't try to change this parameter", but in fact it was the total opposite…


How did you find this? I had always assumed the same as you. Running MCSC with this parameter set to 1 returns calibrations in which the first two diagonal elements of the P matrix are very similar to each other (e.g. 457.878 vs 457.382), wheras with Square-Pixels: 0, these values differ more substantially (e.g. 432.206 vs. 430.844).  So I think the parameter name makes sense.

Best,
Andrew

Paul Baksic

unread,
May 29, 2018, 12:55:23 PM5/29/18
to multica...@googlegroups.com
Ok so I think I didn't understand it at all. 
In fact, for me, "Square pixel" was meant as the opposite of "parallelogram pixel", in other words : gamma = 0. So in fact, it tried to fit my calibration with squares pixels although my pixels were rectangular, that's the reason of the unsettling values of gamma... 

--
You received this message because you are subscribed to the Google Groups "MultiCamSelfCal" group.
To unsubscribe from this group and stop receiving emails from it, send an email to multicamselfcal+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages