-
-
Notifications
You must be signed in to change notification settings - Fork 829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Color Space management #1170
Color Space management #1170
Conversation
901803d
to
fd7deef
Compare
fd7deef
to
90fe1f4
Compare
c7eadcb
to
f1e19a6
Compare
7753256
to
cb3c321
Compare
a7a8ace
to
6baec4b
Compare
src/aliceVision/image/io.cpp
Outdated
return configOCIOFilePath; | ||
} | ||
|
||
EImageColorSpace getImageColorSpace(const std::string imagePath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const std::string&
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not compile anymore on Windows.
4889a6b
to
6340ede
Compare
e38b85d
to
f362e3d
Compare
9f4a563
to
da97c07
Compare
I don't understand why we have new build errors on windows CI which does not seem to be really related to the PR:
|
@fabiencastan I think the commit There are also a couple of left-overs |
4033e60
to
4966c97
Compare
4966c97
to
3e995ff
Compare
3e995ff
to
8410f55
Compare
b1abb06
to
5347687
Compare
5347687
to
c5bfaf5
Compare
Add AliceVision:ColorSpace metadata when writing image. Manage AliceVision:ColorSpace metadata when reading image. * Renaming Complete renaming from outputColorSpace to workingColorSpace when using read image. * OIIO colorConfig object definition and initialization. OIIO colorConfig object is defined within io.cpp only. It is initialized with the default OCIO color config file that must be located in the directory src/aliceVision/image/share/aliceVision. A function declared in io.hpp is available to set another OCIO config file if needed. Search of OCIO config file strategy: First try with the ALICEVISION_OCIO env variable. If unsuccessful, second try with the standardized OCIO env variable. If unsuccessful, third try with ALICEVISION_ROOT env variable to extract the embedded config file. * image io Add log trace when OCIO config file found. Update OCIO config file by removing the possibility to call the OCIO V1 method to identify the color space from the file name. Default color space is still sRGB. When reading image, avoid searching input image color space if no conversion is needed. If conversion is needed, check color space validity after getting it from image metadate or image file name. Move config.ocio file in subdirectory to ease testing. Set ALICEVISION_ROOT environment variable in some tests related to image. * Workflow Add ALICEVISION_ROOT environment variable in continuous integration. * Working Color Space implementation in imageProcessing Transmit working color space to write image and convert to output color space if needed. Working color space is the color space in which the processing is done. Input images are converted in this color space by the readImage method.
First, search AliceVision:ColorSpace metadata in oiio read buf. If non-existent or invalid search oiio:ColorSpace metadata in read buf. If still non-existent or invalid use filename to guess the color space by using the oiio::readmetadata function and then the OCIO configuration file if any.
…ion for Windows in the alicevision_add_test cmake function.
…ontinuous integration github yml file. CMAKE_INSTALL_PREFIX definition is used by the Cmake function "alicevision_add_test" defined in Helpers.cmake to set the env var ALICEVISION_ROOT for the unitary target target RUN_TESTS.
c5bfaf5
to
57c5578
Compare
Description
A new private metadata named "AliceVision:ColorSpace" is now managed.
Read and Write image update to enable image processing in a color space given as a parameter.
imageProcessing executable updated to take advantage of the above possibility.
Features list
Implementation remarks
getColorConfigFilePath()
defined for avoiding some code duplication.getImageColorSpace(imagePath)
defined.outputcolorSpace
, field of theimageReadOptions
structure is renamed inworkingColorSpace
.imageColorSpace
of thewriteImage
methods is renamedoutputImageColorSpace
.