[gdal-dev] image quality with pyramids (with gdal_retile)
christian.mueller at nvoe.at
christian.mueller at nvoe.at
Tue Mar 15 09:41:17 EDT 2011
Quoting Devrim Baris Acar <devrimbaris at gmail.com>:
> Hi,
> I am building a pyramid from a 650 MB geotiff file (rgb) , with the
> following command from fwtools 2.4.6 on a win32 box
>
> gdal_retile -levels 5 -pyramidOnly -targetDir pyramid bathymetry.
>
> I loaded these image files to geoserver and see that when I zoomed to the
> higheest available level, the images are "degraded in quality" in
> comparison to original one.
Try another interpolation using the -r switch. Default is nearest
neighbor, which is fast bot does not produce the best quality.
try -r bilinear or -r cubic
> Also , I expected that the resulting pyramid size to be bigger than the
> original file size, but it is NOT.
I do not understand exactly what you are meaning here, but consider
the following fact. Each pixel of level n substitutes 4 pixels at
level n-1.
If your original image = 1024 x 1024, the first level is 512 x 512,
the second 256 x 256, the third 128x128, the fourth 64 * 64. Let us
stop here and use a calculator for
1024*1024 - 512*512 - 256*256 - 128*128-64*64
The result is 700416, the original image has 700416 pixel more than
the sum of all pyramids.
Cheers
>
> What is the reason for this , any ideas, and solutions?
>
> Best regards,
>
> Devrim Baris Acar
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the gdal-dev
mailing list