[Gdal-dev] Re: GeoJP2K: Unable to view 16-bit data

Valentine Anantharaj val at GRI.MsState.Edu
Fri Apr 30 15:44:17 EDT 2004


I found another related post in the Kakadu discussion group.  I think 
that this information from Dr. Taubman may be relevant to my original 
message regarding the viewers just showing black pixels of 16-bit data.

Regards,

VGA


________

From:  "David Taubman" <d.taubman at u... 
<http://groups.yahoo.com/group/kakadu_jpeg2000/post?postID=q-Dlm5jPyTWVCMdM4HBvKTiZBw58C6NiQNOPyX8_LhdIHe-xv1IC8X9zE8cHHboD3YMx-SAq8vdIkohMlw>> 

Date:  Mon Dec 22, 2003  6:46 pm
Subject:  Re: [kakadu_jpeg2000] About kdu_show...

HI Antonio,

This seems a little mysterious to me. The only thing
I can think of is that the 16-bit sample values mean
quite different things for each of your two images.
There should not be any size dependency. "kdu_show"
displays the most significant 8 bits of the decompressed
image -- in fact, it asks the decompression machinery to
decompress the data with only sufficient precision to
render these most significant bits since the less significant
bits are invisible. A common mistake in using JPEG2000
is to compress an image whose samples are stored in a
16-bit format as a 16-bit image even if the data is really all
in the least significant, say, 12 bits. The Kakadu perspective
(and the one which is most in line with the way JPEG2000
does things in its irreversible processing path) is that black
corresponds to the minimal representable integer, while white
corresponds to the maximum representable integer, at
the stated precision, with everything else corresponding to
shades of grey. So if you have compressed a 12 bit image,
stored in 16 bit words, as though it were 16 bit data, you
are basically telling the compressor (and subsequent renderers)
that the brightest sample value is 1/16 of the value associated
with white -- and of course, the image will look black. If
your imagery really has less bits, use Sprecision to set the
actual precision of the data.

Hope this helps -- otherwise, if you think something is
wrong with Kakadu, could you send me a small sample
please.

Cheers,

David

---------------------------------------
Dr. David Taubman
Head: Telecommunications Research Group
Associate Professor, School of Electrical Engineering and Telecommunications
The University of New South Wales
UNSW Sydney 2052, Australia
Phone: 61 2 9385-5223
Fax: 61 2 9385-5993

---------------------------------------
This message is intended for the addressee named and may contain
confidential information. If you are not the intended recipient, please
delete it and notify the sender. Views expressed in this message are
those of the individual sender and are not necessarily the views of
UNSW.

----- Original Message -----
From: "antonio serra" <prof_motoserra at y... 
<http://groups.yahoo.com/group/kakadu_jpeg2000/post?postID=BI7nnqNffTUAvEvgTem_Vt2VfUJXyuCuKywlB6I13exLlNLt3EV63-89NGZJXqIAcu9NzyDn9phyiluOEdw>>
To: <kakadu_jpeg2000 at yahoogroups.com 
<http://groups.yahoo.com/group/kakadu_jpeg2000/post?postID=NPRVX8HdnuSfB6YDCWS47t7oLh1ZpFFJcvoO2E03DN261Dmdza9hkAD7bQEvLAvItu7ATR8CBRTakxa4H2mK2IwnMBFAYw>>
Sent: Saturday, December 20, 2003 2:54 AM
Subject: [kakadu_jpeg2000] About kdu_show...


 > Hi all!
 >
 > My question is related with kdu_show and image
 > visualization. I have 2 images both grayscale, 16 bits
 > per sample, unsigned, sizes 9911x10161 and 1536x1121.
 > Compressing both images with same parameters I can see
 > the smaller one but the other shows all black. There
 > is any problem with the image size? I guess not. Does
 > kdu_show do any truncation of the samples values
 > before showing them? If yes what kind?
 >
 > Thanks in advance,
 > AS
 >

Valentine Anantharaj wrote:

> Greetings!
>
> I am unable to view some16-bit GeoJP2K files, created using GDAL w/ 
> Kakadu support.  The viewer window was simply blcak.  I tried them 
> using both 'kdu_show' and the MSI viewer as well as their ArcView 
> plug-ins.  I also got similar results (everything just black) from the 
> '16-bit comparison' samples from:
>
>    ftp://ftp.remotesensing.org/jpeg2000/16bitcomparison
>
> The 8-bit, 3 channel RGB files display fine in both kdu_show and MSI 
> viewer.  Any recommendation for viewing 16-bit GeoJP2K files?  I do 
> not have the necessary patches/sevice-packs/modules for ENVI 4.0 or 
> IMAGINE 8.6.
>
> Thanks.
>
> Regards,
>
> VGA
>
>
>
>
>




More information about the Gdal-dev mailing list