Hi.

On Mon, Jul 4, 2016 at 7:31 PM, Jonathan Niehof <jtnie...@gmail.com> wrote:
> 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.
Make sure that camera name in lensfun and in exiv and in dt's cameras.xml
match precisely.
I do not know what exif says, but cameras.xml says it should be:
Fujifilm XF1

>
> 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
Custom base/tone-curve are overrated, and we do not have any means
to verify their validity, so we do not really merge those any more.

> and color matrices and such

> (probably try for the zero/dead pixel correction in DT, extending the
> hot pixel module.)
No, hot pixel module does not need any per-camera calibration.

That camera should be basically supported, except:
1. no raw sample on rawsamples.ch
2. no wb presets
3. no noise profile

Custom color matrix is overrated too, we do not really merge those.

(https://www.darktable.org/resources/camera-support/)

Roman.
> ------------------------------------------------------------------------------
> 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-us...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lensfun-users
>
___________________________________________________________________________
darktable developer mailing list
to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org

Reply via email to