-
-
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
[software] new ImageProcessing software #741
Conversation
fabiencastan
commented
Feb 8, 2020
- 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).") |
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.
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(); |
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
|
||
|
||
// Analyze output path | ||
boost::filesystem::path path(sfmOutputDataFilepath); |
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
|
||
if (downscale != 1.0f) | ||
{ | ||
unsigned int w = view.getWidth(); |
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.
all const
|
||
image::Image<image::RGBfColor> rescaled(nw, nh); | ||
|
||
oiio::ImageSpec imageSpecResized(nw, nh, 3, oiio::TypeDesc::FLOAT); |
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
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); |
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
} | ||
if (exposureCompensation) | ||
{ | ||
float medianCameraExposure = sfmData.getMedianCameraExposureSetting(); |
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.
all const
} | ||
|
||
// Save the image | ||
std::string ext = extension.empty() ? fs::path(view.getImagePath()).extension().string() : (std::string(".") + extension); |
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
|
||
// 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(); |
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
system::Logger::get()->setLogLevel(verboseLevel); | ||
|
||
if (downscale < 0.0001f || downscale > 1.0f) { | ||
ALICEVISION_LOG_ERROR("Invalid scale factor (]0,1]"); |
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.
]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."); |
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.
"' cannot be write.") --> "' cannot be written.")
972d2c9
to
814663c
Compare
* replace cameraDownscale * add exposure compensation, constrast, median filter, sharpen
814663c
to
380d4da
Compare
@fabiencastan Any idea why appveyor fails since this PR? |
Ohh, you're right! There was a windows build error (and not just a build timeout as usual!):
There are some trailing opencv includes that are not used. |