Javier,
I've just advertized bilinear.
For average_mp vs average_magphase, they are indeed different code paths.
My understanding of the code is that:
- average_magphase is only available for the complex data types
- for the complex data types, average_magphase makes sure that the norm
of the output pixel is the average of the norms of the contributing
input pixels, for each pixel. Whereas average_mp (according to
4d678d358354497813c2933ad1c18a924a3859e3, this stands for Magnitude
Preserving averaging) does first standard averaging on the real and
imaginary parts, but then multiply both components by gain =
standard_deviation_of_input_band /
standard_deviation_of_overview_band_before_correction.
- average_mp is also available for the non-complex data types, but then
it modifies the output pixels such that output_pixel =
(output_pixel_before_correction -
mean_of_overview_band_before_correction) * gain + mean_of_input_band.
Feel free to experiment a bit to confirm my reading, and provide doc
enhancements. As far as I can see, there is zero regression testing of
those 2 methods (they date back to 2001, not sure the autotest framework
was available at that time).
Even
Le 23/07/2024 à 10:57, Javier Jimenez Shaw via gdal-dev a écrit :
Reading carefully https://gdal.org/programs/gdaladdo.html
I saw that the summary mentions
[-r
{nearest|average|rms|gauss|cubic|cubicspline|lanczos|average_mp|average_magphase|mode}]
but later in the options "bilinear" is included. Either it should be
in both or in none.
In addition to that, in the summary there are "average_magphase" and
"average_mp", but in the later description, only average_magphase. It
is not clear if they are the same or different. Looking at the code I
think they are not the same thing.
Should that be changed? if yes, how?
Cheers
Javier
.___ ._ ..._ .. . ._. .___ .. __ . _. . __.. ... .... ._ .__
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev
--
http://www.spatialys.com
My software is free, but my time generally not.
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev