We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 94d2f39 commit cce43c6Copy full SHA for cce43c6
1 file changed
lib/image_lens_correction.ex
@@ -177,7 +177,8 @@ defmodule Image.LensCorrection do
177
# Get the radial distance from the centre
178
# which is band 0 of the polar image
179
r = Complex.polar!(index)[0]
180
- r = r / max!(r)
+ max = Image.get_pixel!(r, 0, 0)
181
+ r = r / max
182
183
# Correction function from https://lensfun.github.io/calibration-tutorial/lens-vignetting.html
184
# Also http://download.macromedia.com/pub/labs/lensprofile_creator/lensprofile_creator_cameramodel.pdf
0 commit comments