Root Mean Square Error of 2 raster layer in QGIS












3















Is there a method to calculate the RMSE between 2 raster layers in QGIS?



I have 2 point cloud files, 1 edited and the other not. After triangulation of each layer I have obtained 2 raster files.



I would like to find the RMSE in terms of their vertical height diff..



Is it possible to subtract one raster from the other and form a new raster and from export and calculate the RMSE in excel based on the z value?










share|improve this question























  • If you're willing to switch to GRASS GIS, then there is the module r.regression.line to get the full set of linear regression coordinates between two rasters. This module is available in the Processing framework.

    – Micha
    Feb 18 at 10:39
















3















Is there a method to calculate the RMSE between 2 raster layers in QGIS?



I have 2 point cloud files, 1 edited and the other not. After triangulation of each layer I have obtained 2 raster files.



I would like to find the RMSE in terms of their vertical height diff..



Is it possible to subtract one raster from the other and form a new raster and from export and calculate the RMSE in excel based on the z value?










share|improve this question























  • If you're willing to switch to GRASS GIS, then there is the module r.regression.line to get the full set of linear regression coordinates between two rasters. This module is available in the Processing framework.

    – Micha
    Feb 18 at 10:39














3












3








3








Is there a method to calculate the RMSE between 2 raster layers in QGIS?



I have 2 point cloud files, 1 edited and the other not. After triangulation of each layer I have obtained 2 raster files.



I would like to find the RMSE in terms of their vertical height diff..



Is it possible to subtract one raster from the other and form a new raster and from export and calculate the RMSE in excel based on the z value?










share|improve this question














Is there a method to calculate the RMSE between 2 raster layers in QGIS?



I have 2 point cloud files, 1 edited and the other not. After triangulation of each layer I have obtained 2 raster files.



I would like to find the RMSE in terms of their vertical height diff..



Is it possible to subtract one raster from the other and form a new raster and from export and calculate the RMSE in excel based on the z value?







qgis raster






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 18 at 6:04









BrianBrian

161




161













  • If you're willing to switch to GRASS GIS, then there is the module r.regression.line to get the full set of linear regression coordinates between two rasters. This module is available in the Processing framework.

    – Micha
    Feb 18 at 10:39



















  • If you're willing to switch to GRASS GIS, then there is the module r.regression.line to get the full set of linear regression coordinates between two rasters. This module is available in the Processing framework.

    – Micha
    Feb 18 at 10:39

















If you're willing to switch to GRASS GIS, then there is the module r.regression.line to get the full set of linear regression coordinates between two rasters. This module is available in the Processing framework.

– Micha
Feb 18 at 10:39





If you're willing to switch to GRASS GIS, then there is the module r.regression.line to get the full set of linear regression coordinates between two rasters. This module is available in the Processing framework.

– Micha
Feb 18 at 10:39










1 Answer
1






active

oldest

votes


















3














WhiteBoxTools has RootMeanSquareError tool. QGIS 3.x can access WBT through WhiteBox for Processing plugin. Definitely worth a try.



Unfortunately this RootMeanSquareError tool did not work for me when I tested it in my environment (QGIS 3.4.4 on Windows10). So let me suggest another approach, using R through Processing R Provider plugin.



You will need to install R and Processing R Provider plugin, but its setup is really easy.



Then click on big R icon on top of the Processing Toolbox panel, to activate Create New R Script.



In the blank window, please copy and paste texts below:



##Raster Analysis=group
##Input_Raster= raster
##Base_Raster= raster
##Raster_Statistics= output table

delta <- (Input_Raster - Base_Raster)^2
RMSE <- sqrt(cellStats(delta, 'mean'))

Result <- data.frame(rbind(RMSE), row.names= c("RMSE"))
colnames(Result) <- c("Stats")
Raster_Statistics <- Result


enter image description here



If you click on green triangle icon (Run Script) you will get a new window. Assign each of your raster layer to Input Raster and Base Raster and run the tool.



enter image description here



It will add a new table layer Raster statistics with the calculated RMSE. Open its attribute table to see the result.



