Torsten Bronger wrote: > Have you tested which degree you need?
No. I have been trying to see what is needed without experimenting by modifying lensfun code, but I failed. My idea was to use the Fx special effects of ImageMagick to experiment with various correction formulas. But I have not been able to reproduce with ImageMagick the effect of using lensfun profiles in darktable. Pablo D'Angelo vignetting model uses the formula M = 1+k_1 r^2+k_2 r^4+k_3 r^6 where r is the distance from the center of the image, normalised such that the corners are at distance 1 (this is explicit in mod-color.cpp, the distance 1 is the "half-diagonal length"). The page http://lensfun.sourceforge.net/manual/group__Lens.html#ga3fd9e8dbe500297bdda2d6458745b481 says that the correction is obtained by multiplying by M, but Pablo D'Angelo papers say that is it done by dividing by M, and the fact that existing lens profiles include negative values for the k_i suggest that lensfun corrects vignetting by dividing by M (which will be less than 1). I thought that I understood how it works, and that the ImageMagick command below will do the same correction as the lens profile below. <vignetting model="pa" focal="250" aperture="4" distance="1000" k1="0.0" k2="-0.156" k3="-0.711" /> convert IMGP4694.tiff -fx "Xi=i-w/2; Yj=j-h/2; r=hypot(Xi,Yj)/hypot(w/2,h/2); s/(1-0.156*r^4-0.711*r^6)" IMGP4694-corrected.tiff But it is not the case. > Eventually, I'd like to have flat-field images in Lensfun. See > <https://en.wikipedia.org/wiki/Flat-field_correction>. Proposals in > this direction are very much welcomed. I guess that instead of having a (parametric) formula to correct brightness depending only on the distance to the center, the correction profile could be a low-resolution image that lensfun would scale up to the picture size and use to . Louis PS: There is another addition to lensfun that would be useful for the owners of Pentax bodies: taking into account the position of the optical center. Because the sensor may not be centered (due to shake reduction, or composition adjustment) and therefore the vignetting intensity is not the same in every corner. ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/xeonphi _______________________________________________ Lensfun-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lensfun-users
