[Gdal-dev] 12 bit Jp2k image questions.

Daniele Romagnoli dany.geotools at gmail.com
Thu Dec 7 12:56:03 EST 2006


Hi,
out of curiosity, I'm trying to build GDAL with Kakadu support for JP2K.

I have downloaded the Kakadu windows library but when I build GDAL this
error occurs:

--------------------------------------------------------------------------------------------------------------------------
D:\gdal\frmts>cd jp2kak   && nmake /NOLOGO /f makefile.vc   && cd ..
        cl /nologo /MD /EHsc /Zi /Fd..\..\gdal.pdb -I..\..\port -I..\..\ogr
-I..
\..\gcore  -I..\..\alg -ID:\WORK\kakadu /DKDU_PENTIUM_MSVC /GX /c
jp2kakdataset.
cpp
jp2kakdataset.cpp
jp2kakdataset.cpp(119) : fatal error C1083: Cannot open include file:
'jp2_local
.h': Invalid argument
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
--------------------------------------------------------------------------------------------------------------------------

Where can I find jp2_local.h in order to build GDAL?

Thanks a lot.
Best regards,

Daniele

PS: I will point you to the sample file later on. Before, I just want to do
other attempts with JP2K :)


On 12/7/06, Frank Warmerdam <warmerdam at pobox.com> wrote:
>
> Daniele Romagnoli wrote:
> > Hi List,
> > after my last exam, I'm back working on GDAL ImageIO integration
> proposal.
>
> Daniele,
>
> That's great news!
>
> > I have some questions...
> > I'm using a 12 bit Jpeg2k sample, which shows up fine in Java using the
> > ImageIO pure Java reader based on JJ2000.
> >
> > When opening this image with OpenEV or using gdalinfo, it says that the
> > image is 8 bit.
> > When using JAVA GDAL Bindings the image seems to be 16 bit since the
> > Data Type we get is /GDT_UInt16/ . With no surprise the displayed image
> > is darker than expected.
>
> I can see no obvious reason for gdalinfo reporting something different
> than you get from the bindings unless the builds are really quite
> different.  Can you point me to the sample file in question?
>
> As for darker/lighter that can be highly affected by how the application
> chooses to scale the 16bit image to 8bit.  In particular OpenEV has
> some fairly fancy logic for computing a default scaling.
>
> > As an aside, is it normal that I do not get any metadata back using the
> > Java Bindings for this jp2 image? I iwas hoping to get information about
> > the image type directly from metadata.
>
> Metadata generally contains information beyond the basic structural
> information such as datatype, pixels and lines, geolocation, coordinate
> system.  In any event, there isn't currently a mechanism for capturing
> metadata from jpeg2000 in the various jpeg2000 drivers as far as I am
> aware.  The exception is fhat if you read a GMLJP2 file, and you request
> metadata from the "GML" domain you should get the gmlcoverage XML document
> back from the metadata api.
>
> > What can I do to know in advance from GDAL that this image is 12 bit?
>
> Consulting the band data type should be the right way, and it should
> report GDT_UInt16 from gdalinfo, openev and your calls to the bindings
> if you are really using the same library version in all cases.
>
> Best regards,
> --
>
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam,
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | President OSGeo, http://osgeo.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20061207/5a2dcee9/attachment.html


More information about the Gdal-dev mailing list