How is RMS calculated in stereoCalibrate()

asked 2019-04-05 11:54:51 -0600

Hugheschen gravatar image

updated 2019-04-05 14:50:05 -0600

Hello all,

I have always wondered how is reprojection calculated in RMS. I understand calculating RMS is similar to calculate standard deviation, instead of subtracting mean, we subtract "true value".

By calling the stereoCalibrate(), it returns a final value of RMS, and I could also obtain a vector of RMS from the function. I wonder how is the final value related to the vector of RMS (PerViewError).

For example as the image shown below, I have a final RMS = 2.23339, and a vector of RMS corresponding to image pairs. How are they related? Can I used the vector to calculate the final RMS?

image description

edit retag flag offensive close merge delete

Comments

use the doc : The function returns the final value of the re-projection error.

perViewErrors Output vector of the RMS re-projection error estimated for each pattern view.

LBerger gravatar imageLBerger ( 2019-04-05 13:17:33 -0600 )edit

Thanks for the response. I am still a little confused. My understanding is both Final and PerViewError Vector are reprojection error calculated as RMS. While Final RMS is a overall of all stereo pairs, and PerViewError is calculated based on 1 pair. Am I correct in this sense?

Hugheschen gravatar imageHugheschen ( 2019-04-05 14:48:47 -0600 )edit
1

please post your screen copy as text

LBerger gravatar imageLBerger ( 2019-04-06 02:00:44 -0600 )edit

I didn't save my last result, but here is another sample for you @LBerger, thank you for helping me. RMS = 2.72163 [2.555810035929563, 1.717795649851975; 2.251065055754842, 1.465012144087651; 4.841288782639332, 3.473414630779339; 3.696148783125525, 1.309333539715789; 4.100269818319679, 1.316544100559535; 4.442900278577694, 1.48581872369056; 3.884218304621516, 2.070538813247009; 3.86388801521297, 1.774934719447845; 3.183589077627722, 1.994188186840544; 2.56111460279647, 1.710244225499387; 2.218564462368255, 1.540395162903343; 1.972164002589083, 1.536869174794308; 2.57595067353927, 1.928101356657496; 3.055601927361268, 2.04185734096128; 3.602300552229382, 1.648495131840332]

Hugheschen gravatar imageHugheschen ( 2019-04-08 10:41:17 -0600 )edit

Matlab code :

x=  [2.555810035929563, 1.717795649851975; 2.251065055754842, 1.465012144087651; 4.841288782639332, 3.473414630779339; 3.696148783125525, 1.309333539715789; 4.100269818319679, 1.316544100559535; 4.442900278577694, 1.48581872369056; 3.884218304621516, 2.070538813247009; 3.86388801521297, 1.774934719447845; 3.183589077627722, 1.994188186840544; 2.56111460279647, 1.710244225499387; 2.218564462368255, 1.540395162903343; 1.972164002589083, 1.536869174794308; 2.57595067353927, 1.928101356657496; 3.055601927361268, 2.04185734096128; 3.602300552229382, 1.648495131840332]
sqrt(mean(sum(x.^2,'c')/2))
LBerger gravatar imageLBerger ( 2019-04-08 14:37:55 -0600 )edit
1

Thank you very much!

Hugheschen gravatar imageHugheschen ( 2019-04-08 14:52:53 -0600 )edit