Read NITF file with JPEG 2000 image compression.
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
Cite As
Curtis (2024). Read NITF file with JPEG 2000 image compression. (https://www.mathworks.com/matlabcentral/fileexchange/42178-read-nitf-file-with-jpeg-2000-image-compression), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- Image Processing and Computer Vision > Image Processing Toolbox > Import, Export, and Conversion >
- MATLAB > Graphics > Images > Read, Write, and Modify Image >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |