[resending with the image on Dropbox so my mail doesn't get trapped in 
moderation]

OK, I've managed to improve things significantly by installing the latest version of dcraw brefore running calibrate.py. I still get a slight overcorrection of the vignette at 8mm which I think is due to the deep black corners from the heavy lens distortion:

https://www.dropbox.com/home/Public?preview=IMG_0319.jpg

Otherwise the calibration looks good (attached).  Worth a pull request?

Regards,

Rob

On 06/10/15 16:14, Robert William Hutton wrote:
Hi All,

I've been working on a calibration for my new Canon G7 X following the method 
here:

http://wilson.bronger.org/lens_calibration_tutorial/

For the vignette correction, I used a high-quality optical milk-glass diffuser 
to take the shots.
I've managed to get decent results for the distortion and tca, but the 
vignetting is not coming out
how I expected; it seems to be over-correcting (xml attached).

I'm trying to validate the resulting calibration by doing this:

* Open the same RAW files as were used to create the vignette calibration in 
darktable
* Apply lens correction
* Use the color picker to check the brightness of pixels in the corners vs 
those in the centre

For one example image from the set, before correction, (R,G,B):

centre: (218, 210, 204)
corner: (199, 196, 189)

after correction (only vignetting):

centre: (218, 210, 204)
corner: (255,255,255)

after correction (all corrections):

centre: (218, 210, 204)
corner: (240, 238, 234)

I then compared those values to the out-of-camera JPG (to compare to the 
in-camera correction) using
GIMP:

centre: (227, 220, 212)
corner: (215, 212, 205)

Is it just me or is lensfun/darktable over-correcting the vignette?  Any 
suggestions on how to fix
this?

Thanks,

Rob


------------------------------------------------------------------------------



_______________________________________________
Lensfun-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lensfun-users


