Friday, November 20, 2009

JPEG2000 Performance






When the former ER Mapper, Ltd (purchased in May 2007 by ERDAS) began work in 2003 to add support for JPEG2000 (JP2) to the ECW SDK, ER Mapper noticed JP2 specifications were very broad. As a result, JP2’s speed would not approach ECW speeds for decades, if ever. Think of it this way, JP2 is a Sports Utility Vehicle (SUV or 4-wheel drive) and ECW is a Formula 1 Ferrari.

The geospatial industry deals with dozens to thousands of images at a time and speed is critical. While geospatial users need the Formula 1 Ferrari, they must drive on public roads (lowest common IT standards), and thus must use the SUV not the Formula 1.

How can SUV owners get more speed from their JP2 beast? By using the ERDAS ECW/JP2 SDK’s J2I file. This ‘index’ file to the JP2 file allows customers to more rapidly access JP2 data in a viewing technology that uses the ECW SDK to read ECW and JP2 files. The J2I file will significantly improve your performance by fine tuning your existing engine.

The improvement in speed depends on the encoding method. Some encoding methods mandated by less geospatially sophisticated IT departments are like pulling a loaded trailer behind the SUV. An engine tuning helps, but slow starts cannot be avoided.

You may ask, how do I create these on JP2 J2I files in ERDAS IMAGINE 2010? For one image at a time, just touch the file with any ERDAS IMAGINE function, and like the aux file, it is automatically created.

For batch creation, use the Edit Image Metadata (aka Image Command Tool). Select one image needed, select ‘Batch’, the select all images needed in the batch tool.

You may be asking, why is there no check-box function for creation the J2I file on Edit Image Metadata? All you need to do is touch the file with any ERDAS IMAGINE function and it is created. Thus only touching the file in Batch Mode is needed.

And with the IMAGINE Advantage 2010 batch mode, you can touch up to four images at a time with each IMAGINE Advantage floating license you have available.

Back to our cars (image file formats); what I want from my GIS and remote sensing data format and software is a street version Ferrari (has a roof, stereo, leather seats, electric windows, air-conditioning, and of course GPS).


Ref: What are J2I files? and Why compress? 

See info on the latest ERDAS ECW/JP2 SDK.

8 comments:

Anonymous said...

I have a large amount of jp2 files to import, using Erdas Imagine 9.3batch process, but it's allmost impossible! The creation of j2i files takes too long and Erdas finally crashes! Do you have any idea how can I solve this problem? I couldn't find any fix. Tanks!

Paul said...
This comment has been removed by the author.
Paul said...

Have you posted this question in ERDAS Communities? The community can be found at: http://community.erdas.com/forums/

When you post, try to clarify your question/comment. I have processed complex functions on thousands of images running for day when never a crash (unless my network went down or my USB drive went to sleep) using the batch tools.

What do no you mean by the term, 'Import'? Creating a j2i file does not convert/import the actual JPEG2000 file, it just creates an ancillary file, somewhat similar to the .aux, or .rrd file.

Also, do you mean you have a lot of images, or you have a very big image? How many images and what are their typical sizes in rows x columns x bands?

Anonymous said...

I am trying to convert app. 100 images at a time - using batch process - from jp2 to img. The size of each image is 6000X3000 pixels (app. 80MB each). Erdas 9.3calculates a j2i file for each jp2 file, before starting the conversion to img. It needs appr. 2-3 minutes for each j2i!! I don't understand why it has to create this file in order to convert it to img!
Thanks for the reply!

Anonymous said...

The jp2 files have 3 bands.

Paul said...

Why are you converting to .img? You can process in ERDAS IMAGINE without converting first. So, if you need to re-project, just re-project to the output .img and be done with it. The j2i is a 'spatial index.' Some JPEG2000 format options are not well structured for structures nor for random access.

ERDAS is spending significant time on the ECW SDK (the toolkit for ECW and JPEG2000). ECW SDK 4.0 is due out this year. Speed, speed, speed.

Anonymous said...

Yes, I need to reproject, but in any case Erdas 9.3 computes a j2i, every time I touch a jp2. It takes too long too. I did the same job with 9.1 without any delay. It worked very fast (no j2i files).

Paul said...

Anonymous, you will find in the use of the latest ECW/JP2 SDK in ERDAS IMAGINE/LPS/ER Mapper 2011 V11.0.5 will depend less on J2I files for performance than earlier versions. In many cases, a J2I file will not be created at all.

These improvements in the ECW/JP2 SDK will be rolled out into the public ECW/JP2 SDK for use in 3rd party applications later this year.