[Gdal-dev] GDAL and Kakadu JPEG2000 performances and quality

Julien Demaria dem at acri-st.fr
Mon Sep 8 04:23:18 EDT 2003


Sorry I repost it for the mailing list because my first email has the wrong 
2002 date...

====================

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 compress RGB components 
separately ?)).

How can I obtain the same results with GDAL than with kakadu_compress ?

Sorry I'm newbie about 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/20030908/c34a0217/comparison_gdal_kakadu.zip


More information about the Gdal-dev mailing list