Menu

#370 ufraw/ufraw--batch ignore <Distortion Index='None'> tag

open
5
2014-12-15
2014-03-03
Volker
No

Steps to reproduce:

  • Open a RAW file with UFRaw 0.19.2.

  • Deactivate Lensfun lens distortion correction using Lens correction/Lens distortion/Model: None.

  • Save a .ufraw file using Save/Create ID File/Only then Save.
    Section of the file reads:

    <Distortion Index='None'>
      <Model Label='PanoTools lens model'>
        <a>0.010714</a>
        <b>-0.021681</b>
        <c>0.004485</c>
      </Model>
    </Distortion>
    

so distortion correction should be deactivated.

  • Reopen the .ufraw file with UFRaw.

Result: Model is on "PanoTools Lens Model" again, correction (re)enabled for ufraw and ufraw-batch.

Discussion: This is an undesired behaviour since it adds some softness and potential black borders around the image.

Discussion

  • Volker

    Volker - 2014-03-05

    Addendum:

    Precisely put, UFRaw only automatically (and errationally) looks up lens correction data,

    • if the lens is known in the database,
    • the "Lens correction/Lens" editbox is populated
    • if you set "Lens correction/Lens distortion/Model" to "None",
    • save the .ufraw recipe
    • and reopen it with UFRaw.

    An exemplary .ufraw recipe section looks like this:

        <LensfunAuto>no</LensfunAuto>
        <Lensfun>
          <LensModel>Nikon, Nikkor 105mm f/2.8D AF</LensModel>
          <Distortion Index='None'>
            <Model Label='PanoTools lens model'>
              <a>0.000000</a>
              <b>0.001420</b>
              <c>0.000000</c>
            </Model>
          </Distortion>
          <LensGeometry>Rectilinear</LensGeometry>
        </Lensfun>
    

    , so you would expect "Lens correction/Lens distortion/Model" being "None" after reopening. In fact, it is "PanoTools lens model".

    Here comes the fun part: If you manually remove the

    <LensModel></LensModel>
    

    entry from the .ufraw file, UFRaw opens it correctly with "Lens correction/Lens distortion/Model"="None"! In that case, it doesn't matter if

    <LensfunAuto>no</LensfunAuto>
    

    or

    <LensfunAuto>yes</LensfunAuto>
    

    is present in either .ufraw or .ufrawrc. Long story short:

    <LensModel>
    

    somehow takes priority over

    <Distortion>
    

    which it shouldn't. On a sidenote: ufraw-batch behaves the same.

     
  • Jonathan Berry

    Jonathan Berry - 2014-12-15

    I had the same problem with UFRaw 0.20 on Fedora 20. I was trying to disable Chromatic Aberration correction (TCA) while keeping the distortion correction to be able to batch-process several images. I was able to get it to work by keeping the following in the .ufraw file:

      <LensfunAuto>no</LensfunAuto>
      <Lensfun>
        <Distortion Index='PanoTools lens model'>
          <Model Label='PanoTools lens model'>
            <a>0.003926</a>
            <b>-0.013819</b>
            <c>0.000000</c>
          </Model>
        </Distortion>
        <LensGeometry>Rectilinear</LensGeometry>
      </Lensfun>
    

    On a side note, I was only disabling CA correction because it was causing red and blue spots to show up in the photos. Never seen that behavior before.

     

    Last edit: Jonathan Berry 2014-12-15

Log in to post a comment.

MongoDB Logo MongoDB