[Gdal-dev] GDAL and Kakadu JPEG2000 performances and quality
Julien Demaria
dem at acri-st.fr
Thu Sep 5 10:16:32 EDT 2002
Hi,
I'm testing GDAL JPEG2000 with Kakadu and I have some questions about
performances and resulting quality :
My test is simple :
INPUT : a simple BMP file RGB 5096x4496 : size : 66 Mo
OUPUT : I want a JP2 file with size near 8 Mo
PLATFORM : Cygwin under Windows NT
First I try with kdu_compress include in binary package ok Kakadu 4.0.3 for
Windows :
time kdu_compress.exe -i RGB.bmp -o RGB_kakadu_compress.jp2 -rate
2.85,2.85,2.85
=> 36 seconds
Then I try the same with gdal_translate included in OpenEV_FW_1.6.2 binary
package :
time gdal_translate.exe -of JP2KAK -co QUALITY=12 win32_executables/RGB.bmp
RGB_kakadu_gdal.jp2
=> 96 seconds
Do you know why there is this difference of performances ?
In the GDAL 1.1.9 Kakadu source code driver I see that JP2 Kakadu files are
virtually tiled into 512x128 tiles :
/* -------------------------------------------------------------------- */
/* Use a 512x128 "virtual" block size unless the file is small. */
/* -------------------------------------------------------------------- */
if( nRasterXSize >= 1024 )
nBlockXSize = 512;
else
nBlockXSize = nRasterXSize;
if( nRasterYSize >= 256 )
nBlockYSize = 128;
else
nBlockYSize = nRasterYSize;
Maybe this virtual tiling is the reason ?
(I don't know how kdu_compress write the data...)
When I compared visually the results (with OpenEV without viewer
interpolation) I see also a big quality difference :
I have attached in the mail a ZIP file with the different snapshots.
The JP2 created with kakadu_compress seems better and I find that the image
created by GDAL seems have colorimetric degradation (the color of some
pixels seems surprising (are kakadu and/or gdal commpress RGB components
separately ?)).
How can I obtain the same results with GDAL than with kakadu_compress ?
Sorry I'm newbie in JPEG2000 and Kakadu and GDAL and maybe the cause is I
didn't pass the good arguments to GDAL and/or kakadu_compress...
Many thanks in advance and sorry for my poor english,
Julien
PS : kakadu_compress print a warning :
"Note:
The default rate control policy for colour images employs visual (CSF)
weighting factors. To minimize MSE instead, specify `-no_weights'."
What is it ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: comparison_gdal_kakadu.zip
Type: application/zip
Size: 11612 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20020905/4a97d966/comparison_gdal_kakadu.zip
More information about the Gdal-dev
mailing list