qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.32k stars 2.97k forks source link

Having QGIS Georeferencer also showing RMSE #47122

Open andremano opened 2 years ago

andremano commented 2 years ago

Feature description

Currently, QGIS georeferencer only shows the Mean Error. In qgsgeorefmainwindow.cpp the error is calculated as:

error = std::sqrt( ( sumVxSquare + sumVySquare ) / ( nPointsEnabled - mGeorefTransform.minimumGcpCount() ) );

Another measure of error that is useful to show is the Root Mean Square Error defined as:

error = std::sqrt( ( sumVxSquare + sumVySquare ) / ( nPointsEnabled ) );

This error would be shown in the bottom of the GCP table along with the mean error:

qgis_rmse_example

Additional context

No response

DelazJ commented 2 years ago

@andremano I think you wrote the same formula twice

andremano commented 2 years ago

Thanks for spotting it @DelazJ

agiudiceandrea commented 2 years ago

Currently, QGIS georeferencer only shows the Mean Error. In qgsgeorefmainwindow.cpp the error is calculated as:

error = std::sqrt( ( sumVxSquare + sumVySquare ) / ( nPointsEnabled - mGeorefTransform.minimumGcpCount() ) );

Another measure of error that is useful to show is the Root Mean Square Error defined as:

error = std::sqrt( ( sumVxSquare + sumVySquare ) / ( nPointsEnabled ) );

The comment in the code says that the first formula is used to calculate the root mean square error: https://github.com/qgis/QGIS/blob/35608f686ad0a97bbf19ad7fc079ea08343f40f8/src/app/georeferencer/qgsgeorefmainwindow.cpp#L1537-L1539

See also: https://gis.stackexchange.com/a/397427/107272.