Skip to content

Commit

Permalink
[Renaming]
Browse files Browse the repository at this point in the history
Complete renaming from LINEAR to SRGB_LINEAR.
Complete renaming from outputColorSpace to workingColorSpace when using read image.
  • Loading branch information
demoulinv committed May 31, 2022
1 parent 0c29f64 commit 9af7ec8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions src/aliceVision/hdr/hdr_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ bool buildBrackets(std::vector<std::string>& paths, std::vector<float>& times, c

ALICEVISION_LOG_INFO("writing to " << temp.string());

image::writeImage(temp.string(), img_bracket, image::EImageColorSpace::LINEAR);
image::writeImage(temp.string(), img_bracket, image::EImageColorSpace::SRGB_LINEAR);
paths.push_back(temp.string());
}

Expand Down Expand Up @@ -115,8 +115,8 @@ BOOST_AUTO_TEST_CASE(hdr_laguerre)
for(int imageId = 0; imageId < paths.size() - 1; imageId++)
{
image::Image<image::RGBfColor> imgA, imgB;
image::readImage(paths[imageId], imgA, image::EImageColorSpace::LINEAR);
image::readImage(paths[imageId + 1], imgB, image::EImageColorSpace::LINEAR);
image::readImage(paths[imageId], imgA, image::EImageColorSpace::SRGB_LINEAR);
image::readImage(paths[imageId + 1], imgB, image::EImageColorSpace::SRGB_LINEAR);

BOOST_CHECK(imgA.size() == imgB.size());
double ratioExposures = times[imageId] / times[imageId + 1];
Expand Down Expand Up @@ -189,8 +189,8 @@ BOOST_AUTO_TEST_CASE(hdr_debevec)
for(int imageId = 0; imageId < paths.size() - 1; imageId++)
{
image::Image<image::RGBfColor> imgA, imgB;
image::readImage(paths[imageId], imgA, image::EImageColorSpace::LINEAR);
image::readImage(paths[imageId + 1], imgB, image::EImageColorSpace::LINEAR);
image::readImage(paths[imageId], imgA, image::EImageColorSpace::SRGB_LINEAR);
image::readImage(paths[imageId + 1], imgB, image::EImageColorSpace::SRGB_LINEAR);

BOOST_CHECK(imgA.size() == imgB.size());
double ratioExposures = times[imageId] / times[imageId + 1];
Expand Down Expand Up @@ -272,8 +272,8 @@ BOOST_AUTO_TEST_CASE(hdr_grossberg)
for(int imageId = 0; imageId < paths.size() - 1; imageId++)
{
image::Image<image::RGBfColor> imgA, imgB;
image::readImage(paths[imageId], imgA, image::EImageColorSpace::LINEAR);
image::readImage(paths[imageId + 1], imgB, image::EImageColorSpace::LINEAR);
image::readImage(paths[imageId], imgA, image::EImageColorSpace::SRGB_LINEAR);
image::readImage(paths[imageId + 1], imgB, image::EImageColorSpace::SRGB_LINEAR);

BOOST_CHECK(imgA.size() == imgB.size());
double ratioExposures = times[imageId] / times[imageId + 1];
Expand Down
4 changes: 2 additions & 2 deletions src/samples/texturing/main_evcorrection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ int main(int argc, char **argv)
float ev;
oiio::ParamValueList metadata;
imageIO::readImage(filePath.path().string(), w, h, img.data(), imageIO::EImageColorSpace::LINEAR);
imageIO::readImage(filePath.path().string(), w, h, img.data(), imageIO::EImageColorSpace::SRGB_LINEAR);
img.setSize(w, h);
img.setName(filePath.path().stem().string());
imageIO::readImageMetadata(filePath.path().string(), metadata);
Expand Down Expand Up @@ -185,7 +185,7 @@ int main(int argc, char **argv)
}
std::string outputPath = outputFilePath + imgList[i].getName() + ".EXR";
imageIO::writeImage(outputPath, imgList[i].width(), imgList[i].height(), imgList[i].data(), imageIO::EImageQuality::LOSSLESS, imageIO::EImageColorSpace::LINEAR);
imageIO::writeImage(outputPath, imgList[i].width(), imgList[i].height(), imgList[i].data(), imageIO::EImageQuality::LOSSLESS, imageIO::EImageColorSpace::SRGB_LINEAR);
}
*/
Expand Down
2 changes: 1 addition & 1 deletion src/software/pipeline/main_imageMasking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ int main(int argc, char **argv)
}
const auto resultFilename = fs::path(std::to_string(index)).replace_extension("png");
const std::string resultPath = (fs::path(outputFilePath) / resultFilename).string();
image::writeImage(resultPath, result, image::EImageColorSpace::LINEAR);
image::writeImage(resultPath, result, image::EImageColorSpace::SRGB_LINEAR);
}

ALICEVISION_LOG_INFO("Task done in (s): " + std::to_string(timer.elapsed()));
Expand Down
2 changes: 1 addition & 1 deletion src/software/utils/main_colorCheckerCorrection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ int aliceVision_main(int argc, char** argv)

// Read image options and load image
image::ImageReadOptions options;
options.outputColorSpace = image::EImageColorSpace::NO_CONVERSION;
options.workingColorSpace = image::EImageColorSpace::NO_CONVERSION;
options.applyWhiteBalance = view.getApplyWhiteBalance();

image::Image<image::RGBAfColor> image;
Expand Down
4 changes: 2 additions & 2 deletions src/software/utils/main_colorCheckerDetection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ int aliceVision_main(int argc, char** argv)
std::to_string(view.getViewId()),
view.getMetadataBodySerialNumber(),
view.getMetadataLensSerialNumber() };
imgOpt.readOptions.outputColorSpace = image::EImageColorSpace::SRGB;
imgOpt.readOptions.workingColorSpace = image::EImageColorSpace::SRGB;
imgOpt.readOptions.applyWhiteBalance = view.getApplyWhiteBalance();
detectColorChecker(detectedCCheckers, imgOpt, settings);
}
Expand Down Expand Up @@ -546,7 +546,7 @@ int aliceVision_main(int argc, char** argv)
ALICEVISION_LOG_INFO(++counter << "/" << size << " - Process image at: '" << imgSrcPath << "'.");
ImageOptions imgOpt;
imgOpt.imgFsPath = imgSrcPath;
imgOpt.readOptions.outputColorSpace = image::EImageColorSpace::SRGB;
imgOpt.readOptions.workingColorSpace = image::EImageColorSpace::SRGB;
detectColorChecker(detectedCCheckers, imgOpt, settings);
}

Expand Down

0 comments on commit 9af7ec8

Please sign in to comment.