According to jpeg2000 specification "if component mapping box is not present in jp2 header then ith component is mapped to ith channel". Index of the channel is obtained from channel definition box (if present).
I have a jp2 image, which doesn't have palette box and component mapping box, but it has channel definition box. Channel definition box has 6 channel descriptions while jp2 image has only 4 components.
Since Component mapping box is missing, ith channel should be mapped to ith component which is not possible when number of channels and components are not equal. So I am assuming my file is corrupt.
I have following questions:
What is the relation between number of channels and number of components (for both palettized and non-palettized jp2 image)? nChannels > nComponents or nChannels < nComponents or any other relation?