Mathematically right values in decomposing to LAB ?

What I’m looking for is an imagemagick down-sizing command that is something like the code in this file: https://gitlab.gnome.org/GNOME/gegl/blob/master/gegl/buffer/gegl-sampler-linear.c, which according to the online documentation (https://docs.gimp.org/2.10/en/gimp-tools-transform.html#gimp-tool-transform) takes the average of the four nearest pixels, not including the actual pixel. It does work well to downsize when the goal is noise reduction, when starting from a raw file that hasn’t been demosaiced, but instead simply output to disk without first doing an interpolation.

But I guess I shouldn’t have used the word “binning” - sorry! And given that the scanner actually produces RGB, no interpolation needed, maybe some other down-scaling algorithm would work better.

But again, the goal of the down-scaling, down-sampling? is noise reduction rather than preservation of detail.