[gdal-dev] GDAL JP2KAK plugin for lossless 16 bit

Frederic CLAUDEL frederic.claudel at magellium.fr
Tue Feb 22 11:31:29 EST 2011


Hi,
 
I've been trying to create a lossless JPEG2000 image from a signed 16-bit
DEM (stored in a TIFF file),
but have had no success so far with JP2KAK.
My DEM has large NoData regions (value is DTED NoData : -32767)
 
I tried different GDAL versions (1.7 1.8), and different versions of KAKADU
(6.3, 6.2)
 
I'm using gdal_translate -of JP2KAK -co QUALITY=100 <input.tif> <output.tif>
 
The image is created with no errors, but shows strong artefacts around
Nodata parts, while the large NoData areas are transformed to random 16bit
garbage.
It's not a solution to use lossy conversion, because NoData values would be
lost.
 
However, using kakadu tools there is no problem : Creversible is used
instead of QUALITY=100
kdu_compress.exe -i <source>.tif -o <target>.jp2 Clayers=12 Creversible=yes 
 
So I guess the problem comes from GDAL JP2KAK driver.
A quick look at the code gave me no clue.
 
I also checked if it was coming from the signed type (Int16), but that
problem also occurs with unsigned 16-bit data (same data with a +32768
offset to have positive values)
 
thanks in advance for any hint,
best regards,
 
Frederic Claudel
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110222/49798d10/attachment.html


More information about the gdal-dev mailing list