Help a newbie out

27 views
Skip to first unread message

Brian Peschel

unread,
Dec 23, 2009, 3:44:28 PM12/23/09
to OpenJPEG
I have a selection of Jpeg2000 images (jp2) that I am trying to work
with. They are available at:
https://njgin.state.nj.us/NJ_NJGINExplorer/IW.jsp?DLayer=NJ%202007%20Orthophotography%20%282009%20redelivery%29

If I use the LizardTech plugin for windows explorer the images open
fine.

On my machione (Fedora 8, gcc 4.1.2, OpenJPEG v1.3) I can't even get
the codec example to work right:

OpenJPEG_v1_3/codec/j2k_to_image -iF11D3.jp2 -o /tmp/out.tif

[INFO] tile 1 of 25
[ERROR] tcd_decode: incomplete bistream
[INFO] - tiers-1 took 0.452932 s
[INFO] - dwt took 0.492925 s
[INFO] - tile decoded in 1.008846 s
[ERROR] Failed to decode J2K image
Segmentation fault

I don't really see anything about how to use OpenJpeg other than the
example in the codec directory. All I want to do i open the image,
get the dimensions (in pixel) of the image and convert the image to an
array of RGB values.

Any ideas or suggestions? I am not even sure where to start....

- Brian

Matteo Italia

unread,
Dec 24, 2009, 11:41:32 AM12/24/09
to open...@googlegroups.com
Hello,
I suggest you to use the latest SVN version of OpenJPEG, I too
experienced several problems with the one provided in the Download
section. You should also patch it with the recent patch by Arnaud Maye
to add better support for YCbCr.
Anyhow, the codec code does not provide the best you can achieve from
this library, at least if you want to export to bmp: it doesn't support
many features of JPEG2000 that the library can decode correctly.
In these weeks I'm working on a better BMP output code (it's tailored to
memory DIBs, but I may adapt it also for file output), when it'll be
done I'll post it here.
By the way, I didn't download the jp2 files you're talking about, can
you give me some hints or upload them somewhere else?
Regards,
Matteo

Brian Peschel ha scritto:

> --
>
> 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+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/openjpeg?hl=en.
>
>
>
>

Brian Peschel

unread,
Dec 31, 2009, 12:41:40 PM12/31/09
to Matteo Italia, open...@googlegroups.com
I can get the latest from SVN, but I am not sure what that will get for
me. All I want to do it read in an image and extract the RGB values
from it. I don't need to export, convert, etc. I do need to resize
(zoom in/out) but I have other ways to do that if OpenJPG doesn't
support it (I haven't looked).

My bigger problem is how to do it. I haven't been able to really find a
tutorial and the documentation with it seems lacking. I was using the
codec directory because that at least had something to use. I know I
can use the LizardTech SDK (which isn't opensource, but is free) but the
library is huge.

Any thoughts here? How does a newbie learn to use OpenJPG? Is there
something out there I missed?

- Brian

Reply all
Reply to author
Forward
0 new messages