View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Read NITF file with JPEG 2000 image compression.

Be the first to rate this file! 3 Downloads (last 30 days) File Size: 1.63 KB File ID: #42178 Version: 1.0

Read NITF file with JPEG 2000 image compression.


Curtis (view profile)


Read a NITF file with JPEG 2000 compression.

| Watch this File

File Information

Reading a NITF image with JPEG 2000 compression results in the following Matlab errors:
Error using nitfread>checkCompression (line 386)
Bi-level and vector quantization compressed images currently not supported.
Error in nitfread>readImage (line 260)
useJpeg = checkCompression(subheader);
Error in nitfread (line 66)
X = readImage(subheader, pixelType, ...

This routine works by locating the JPEG 2000 header and extracting it from the NITF. The result is stored as TmpNtf.jp2, and then read using imread('TmpNtf.jp2').

The routine may be modified to read any file type supported by imread. To do this modify the variable Hdr to search for the appropriate image type, and change the extension of the temporary file name. If you have a way to decompress the image without writing the temporary file let me know at the email address contained in ImReadNtf.m

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.14 (R2012a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us