The "reprojection error" is a term used for slightly different quantities depending on source. Including:
- A single 2d error vector between measured and projected point
- RMS of all lengths of errors
- Mean of all lengths of errors
OpenCV's cv::calibrateCamera() returns the RMS of all lengths.
Two RPE values obtained with different setups are not directly comparable. Pixel size, image noise, lens distortion and camera model play a role.
The RPE will never be exactly 0px due to image noise and lens blur, which cap detection precision and the camera model (e.g. Brown-Conrady) which cannot model the complex lens/sensor-combination 100% accurately.
A value of 2.0px after calibration is somewhat high for a standard quality camera with medium to long focal length. Some sources suggest RPE < 1.0px to generally be acceptable but this depends highly on the type of camera, the quality of the calibration process and the accuracy requirements you have for the application.
You must interpret the value carefully (overfitting) and a low value is not equal to an accurate calibration. You can use it to spot issues in calibration and to compare two calibrations of the same camera system.
An in-depth article on the topic can be found here: https://calib.io/blogs/knowledge-base/understanding-reprojection-errors