Skip to content
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

[software] new ImageProcessing software #741

Merged
merged 1 commit into from
Mar 26, 2020
Merged

Conversation

fabiencastan
Copy link
Member

  • replace cameraDownscale
  • add exposure compensation, constrast, median filter, sharpen

"Exposure Compensation.")

("contrast", po::value<float>(&contrast)->default_value(contrast),
"Contrast Factor (1.0: no change).")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for numeric params it would be better to add the range of values that can be taken with a brief explanation, i.e. [1 10], no change - max enhancement) to give at least a hint to the user on how to use it


// Analyze output path
boost::filesystem::path path(sfmOutputDataFilepath);
std::string outputPath = path.parent_path().string();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const



// Analyze output path
boost::filesystem::path path(sfmOutputDataFilepath);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const


if (downscale != 1.0f)
{
unsigned int w = view.getWidth();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all const


image::Image<image::RGBfColor> rescaled(nw, nh);

oiio::ImageSpec imageSpecResized(nw, nh, 3, oiio::TypeDesc::FLOAT);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const

image::Image<image::RGBfColor> rescaled(nw, nh);

oiio::ImageSpec imageSpecResized(nw, nh, 3, oiio::TypeDesc::FLOAT);
oiio::ImageSpec imageSpecOrigin(w, h, 3, oiio::TypeDesc::FLOAT);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const

}
if (exposureCompensation)
{
float medianCameraExposure = sfmData.getMedianCameraExposureSetting();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all const

}

// Save the image
std::string ext = extension.empty() ? fs::path(view.getImagePath()).extension().string() : (std::string(".") + extension);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const


// Save the image
std::string ext = extension.empty() ? fs::path(view.getImagePath()).extension().string() : (std::string(".") + extension);
std::string outputImagePath = (fs::path(outputPath) / (std::to_string(view.getViewId()) + ext)).string();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const

system::Logger::get()->setLogLevel(verboseLevel);

if (downscale < 0.0001f || downscale > 1.0f) {
ALICEVISION_LOG_ERROR("Invalid scale factor (]0,1]");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

]0,1] typo [0,1]

// Save sfmData with modified path to images
if (!sfmDataIO::Save(sfmData, sfmOutputDataFilepath, sfmDataIO::ESfMData(sfmDataIO::ALL)))
{
ALICEVISION_LOG_ERROR("The output SfMData file '" << sfmOutputDataFilepath << "' cannot be write.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"' cannot be write.") --> "' cannot be written.")

* replace cameraDownscale
* add exposure compensation, constrast, median filter, sharpen
@fabiencastan fabiencastan merged commit 88b5266 into develop Mar 26, 2020
@fabiencastan fabiencastan deleted the dev/imageProcessing branch March 26, 2020 12:03
@natowi
Copy link
Member

natowi commented Mar 29, 2020

@fabiencastan Any idea why appveyor fails since this PR?

@fabiencastan
Copy link
Member Author

Ohh, you're right! There was a windows build error (and not just a build timeout as usual!):

C:\projects\alicevision\src\software\utils\main_imageProcessing.cpp(10): fatal error C1083: Cannot open include file: 'opencv2/opencv.hpp': No such file or directory

There are some trailing opencv includes that are not used.

@fabiencastan fabiencastan added this to the 2020.1.0 milestone May 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants