[gdal-dev] JP2ECW driver fails with lossless JPEG2000 images
Greg Coats
gregcoats at mac.com
Wed Jan 21 10:05:27 EST 2009
geojasper includes a utility that conveniently compares a GeoTif
image to a GeoJp2 image. Greg Coats
$ geoimgcmp
Image Comparison Utility (Version 1.900.1).
usage:
geoimgcmp -f reference_image_file -F other_image_file [-m metric]
The metric argument may assume one of the following values:
psnr .... peak signal to noise ratio
mse ..... mean squared error
rmse .... root mean squared error
pae ..... peak absolute error
mae ..... mean absolute error
equal ... equality (boolean)
$ geoimgcmp -f 18stj940125.tif -F 18stj940125_kdu_reversible.jp2 -m rmse
geojasper info: GeoTiff found, size: 471
geojasper info: TIFF file decoded!
geojasper info: GeoJp2 info found...
0.000000
0.000000
0.000000
$ geoimgcmp -f 18stj940125.tif -F
18stj940125_kdu_irreversible10to1.jp2 -m rmse
geojasper info: GeoTiff found, size: 471
geojasper info: TIFF file decoded!
geojasper info: GeoJp2 info found...
3.706568
3.730488
4.409576
On Jan 21, 2009, at 3:59 AM, Jukka Rahkonen wrote:
> Hi,
>
> I have been suspecting that JP2ECW driver does not handle lossless
> jpeg2000
> images correctly and now I am pretty sure that it is true at least
> with images
> compressed with Kakadu.
>
> I made a test by using FWTools 2.2.8 on Windows. I took a 100x100
> pixel sized
> test image in tif format and compressed in with Kakaku tool
> 'kdu_compress'
>
> Command:
> kdu_compress -i JP2ECW_test_original.tif -o kakadu.jp2 Creversible=yes
>
> Then I decompressed the image with kdu_expand
> Command:
> kdu_expand -i kakadu.jp2 -o kakadu.tif
>
> Then I converted kakadu.jp2 to tif with gdal_translate that has
> JP2ECW driver as
> default JPEG2000 driver.
> Command:
> gdal_translate -of gtiff kakadu.jp2 ecw.tif
>
> Tiff image translated with kdu_expand is identical with the
> original but the one
> translated with gdal_translate for sure is not.
>
> I would say that right now nobody should use JP2ECW driver for
> handling lossless
> JPEG2000 images.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20090121/54798570/attachment-0001.html
More information about the gdal-dev
mailing list