Skip to content

TIFFDecoder does not support 12 bits (integer) #21700

@chacha21

Description

@chacha21

OpenCV 4.5

As of OpenCV 4.5, the TIFFDecoder does not support 12 bits (integer).
It looks like a deliberate choice since decoding 8 and 16 are supported with optimized icv conversion functions.

Would it be accepted to add a "slow" unpacking step for non-standard bit depths ?

There are at least two problems :
-it would be logical to automatically scale the resulting cv::Mat (here by 1<<(16-12)), but the caller would not be aware that such a conversion was done
-TIFF is so complex that it's hard to ensure that all and every packing scheme is supported

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions