In short, the attached snippet contains full (distortion + TCA +
vignetting) lens information for the Canon Powershot SD1100 IS/IXUS
80.

Caveats: the distortion information is from the existing IXUS 80
information in the database. I added TCA and vignetting data to the
IXUS 80 and copied it to the SD1100. This is the older database format
since I'm still running lensfun 0.2.8 (Ubuntu 15.10) and wanted to
make sure it worked with my current darktable. This camera doesn't
have an adjustable aperture, but an ND8 filter; when the filter is in,
the camera reports the "effective" aperture in the EXIF data, i.e. an
aperture that would give the same brightness. I'm assuming the ND
filter doesn't affect the vignetting or TCA.

The very long:

I shot with CHDK to DNG 1.3 raws. This is supposed to embed the
badpixels.bin data (bad pixels reported from the camera firmware) into
DNG opcodes so it can be removed by the raw converter; however, I
found a lot of obvious dead pixels (e.g. cyan blotches) in the dcraw
converted raws. I pulled the CHDK-generated badpixels.bin and parsed
it into the format that dcraw uses for its -P option. I converted all
vignetting images with no interpolation ("dcraw -v -t 0 -4 -o 0 -M -D
foo.DNG") and checked the pgm for zero-value (totally dead) pixels.
All the vignetting images gave identical results, which I merged with
the badpixels.bin list, and then edited calibrate.py to add the
appropriate -P option to all dcraw calls. Python code for all this is
available.

I made a lenses.txt file with the distortion from the existing IXUS80
in lensfun.xml, but with a changed first line: "Canon PowerShot SD1100
IS: Canon, canonSD100IS, 5.9". I edited line 169 of calibrate.py to
default to "Canon PowerShot SD1100 IS" (matching the exif) instead of
"Standard".

For TCA, I made several attempts with buildings before giving up. I
bought two black-and-white checkered tablecloths on Amazon, 137x274cm,
and hung them up. I set up a tripod about 6-7m away. Because at the
shorter focal lengths the pattern didn't fill the frame, I did five
shots: one with the pattern in each corner (filling as much of the
frame as possible) and one with the camera brought closer (about 4m
for the shortest focal length) so the pattern filled the frame. At
longer focal lengths (filling the frame), I took a couple of exposures
with slight movements of the camera between to get some differences. I
shot at ISO 80 (base), exposure on automatic, auto focus, with a 2sec
timer to avoid vibrations from pressing the shutter button. I shot at
all six. All exposure were without the ND filter (although I didn't
force that.)

I ran calibrate.py against all the images with a one-, two-, and
three-parameter fits. For each focal length, I parsed the .tca file
and plotted distortion vs. radius (r and b) for all images, looking
for reasonable agreement between the images. I took the mean of
parameters for all images at each focal length to plot parameter as a
function of focal length, looking for smooth variation with focal
length. (Code available.) The three-parameter (bcv) fit has poor
agreement between images and noisy variation with focal length. At the
shorter focal lengths, the two-parameter (b and v) was clearly very
good. The images taken closer in were clear outliers and I threw them
out. At longer focal length, neither one- nor two-parameter had
perfect agreemnt, but the two- had better, and in all cases the
deviation from no correction was larger than the difference between
the images. So I used the means of the two-parameter fits.

I shot vignetting images against a white ceiling about 2m from the
camera, mounted on a tripod facing up. A lamp was positioned right
next to the tripod and emitting from just above lens level, to avoid
camera shadow. I sandwiched a sheet of Rosco #216 white diffusion gel
between the lens below and glass above (two pieces, a sort of
"floating picture frame" that I had handy.) Focus distance was set at
maximum: I did not bring an image at infinity to focus. Again 80ISO,
auto exposure, 2sec timer, no ND filter. I shot all focal lengths,
then rotated the camera and gel so that the relationship between
ceiling, camera, and gel were all different (lamp and ceiling remained
in the same orientation) before shooting another set.

Using gnuplot output from calibrate.py, I verifying vignetting images
were generally smooth (and threw out two other sets of vignetting
photos where I tried a different approach to holding the gel, which
had obvious defects.) The two images for each focal length provided
very similar outputs.

For the XML, I copied the IXUS 80 verbatim (both camera and lens),
then changed model tag to match Exif.Image.Model (which is the same as
Exif.Image.UniqueCameraModel), made the lang en a short version, and
named the mount similarly. I populated both the IXUS 80 and the copied
SD1100 lens calibration with the new TCA and vignetting data. The
vignetting already had two lines per focal length (near and far
distances); I added two more lines for smaller aperture, based on the
camera-reported effective aperture with the ND filter in. Note that,
as with the IXUS 80, the crop factor is 6.1 for the camera and 5.9 for
the lens (based perhaps on full area vs. JPEG area?) I haven't managed
to get darktable to automatically recognize even the camera from the
exiv, but it works if I manually select the camera and then the lens.

Next on the agenda is vignetting on the Canon EF-S18-135mm f/3.5-5.6
IS (Rebel T2i), then full cal for the Fujifilm XF-1. Then darktable-y
stuff, if anyone's interested: base curves and color matrices and such
(probably try for the zero/dead pixel correction in DT, extending the
hot pixel module.)
<lensdatabase>

    <camera>
        <maker>Canon</maker>
        <model>Canon DIGITAL IXUS 80 IS</model>
        <model lang="en">IXUS 80 IS</model>
        <mount>canonIxus80IS</mount>
        <cropfactor>6.1</cropfactor>
    </camera>

    <camera>
        <maker>Canon</maker>
        <model>Canon PowerShot SD1100 IS</model>
        <model lang="en">SD1100 IS</model>
        <mount>canonSD100IS</mount>
        <cropfactor>6.1</cropfactor>
    </camera>

    <lens>
        <maker>Canon</maker>
        <model>Canon DIGITAL IXUS 80 IS &amp; compatibles (Standard)</model>
        <model lang="en">fixed lens</model>
        <model lang="de">festes Objektiv</model>
        <mount>canonIxus80IS</mount>
        <cropfactor>5.9</cropfactor>
        <calibration>
            <distortion model="ptlens" focal="6.2" a="-0.032" b="0.125" c="-0.188" />
            <distortion model="ptlens" focal="7.2" a="0.047" b="-0.154" c="0.140" />
            <distortion model="ptlens" focal="8.3" a="-0.340" b="1.135" c="-1.264" />
            <distortion model="ptlens" focal="9.7" a="0.025" b="-0.087" c="0.085" />
            <distortion model="ptlens" focal="11.6" a="0.099" b="-0.302" c="0.288" />
            <distortion model="ptlens" focal="18.6" a="0.054" b="-0.169" c="0.179" />
            <tca model="poly3" focal="6.2" br="0.00011134" vr="0.99992608" bb="-0.00032684" vb="1.00078204" />
            <tca model="poly3" focal="7.2" br="9.438e-05" vr="0.99995248" bb="-0.00024724" vb="1.00060098" />
            <tca model="poly3" focal="8.3" br="6.66666666667e-05" vr="1.0000135" bb="-0.000196133333333" vb="1.00046133333" />
            <tca model="poly3" focal="9.7" br="5.34333333333e-05" vr="1.00004393333" bb="-0.0001843" vb="1.00042996667" />
            <tca model="poly3" focal="11.6" br="4.09333333333e-05" vr="1.00009023333" bb="-0.000115333333333" vb="1.00028556667" />
            <tca model="poly3" focal="14.3" br="-9.9e-06" vr="1.0001817" bb="-7.975e-05" vb="1.00016265" />
            <tca model="poly3" focal="18.6" br="-5.495e-05" vr="1.0003695" bb="4e-06" vb="0.99987525" />
            <vignetting model="pa" focal="6.2" aperture="2.8" distance="10" k1="-0.4093" k2="0.2020" k3="-0.1845" />
            <vignetting model="pa" focal="6.2" aperture="2.8" distance="1000" k1="-0.4093" k2="0.2020" k3="-0.1845" />
            <vignetting model="pa" focal="6.2" aperture="8" distance="10" k1="-0.4093" k2="0.2020" k3="-0.1845" />
            <vignetting model="pa" focal="6.2" aperture="8" distance="1000" k1="-0.4093" k2="0.2020" k3="-0.1845" />
            <vignetting model="pa" focal="7.2" aperture="3" distance="10" k1="-0.3531" k2="0.0549" k3="0.0001" />
            <vignetting model="pa" focal="7.2" aperture="3" distance="1000" k1="-0.3531" k2="0.0549" k3="0.0001" />
            <vignetting model="pa" focal="7.2" aperture="9" distance="10" k1="-0.3531" k2="0.0549" k3="0.0001" />
            <vignetting model="pa" focal="7.2" aperture="9" distance="1000" k1="-0.3531" k2="0.0549" k3="0.0001" />
            <vignetting model="pa" focal="8.3" aperture="3.2" distance="10" k1="-0.3337" k2="0.0889" k3="-0.0116" />
            <vignetting model="pa" focal="8.3" aperture="3.2" distance="1000" k1="-0.3337" k2="0.0889" k3="-0.0116" />
            <vignetting model="pa" focal="8.3" aperture="9" distance="10" k1="-0.3337" k2="0.0889" k3="-0.0116" />
            <vignetting model="pa" focal="8.3" aperture="9" distance="1000" k1="-0.3337" k2="0.0889" k3="-0.0116" />
            <vignetting model="pa" focal="9.7" aperture="3.5" distance="10" k1="-0.2591" k2="0.0305" k3="0.0157" />
            <vignetting model="pa" focal="9.7" aperture="3.5" distance="1000" k1="-0.2591" k2="0.0305" k3="0.0157" />
            <vignetting model="pa" focal="9.7" aperture="10" distance="10" k1="-0.2591" k2="0.0305" k3="0.0157" />
            <vignetting model="pa" focal="9.7" aperture="10" distance="1000" k1="-0.2591" k2="0.0305" k3="0.0157" />
            <vignetting model="pa" focal="11.6" aperture="3.8" distance="10" k1="-0.1900" k2="-0.0124" k3="0.0238" />
            <vignetting model="pa" focal="11.6" aperture="3.8" distance="1000" k1="-0.1900" k2="-0.0124" k3="0.0238" />
            <vignetting model="pa" focal="11.6" aperture="11" distance="10" k1="-0.1900" k2="-0.0124" k3="0.0238" />
            <vignetting model="pa" focal="11.6" aperture="11" distance="1000" k1="-0.1900" k2="-0.0124" k3="0.0238" />
            <vignetting model="pa" focal="14.3" aperture="4.3" distance="10" k1="-0.1665" k2="-0.0175" k3="0.0210" />
            <vignetting model="pa" focal="14.3" aperture="4.3" distance="1000" k1="-0.1665" k2="-0.0175" k3="0.0210" />
            <vignetting model="pa" focal="14.3" aperture="13" distance="10" k1="-0.1665" k2="-0.0175" k3="0.0210" />
            <vignetting model="pa" focal="14.3" aperture="13" distance="1000" k1="-0.1665" k2="-0.0175" k3="0.0210" />
            <vignetting model="pa" focal="18.6" aperture="5" distance="10" k1="-0.1571" k2="-0.0412" k3="0.0360" />
            <vignetting model="pa" focal="18.6" aperture="5" distance="1000" k1="-0.1571" k2="-0.0412" k3="0.0360" />
            <vignetting model="pa" focal="18.6" aperture="14" distance="10" k1="-0.1571" k2="-0.0412" k3="0.0360" />
            <vignetting model="pa" focal="18.6" aperture="14" distance="1000" k1="-0.1571" k2="-0.0412" k3="0.0360" />
        </calibration>
    </lens>

    <lens>
        <maker>Canon</maker>
        <model>Canon PowerShot SD1100 IS (Standard)</model>
        <model lang="en">fixed lens</model>
        <model lang="de">festes Objektiv</model>
        <mount>canonSD100IS</mount>
        <cropfactor>5.9</cropfactor>
        <calibration>
            <distortion model="ptlens" focal="6.2" a="-0.032" b="0.125" c="-0.188" />
            <distortion model="ptlens" focal="7.2" a="0.047" b="-0.154" c="0.140" />
            <distortion model="ptlens" focal="8.3" a="-0.340" b="1.135" c="-1.264" />
            <distortion model="ptlens" focal="9.7" a="0.025" b="-0.087" c="0.085" />
            <distortion model="ptlens" focal="11.6" a="0.099" b="-0.302" c="0.288" />
            <distortion model="ptlens" focal="18.6" a="0.054" b="-0.169" c="0.179" />
            <tca model="poly3" focal="6.2" br="0.00011134" vr="0.99992608" bb="-0.00032684" vb="1.00078204" />
            <tca model="poly3" focal="7.2" br="9.438e-05" vr="0.99995248" bb="-0.00024724" vb="1.00060098" />
            <tca model="poly3" focal="8.3" br="6.66666666667e-05" vr="1.0000135" bb="-0.000196133333333" vb="1.00046133333" />
            <tca model="poly3" focal="9.7" br="5.34333333333e-05" vr="1.00004393333" bb="-0.0001843" vb="1.00042996667" />
            <tca model="poly3" focal="11.6" br="4.09333333333e-05" vr="1.00009023333" bb="-0.000115333333333" vb="1.00028556667" />
            <tca model="poly3" focal="14.3" br="-9.9e-06" vr="1.0001817" bb="-7.975e-05" vb="1.00016265" />
            <tca model="poly3" focal="18.6" br="-5.495e-05" vr="1.0003695" bb="4e-06" vb="0.99987525" />
            <vignetting model="pa" focal="6.2" aperture="2.8" distance="10" k1="-0.4093" k2="0.2020" k3="-0.1845" />
            <vignetting model="pa" focal="6.2" aperture="2.8" distance="1000" k1="-0.4093" k2="0.2020" k3="-0.1845" />
            <vignetting model="pa" focal="6.2" aperture="8" distance="10" k1="-0.4093" k2="0.2020" k3="-0.1845" />
            <vignetting model="pa" focal="6.2" aperture="8" distance="1000" k1="-0.4093" k2="0.2020" k3="-0.1845" />
            <vignetting model="pa" focal="7.2" aperture="3" distance="10" k1="-0.3531" k2="0.0549" k3="0.0001" />
            <vignetting model="pa" focal="7.2" aperture="3" distance="1000" k1="-0.3531" k2="0.0549" k3="0.0001" />
            <vignetting model="pa" focal="7.2" aperture="9" distance="10" k1="-0.3531" k2="0.0549" k3="0.0001" />
            <vignetting model="pa" focal="7.2" aperture="9" distance="1000" k1="-0.3531" k2="0.0549" k3="0.0001" />
            <vignetting model="pa" focal="8.3" aperture="3.2" distance="10" k1="-0.3337" k2="0.0889" k3="-0.0116" />
            <vignetting model="pa" focal="8.3" aperture="3.2" distance="1000" k1="-0.3337" k2="0.0889" k3="-0.0116" />
            <vignetting model="pa" focal="8.3" aperture="9" distance="10" k1="-0.3337" k2="0.0889" k3="-0.0116" />
            <vignetting model="pa" focal="8.3" aperture="9" distance="1000" k1="-0.3337" k2="0.0889" k3="-0.0116" />
            <vignetting model="pa" focal="9.7" aperture="3.5" distance="10" k1="-0.2591" k2="0.0305" k3="0.0157" />
            <vignetting model="pa" focal="9.7" aperture="3.5" distance="1000" k1="-0.2591" k2="0.0305" k3="0.0157" />
            <vignetting model="pa" focal="9.7" aperture="10" distance="10" k1="-0.2591" k2="0.0305" k3="0.0157" />
            <vignetting model="pa" focal="9.7" aperture="10" distance="1000" k1="-0.2591" k2="0.0305" k3="0.0157" />
            <vignetting model="pa" focal="11.6" aperture="3.8" distance="10" k1="-0.1900" k2="-0.0124" k3="0.0238" />
            <vignetting model="pa" focal="11.6" aperture="3.8" distance="1000" k1="-0.1900" k2="-0.0124" k3="0.0238" />
            <vignetting model="pa" focal="11.6" aperture="11" distance="10" k1="-0.1900" k2="-0.0124" k3="0.0238" />
            <vignetting model="pa" focal="11.6" aperture="11" distance="1000" k1="-0.1900" k2="-0.0124" k3="0.0238" />
            <vignetting model="pa" focal="14.3" aperture="4.3" distance="10" k1="-0.1665" k2="-0.0175" k3="0.0210" />
            <vignetting model="pa" focal="14.3" aperture="4.3" distance="1000" k1="-0.1665" k2="-0.0175" k3="0.0210" />
            <vignetting model="pa" focal="14.3" aperture="13" distance="10" k1="-0.1665" k2="-0.0175" k3="0.0210" />
            <vignetting model="pa" focal="14.3" aperture="13" distance="1000" k1="-0.1665" k2="-0.0175" k3="0.0210" />
            <vignetting model="pa" focal="18.6" aperture="5" distance="10" k1="-0.1571" k2="-0.0412" k3="0.0360" />
            <vignetting model="pa" focal="18.6" aperture="5" distance="1000" k1="-0.1571" k2="-0.0412" k3="0.0360" />
            <vignetting model="pa" focal="18.6" aperture="14" distance="10" k1="-0.1571" k2="-0.0412" k3="0.0360" />
            <vignetting model="pa" focal="18.6" aperture="14" distance="1000" k1="-0.1571" k2="-0.0412" k3="0.0360" />
        </calibration>
    </lens>

</lensdatabase>
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Lensfun-users mailing list
Lensfun-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lensfun-users

Reply via email to