Dear all,
I have one question which I do not how to solve.

 I want to simulate some realistic distortion in a synthetic way.

 To be more clear, I have one example here. In the "slr-canon.xml"
file of database of LensFun, we can find the following:

    <lens>
        <maker>Canon</maker>
        <model>Canon EF-S 18-55mm f/3.5-5.6</model>
        <mount>Canon EF-S</mount>
        <cropfactor>1.6</cropfactor>
        <calibration>
            <distortion model="ptlens" focal="18" a="0" b="0.003658" 
c="-0.04063" />
            <distortion model="ptlens" focal="21" a="0" b="0.004255" 
c="-0.038513" />
            <distortion model="ptlens" focal="24" a="0" b="-0.000965" 
c="-0.019793" />
            <distortion model="ptlens" focal="27" a="0" b="0.001701" 
c="-0.014516" />
            <distortion model="ptlens" focal="30" a="0" b="0.003199" 
c="-0.012047" />
            <distortion model="ptlens" focal="33" a="0" b="3.4e-05" 
c="-0.005236" />
            <distortion model="ptlens" focal="37" a="0" b="0.00556" 
c="-0.016032" />
            <distortion model="ptlens" focal="41" a="0" b="0.001585" 
c="-0.007594" />
            <distortion model="ptlens" focal="45" a="0" b="0.00577" 
c="-0.015688" />
            <distortion model="ptlens" focal="48" a="0" b="0.001543" 
c="-0.003821" />
            <distortion model="ptlens" focal="53" a="0" b="-0.001301" 
c="0.001515" />
            <distortion model="ptlens" focal="55" a="0" b="0.000426" 
c="-0.001817" />
        </calibration>
    </lens>

 From the website
http://lensfun.berlios.de/calibration-tutorial/lens-distortion.html,
we know that The model of "ptlens" has the formula as:

 Ru = a * Rd^4 + b * Rd^3 + c * Rd^2 + (1 - a - b - c) * Rd.

 Given the value of a, b and c, we can compute the value of Ru for
each Rd. And my question is what is Rd ? Is it the
sqrt((xd-xc)^2+(yd-yc)^2), where (xd, yd) is the coordinate of one
certain observed distorted pixel in the image ?

 And what is the value for (xc, yc) ? Is it the center of image ?

 In that case, if I have one 1000x1000 pixels image, (xc, yc) = (500,
500) ?

 And xd and yd go from 0 to 1000, respectively ?

thank you very much, 
zhongwei

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Lensfun-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lensfun-users

Reply via email to