-
-
Notifications
You must be signed in to change notification settings - Fork 827
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
Exposure and format adjustment #1414
Conversation
@@ -423,12 +427,24 @@ void processImage(image::Image<image::RGBAfColor>& image, const ProcessingParams | |||
} | |||
} | |||
|
|||
if (pParams.scaleFactor != 1.0f) | |||
if ((pParams.scaleFactor != 1.0f) || (pParams.maxWidth != 0) || (pParams.maxHeight != 0)) |
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.
I would prefer to compute a scaleFactor based on pParams.scaleFactor, pParams.maxWidth, pParams.maxHeight.
And keep this if to check if this new scaleFactor is not 1.
As currently, if pParams.scaleFactor is one and maxWidth/Height are not 0 but a large value, it could introduce image duplications.
@@ -423,12 +427,24 @@ void processImage(image::Image<image::RGBAfColor>& image, const ProcessingParams | |||
} | |||
} | |||
|
|||
if (pParams.scaleFactor != 1.0f) | |||
if ((pParams.scaleFactor != 1.0f) || (pParams.maxWidth != 0) || (pParams.maxHeight != 0)) |
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.
I would prefer to compute a scaleFactor based on pParams.scaleFactor, pParams.maxWidth, pParams.maxHeight.
And keep this if to check if this new scaleFactor is not 1.
As currently, if pParams.scaleFactor is one and maxWidth/Height are not 0 but a large value, it could introduce image duplications.
{ | ||
nw = (unsigned int)(floor(float(nw) * (float(pParams.maxHeight) / float(nh)))); | ||
nh = pParams.maxHeight; | ||
} |
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.
nw and nh could be equal to width/height..
90a1f5b
to
a328d78
Compare
…e adjustment. Add relying options in imageProcessing
…ctor, params.maxWidth and params.maxHeight.
a328d78
to
38ff06e
Compare
@@ -1089,7 +1089,7 @@ int aliceVision_main(int argc, char * argv[]) | |||
|
|||
if (pParams.exposureAdjust != 0.0) | |||
{ | |||
exposureAdjustment *= std::powf(static_cast<float>(2.0), pParams.exposureAdjust); |
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.
It looks like a missing include to , isn't it?
Description
Add option for setting maximum width and height in imageProcessing.
Use libRaw settings for automatic and manual exposure adjustment when reading raw images. Add relying options in imageProcessing.