<lensdatabase>

    <lens>
        <maker>Canon</maker>
        <model>Canon PowerShot G7 X &amp; compatibles (Standard)</model>
        <mount>canonG7X</mount>
        <cropfactor>2.709</cropfactor>
        <calibration>
            <distortion model="ptlens" focal="8.8" a="0.03542" b="-0.15684" c="0.05272" />
            <distortion model="ptlens" focal="12.363" a="0.01144" b="-0.06208" c="0.01844" />
            <distortion model="ptlens" focal="16.792" a="0.00282" b="-0.02201" c="0.00799" />
            <distortion model="ptlens" focal="23.713" a="-0.00014" b="-0.0029" c="0.00441" />
            <distortion model="ptlens" focal="36.8" a="-0.00282" b="0.0124" c="0.00016" />
            <tca model="poly3" focal="8.8" br="-0.0002097" vr="1.0006839" bb="0.0002932" vb="0.9997403" />
            <tca model="poly3" focal="8.8" br="-0.0004231" vr="1.0012148" bb="0.0003530" vb="0.9995881" />
            <tca model="poly3" focal="8.8" br="-0.0004908" vr="1.0014828" bb="0.0004013" vb="0.9994723" />
            <tca model="poly3" focal="8.8" br="-0.0005042" vr="1.0016450" bb="0.0004623" vb="0.9993256" />
            <tca model="poly3" focal="8.8" br="-0.0005064" vr="1.0016583" bb="0.0004743" vb="0.9993041" />
            <tca model="poly3" focal="8.8" br="-0.0005125" vr="1.0016395" bb="0.0004364" vb="0.9993687" />
            <tca model="poly3" focal="8.8" br="-0.0005162" vr="1.0016034" bb="0.0004383" vb="0.9993909" />
            <tca model="poly3" focal="11.5" br="-0.0002385" vr="1.0007474" bb="0.0001552" vb="0.9997952" />
            <tca model="poly3" focal="11.5" br="-0.0002476" vr="1.0009576" bb="0.0001447" vb="0.9997642" />
            <tca model="poly3" focal="11.5" br="-0.0002578" vr="1.0010872" bb="0.0001971" vb="0.9996722" />
            <tca model="poly3" focal="11.5" br="-0.0002728" vr="1.0011909" bb="0.0002069" vb="0.9996313" />
            <tca model="poly3" focal="11.5" br="-0.0002782" vr="1.0012276" bb="0.0002520" vb="0.9995530" />
            <tca model="poly3" focal="11.5" br="-0.0002795" vr="1.0012473" bb="0.0002622" vb="0.9995272" />
            <tca model="poly3" focal="14.2" br="-0.0001331" vr="1.0005590" bb="0.0000379" vb="0.9999196" />
            <tca model="poly3" focal="14.2" br="-0.0001352" vr="1.0007223" bb="0.0000523" vb="0.9998992" />
            <tca model="poly3" focal="14.2" br="-0.0001588" vr="1.0008252" bb="0.0001122" vb="0.9998027" />
            <tca model="poly3" focal="14.2" br="-0.0001672" vr="1.0008941" bb="0.0001652" vb="0.9997045" />
            <tca model="poly3" focal="14.2" br="-0.0001723" vr="1.0009056" bb="0.0001694" vb="0.9996976" />
            <tca model="poly3" focal="14.2" br="-0.0001892" vr="1.0009077" bb="0.0001394" vb="0.9997441" />
            <tca model="poly3" focal="18.4" br="-0.0000829" vr="1.0003018" bb="0.0000002" vb="1.0000095" />
            <tca model="poly3" focal="18.4" br="-0.0000995" vr="1.0003878" bb="0.0000276" vb="0.9999927" />
            <tca model="poly3" focal="18.4" br="-0.0001072" vr="1.0004972" bb="0.0000772" vb="0.9998828" />
            <tca model="poly3" focal="18.4" br="-0.0001077" vr="1.0004530" bb="0.0000610" vb="0.9999249" />
            <tca model="poly3" focal="18.4" br="-0.0001103" vr="1.0005216" bb="0.0000991" vb="0.9998512" />
            <tca model="poly3" focal="18.4" br="-0.0001165" vr="1.0005244" bb="0.0000969" vb="0.9998531" />
            <tca model="poly3" focal="25.2" br="-0.0000567" vr="1.0000445" bb="0.0000112" vb="0.9999903" />
            <tca model="poly3" focal="25.2" br="-0.0000583" vr="1.0000944" bb="0.0000284" vb="0.9999870" />
            <tca model="poly3" focal="25.2" br="-0.0000605" vr="1.0001524" bb="0.0000523" vb="0.9999094" />
            <tca model="poly3" focal="25.2" br="-0.0000606" vr="1.0001495" bb="0.0000512" vb="0.9999122" />
            <tca model="poly3" focal="25.2" br="-0.0000678" vr="1.0001331" bb="0.0000333" vb="0.9999687" />
            <tca model="poly3" focal="25.2" br="-0.0000723" vr="1.0001514" bb="0.0000434" vb="0.9999304" />
            <tca model="poly3" focal="36.8" br="-0.0000413" vr="0.9998545" bb="0.0000133" vb="0.9999335" />
            <tca model="poly3" focal="36.8" br="-0.0000441" vr="0.9998633" bb="0.0000278" vb="0.9999000" />
            <tca model="poly3" focal="36.8" br="-0.0000554" vr="0.9998768" bb="0.0000215" vb="0.9999108" />
            <tca model="poly3" focal="36.8" br="-0.0000614" vr="0.9998672" bb="0.0000281" vb="0.9998868" />
            <tca model="poly3" focal="36.8" br="-0.0000631" vr="0.9998836" bb="0.0000158" vb="0.9999238" />
            <vignetting model="pa" focal="8.8" aperture="1.8" distance="10" k1="-0.2452" k2="-0.1950" k3="-0.6229" />
            <vignetting model="pa" focal="8.8" aperture="1.8" distance="1000" k1="-0.2452" k2="-0.1950" k3="-0.6229" />
            <vignetting model="pa" focal="8.8" aperture="2.5" distance="10" k1="0.0107" k2="-0.4100" k3="-0.6635" />
            <vignetting model="pa" focal="8.8" aperture="2.5" distance="1000" k1="0.0107" k2="-0.4100" k3="-0.6635" />
            <vignetting model="pa" focal="8.8" aperture="3.5" distance="10" k1="-0.0465" k2="-0.0657" k3="-0.9564" />
            <vignetting model="pa" focal="8.8" aperture="3.5" distance="1000" k1="-0.0465" k2="-0.0657" k3="-0.9564" />
            <vignetting model="pa" focal="8.8" aperture="5" distance="10" k1="-0.2535" k2="0.8382" k3="-1.6471" />
            <vignetting model="pa" focal="8.8" aperture="5" distance="1000" k1="-0.2535" k2="0.8382" k3="-1.6471" />
            <vignetting model="pa" focal="8.8" aperture="11" distance="10" k1="-0.4612" k2="1.6346" k3="-2.2184" />
            <vignetting model="pa" focal="8.8" aperture="11" distance="1000" k1="-0.4612" k2="1.6346" k3="-2.2184" />
            <vignetting model="pa" focal="12.2" aperture="2.2" distance="10" k1="-0.9212" k2="1.5459" k3="-1.1581" />
            <vignetting model="pa" focal="12.2" aperture="2.2" distance="1000" k1="-0.9212" k2="1.5459" k3="-1.1581" />
            <vignetting model="pa" focal="12.2" aperture="3.2" distance="10" k1="-0.0710" k2="-0.0524" k3="-0.2564" />
            <vignetting model="pa" focal="12.2" aperture="3.2" distance="1000" k1="-0.0710" k2="-0.0524" k3="-0.2564" />
            <vignetting model="pa" focal="12.2" aperture="4.5" distance="10" k1="-0.3120" k2="0.6248" k3="-0.6538" />
            <vignetting model="pa" focal="12.2" aperture="4.5" distance="1000" k1="-0.3120" k2="0.6248" k3="-0.6538" />
            <vignetting model="pa" focal="12.2" aperture="6.3" distance="10" k1="-0.3072" k2="0.5259" k3="-0.4686" />
            <vignetting model="pa" focal="12.2" aperture="6.3" distance="1000" k1="-0.3072" k2="0.5259" k3="-0.4686" />
            <vignetting model="pa" focal="12.2" aperture="9" distance="10" k1="-0.2372" k2="0.2445" k3="-0.2038" />
            <vignetting model="pa" focal="12.2" aperture="9" distance="1000" k1="-0.2372" k2="0.2445" k3="-0.2038" />
            <vignetting model="pa" focal="12.2" aperture="11" distance="10" k1="-0.2194" k2="0.1684" k3="-0.1322" />
            <vignetting model="pa" focal="12.2" aperture="11" distance="1000" k1="-0.2194" k2="0.1684" k3="-0.1322" />
            <vignetting model="pa" focal="16.8" aperture="2.5" distance="10" k1="-0.5449" k2="0.5360" k3="-0.3346" />
            <vignetting model="pa" focal="16.8" aperture="2.5" distance="1000" k1="-0.5449" k2="0.5360" k3="-0.3346" />
            <vignetting model="pa" focal="16.8" aperture="3.5" distance="10" k1="-0.0721" k2="-0.0936" k3="-0.1176" />
            <vignetting model="pa" focal="16.8" aperture="3.5" distance="1000" k1="-0.0721" k2="-0.0936" k3="-0.1176" />
            <vignetting model="pa" focal="16.8" aperture="5" distance="10" k1="-0.2595" k2="0.5352" k3="-0.4815" />
            <vignetting model="pa" focal="16.8" aperture="5" distance="1000" k1="-0.2595" k2="0.5352" k3="-0.4815" />
            <vignetting model="pa" focal="16.8" aperture="7.1" distance="10" k1="-0.2022" k2="0.2747" k3="-0.1992" />
            <vignetting model="pa" focal="16.8" aperture="7.1" distance="1000" k1="-0.2022" k2="0.2747" k3="-0.1992" />
            <vignetting model="pa" focal="16.8" aperture="10" distance="10" k1="-0.1785" k2="0.1802" k3="-0.1108" />
            <vignetting model="pa" focal="16.8" aperture="10" distance="1000" k1="-0.1785" k2="0.1802" k3="-0.1108" />
            <vignetting model="pa" focal="16.8" aperture="11" distance="10" k1="-0.1862" k2="0.1969" k3="-0.1208" />
            <vignetting model="pa" focal="16.8" aperture="11" distance="1000" k1="-0.1862" k2="0.1969" k3="-0.1208" />
            <vignetting model="pa" focal="23.4" aperture="2.8" distance="10" k1="-0.3041" k2="0.8978" k3="-0.8439" />
            <vignetting model="pa" focal="23.4" aperture="2.8" distance="1000" k1="-0.3041" k2="0.8978" k3="-0.8439" />
            <vignetting model="pa" focal="23.4" aperture="4" distance="10" k1="-0.1613" k2="0.2875" k3="-0.3005" />
            <vignetting model="pa" focal="23.4" aperture="4" distance="1000" k1="-0.1613" k2="0.2875" k3="-0.3005" />
            <vignetting model="pa" focal="23.4" aperture="5.6" distance="10" k1="-0.1571" k2="0.2115" k3="-0.1386" />
            <vignetting model="pa" focal="23.4" aperture="5.6" distance="1000" k1="-0.1571" k2="0.2115" k3="-0.1386" />
            <vignetting model="pa" focal="23.4" aperture="8" distance="10" k1="-0.1530" k2="0.1877" k3="-0.1103" />
            <vignetting model="pa" focal="23.4" aperture="8" distance="1000" k1="-0.1530" k2="0.1877" k3="-0.1103" />
            <vignetting model="pa" focal="23.4" aperture="11" distance="10" k1="-0.1588" k2="0.2008" k3="-0.1171" />
            <vignetting model="pa" focal="23.4" aperture="11" distance="1000" k1="-0.1588" k2="0.2008" k3="-0.1171" />
            <vignetting model="pa" focal="36.8" aperture="2.8" distance="10" k1="-0.1959" k2="-0.1273" k3="-0.0403" />
            <vignetting model="pa" focal="36.8" aperture="2.8" distance="1000" k1="-0.1959" k2="-0.1273" k3="-0.0403" />
            <vignetting model="pa" focal="36.8" aperture="4" distance="10" k1="-0.1931" k2="0.4597" k3="-0.5080" />
            <vignetting model="pa" focal="36.8" aperture="4" distance="1000" k1="-0.1931" k2="0.4597" k3="-0.5080" />
            <vignetting model="pa" focal="36.8" aperture="5.6" distance="10" k1="-0.2409" k2="0.3250" k3="-0.2438" />
            <vignetting model="pa" focal="36.8" aperture="5.6" distance="1000" k1="-0.2409" k2="0.3250" k3="-0.2438" />
            <vignetting model="pa" focal="36.8" aperture="8" distance="10" k1="-0.1850" k2="0.1021" k3="-0.0347" />
            <vignetting model="pa" focal="36.8" aperture="8" distance="1000" k1="-0.1850" k2="0.1021" k3="-0.0347" />
            <vignetting model="pa" focal="36.8" aperture="11" distance="10" k1="-0.1883" k2="0.1063" k3="-0.0342" />
            <vignetting model="pa" focal="36.8" aperture="11" distance="1000" k1="-0.1883" k2="0.1063" k3="-0.0342" />
        </calibration>
    </lens>

</lensdatabase>

------------------------------------------------------------------------------
_______________________________________________
Lensfun-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lensfun-users

Reply via email to