enter image description here






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "79"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f312595%2froot-mean-square-error-of-2-raster-layer-in-qgis%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    WhiteBoxTools has RootMeanSquareError tool. QGIS 3.x can access WBT through WhiteBox for Processing plugin. Definitely worth a try.



    Unfortunately this RootMeanSquareError tool did not work for me when I tested it in my environment (QGIS 3.4.4 on Windows10). So let me suggest another approach, using R through Processing R Provider plugin.



    You will need to install R and Processing R Provider plugin, but its setup is really easy.



    Then click on big R icon on top of the Processing Toolbox panel, to activate Create New R Script.



    In the blank window, please copy and paste texts below:



    ##Raster Analysis=group
    ##Input_Raster= raster
    ##Base_Raster= raster
    ##Raster_Statistics= output table

    delta <- (Input_Raster - Base_Raster)^2
    RMSE <- sqrt(cellStats(delta, 'mean'))

    Result <- data.frame(rbind(RMSE), row.names= c("RMSE"))
    colnames(Result) <- c("Stats")
    Raster_Statistics <- Result


    enter image description here



    If you click on green triangle icon (Run Script) you will get a new window. Assign each of your raster layer to Input Raster and Base Raster and run the tool.



    enter image description here



    It will add a new table layer Raster statistics with the calculated RMSE. Open its attribute table to see the result.



    enter image description here






    share|improve this answer




























      3














      WhiteBoxTools has RootMeanSquareError tool. QGIS 3.x can access WBT through WhiteBox for Processing plugin. Definitely worth a try.



      Unfortunately this RootMeanSquareError tool did not work for me when I tested it in my environment (QGIS 3.4.4 on Windows10). So let me suggest another approach, using R through Processing R Provider plugin.



      You will need to install R and Processing R Provider plugin, but its setup is really easy.



      Then click on big R icon on top of the Processing Toolbox panel, to activate Create New R Script.



      In the blank window, please copy and paste texts below:



      ##Raster Analysis=group
      ##Input_Raster= raster
      ##Base_Raster= raster
      ##Raster_Statistics= output table

      delta <- (Input_Raster - Base_Raster)^2
      RMSE <- sqrt(cellStats(delta, 'mean'))

      Result <- data.frame(rbind(RMSE), row.names= c("RMSE"))
      colnames(Result) <- c("Stats")
      Raster_Statistics <- Result


      enter image description here



      If you click on green triangle icon (Run Script) you will get a new window. Assign each of your raster layer to Input Raster and Base Raster and run the tool.



      enter image description here



      It will add a new table layer Raster statistics with the calculated RMSE. Open its attribute table to see the result.



      enter image description here






      share|improve this answer


























        3












        3








        3







        WhiteBoxTools has RootMeanSquareError tool. QGIS 3.x can access WBT through WhiteBox for Processing plugin. Definitely worth a try.



        Unfortunately this RootMeanSquareError tool did not work for me when I tested it in my environment (QGIS 3.4.4 on Windows10). So let me suggest another approach, using R through Processing R Provider plugin.



        You will need to install R and Processing R Provider plugin, but its setup is really easy.



        Then click on big R icon on top of the Processing Toolbox panel, to activate Create New R Script.



        In the blank window, please copy and paste texts below:



        ##Raster Analysis=group
        ##Input_Raster= raster
        ##Base_Raster= raster
        ##Raster_Statistics= output table

        delta <- (Input_Raster - Base_Raster)^2
        RMSE <- sqrt(cellStats(delta, 'mean'))

        Result <- data.frame(rbind(RMSE), row.names= c("RMSE"))
        colnames(Result) <- c("Stats")
        Raster_Statistics <- Result


        enter image description here



        If you click on green triangle icon (Run Script) you will get a new window. Assign each of your raster layer to Input Raster and Base Raster and run the tool.



        enter image description here



        It will add a new table layer Raster statistics with the calculated RMSE. Open its attribute table to see the result.



        enter image description here






        share|improve this answer













        WhiteBoxTools has RootMeanSquareError tool. QGIS 3.x can access WBT through WhiteBox for Processing plugin. Definitely worth a try.



        Unfortunately this RootMeanSquareError tool did not work for me when I tested it in my environment (QGIS 3.4.4 on Windows10). So let me suggest another approach, using R through Processing R Provider plugin.



        You will need to install R and Processing R Provider plugin, but its setup is really easy.



        Then click on big R icon on top of the Processing Toolbox panel, to activate Create New R Script.



        In the blank window, please copy and paste texts below:



        ##Raster Analysis=group
        ##Input_Raster= raster
        ##Base_Raster= raster
        ##Raster_Statistics= output table

        delta <- (Input_Raster - Base_Raster)^2
        RMSE <- sqrt(cellStats(delta, 'mean'))

        Result <- data.frame(rbind(RMSE), row.names= c("RMSE"))
        colnames(Result) <- c("Stats")
        Raster_Statistics <- Result


        enter image description here



        If you click on green triangle icon (Run Script) you will get a new window. Assign each of your raster layer to Input Raster and Base Raster and run the tool.



        enter image description here



        It will add a new table layer Raster statistics with the calculated RMSE. Open its attribute table to see the result.



        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 18 at 11:06









        KazuhitoKazuhito

        15.9k41882




        15.9k41882






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f312595%2froot-mean-square-error-of-2-raster-layer-in-qgis%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to send String Array data to Server using php in android

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Is anime1.com a legal site for watching anime?