alicevision / AliceVision

Photogrammetric Computer Vision Framework
http://alicevision.org
Other
2.9k stars 807 forks source link

Update Color Space Extraction from image Metadata #1596

Closed demoulinv closed 6 months ago

demoulinv commented 7 months ago

Description

This PR updates the way the image color space is extracted from the metadata contained in an oiio buffer spec when reading an image.

Up tp now, only AliceVision:Colorspace and oiio:ColorSpace keys were considered with the priority given to the first one and with sRGB as default color space if no key is available.

We consider now color spaces named "workColourSpace" and "originalColourSpace" in addition to the two color spaces already considered and whatever their prefix.

In case several keys are available in the metadata, the following priority order is applied: 1 AliceVision:ColorSpace 2 workColourSpace 3 Use filename through regex specified in config.ocio 4 oiio:ColorSpace 5 originalColourSpace

If no key is available, the default sRGB color space is assumed for non exr images and Linear is assumed for exr ones.

Features list

Implementation remarks