Is there an interest in exposing an interface for individual tile
encode/decode?
I would be willing to take a stab at coding this. I just don't want to
duplicate anyone else's effort out there. So if the effort is already
underway I can wait.
This would be very useful for file based reader/writers. I am up to the
point with my ossim plugin that we can read raw j2k (full image) and
single block nitf's. So you can now use our apps imagelinker or iview
or ossimplanet, to view j2k's using the openjpeg plugin. I'd like to
move on to be tile based.
Also any interest in "Geo Open JPEG"? A single xml block to contain
geographic geometry info (GEO marker)? This would be cool.
Alternatively, nitf with j2k compressed blocks is a good solution as it
has all the hooks for geographic info built in.
Please let me know.
Thanks in advance,
Dave
> Hi,
>
> I am up to the point with my ossim plugin where I need to decode
> individual tiles.
>
> Are there any plans to expose an "opj_decode_tile" method in openjpeg.h
> to decode an individual tile? Or is there a way to already do this?
>
> I was looking tcd_decode_tile but I believe this decodes to full image
> buffer as opposed to a single tile buffer.
>
> Thank you and happy holidays to everyone out there,
> Dave
I figured this was eventually going to be asked. I've already started to
write a C++ version of library. The goal mainly being for performance.
C++ makes a good low-level interface. The entire library does not need
to be converted to C++ at once, so it can be done over time. I've
already started on the DWT module. The TCD module would be the next step.
Besides performance, I hope to have some flexible classes for a signal
abstraction layer. That way one could interface to the wavelets/tiles in
n-dimensions. If it effects performance negatively, then I'll pass on
the abstraction layer. The n-dimensional wavelet/tile interface would
allow for images that may mix 2D and 3D data together. It's more of the
theory now for its practicality, but it at least allows us to combine
the current efforts that are being put separately into the 2D and 3D
openjpeg2000 libraries.
I'll release some source when I'm satisfied with performance and class
layout.
Looking forward to it.
If you're interested, here's a link to the start of my ossim plugin.
Not sure if it would be of use as it's pretty generic.
https://svn.osgeo.org/ossim/trunk/ossim_plugins/openjpeg/
Take care,
Dave
As far as I understand, you're calling opj_decode with a
"reconstructed" code-stream containing only the tile you want to
decode. If you do it this way, you'll have to modify also the main
header of this reconstructed code-stream to adapt the image size and
total number of tiles. You will find information on the main header
syntax in the JPEG2000 standard (http://www.jpeg.org/public/
fcd15444-1.pdf).
cheers,
Antonin
Le 06-janv.-08 à 10:38, praveen.b...@gmail.com a écrit :
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google
> Groups "OpenJPEG" group.
> To post to this group, send email to open...@googlegroups.com
> To unsubscribe from this group, send email to openjpeg-
> unsub...@googlegroups.com
> For more options, visit this group at http://groups.google.fr/group/
> openjpeg?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
Given a JPEG 2000 compressed image, what is the recommended way to determine
whether it is a JP2 or J2K compressed image? In my application, I have a
compressed buffer that I need to decompress and need to figure out the type
so that I can pass the appropriate parameter to opj_create_decompress()
routine.
Thanks.
- Praveen
For a JP2 file, the first 12 bytes must be 0x0000 000C 6A50 2020 0D0A 870A
For a J2K file, the first 2 bytes must be 0xFF4F
So if you're sure you have or a JP2 file, or a J2K file, you can just
check the value of the first byte (0x00 -> JP2, 0xFF -> J2K).
Cheers,
François
Praveen Bhaniramka a écrit :