jpylyzer icon indicating copy to clipboard operation
jpylyzer copied to clipboard

Add missing codestream marker segments

Open bitsgalore opened this issue 12 years ago • 7 comments

Dev Effort

TBC

Description

Currently jpylyzer doesn’t support the full set of marker segments that can occur in a codestream. Missing ones should ideally be included at some point (although some of them are pretty rare).

A good first step would be to create empty validator functions for all missing marker segments, which is quick and easy to implement. This would allow jpylyzer to report at least the presence of these markers in a file (without providing any details about its fields). This is already very useful information by itself, as some decoders appear to choke on some of the more obscure marker segments, so knowing they're there can already be helpful.

bitsgalore avatar Feb 06 '13 13:02 bitsgalore

Minimal support for missing marker segments added in 1.7.0. Full support to follow later ..

bitsgalore avatar Feb 07 '13 17:02 bitsgalore

Started with COC marker here. Turns out the SPCOC parameter follows the same format as SPCOD in the COD marker. So first refactor code for parsing in COD, then re-use in COC.

Similarly the QCC marker reuses things from QCD.

bitsgalore avatar Aug 12 '19 16:08 bitsgalore

For additional test images see JP2s in Tika Regression corpus:

http://162.242.228.174/share/jp2.tgz

Update - this yielded images with qcc, tlm and crg markers!

The openjpeg-data repo contains some more images with coc markers.

bitsgalore avatar Aug 14 '19 19:08 bitsgalore

UPDATE: current jpylyzer-2-dev branch now includes validation of COC, QCC, POC, RGN and CRG markers segments, which means that all delimiting (section A.4), fixed information (section A.5), functional (section A.6) and informational marker segments (section A.9) are now covered. Not included (yet) are:

  • Pointer marker segments (section A.7): TLM, PLM, PLT, PPM, PPT
  • In-bit-stream marker segments (section A.8): SOP, EPH. These are packet-level error resilience marker segments which should probably remain out of scope because including them would involve parsing the bit stream, which would probably slow down jpylyzer quite a lot and also result in overly verbose output.

Note that jpylyzer-test-files now has at least 1 test image for all of the above marker segments.

bitsgalore avatar Aug 22 '19 11:08 bitsgalore

PR for plt segment here: #170, which will further this issue a bit.

VirtualTim avatar Jun 30 '20 08:06 VirtualTim

Further update: @boxerab provided some useful pointers (sample files + code) for TLM parsing here:

Here is an example of an image with a corrupt TLM marker:

https://l3harrisgeospatial-webcontent.s3.amazonaws.com/MM_Samples/Pleiades_ORTHO_UTM_BUNDLE.zip

also, here is some code that parses a TLM marker

bitsgalore avatar Jan 25 '22 11:01 bitsgalore