Am Montag, 18. November 2013 09:22:30 UTC+1 schrieb Torsten Bronger:
>
> Contrete example of the problem: Sigma produces a given lens for different 
> mounts.  LensFun contains calibration data, which somebody created on their 
> FT camera (Panasonic, Olympus).  So, aspect ratio of the calibration 
> pictures was 4:3.  Now, somebody with a Nikon owns this Sigma lens, too. 
>  Aspect ratio 3:2.  LensFun scales the coordinates by the ratio of the crop 
> factors.  But this only works if the aspect ratios are the same!  If this 
> is not the case, the error in the scaling is sqrt((ar1^2 + 1)/(ar2^2 + 1)). 
>  ar1,2 are the two aspect ratios.
>

There are 2 functions to search for a lens in lensfun database
const lfLens <http://lensfun.berlios.de/manual/structlfLens.html> ** 
FindLenses<http://lensfun.berlios.de/manual/structlfDatabase.html#a2ab4a85b14bdb04d8f294a7c3ed31442>(const
 
lfCamera <http://lensfun.berlios.de/manual/structlfCamera.html> *camera, 
const char *maker, const char *model, int sflags=0) const
const lfLens <http://lensfun.berlios.de/manual/structlfLens.html> ** 
FindLenses<http://lensfun.berlios.de/manual/structlfDatabase.html#add2920ff062a0bded2a667e8ca10f7a4>(const
 
lfLens <http://lensfun.berlios.de/manual/structlfLens.html> *lens, int 
sflags=0) const 
In the documentation to both function it states
<cite>
The algorithm will look for a lens with crop factor not less than of given 
camera, since the mathematical models of the lens can be incorrect for 
sensor sizes larger than the one used for calibration.
</cite>

So the example you have given should not be possible according to the 
lensfun documentation.

If lensfun would do this, it will produce bogus data. When the lens was 
calibrated for a crop factor of say 2, it uses only the central part of the 
optics and the data describe the central part of the lens. 
When using the same lens on a camera with a smaller crop factor, a bigger 
circle is used. You can not derive from the central part calibrated with 
one camera to the outer part used with the other camera.
So it would only be possible from calibration data from smaller crop factor 
cameras to deduce the calibration data for higher crop factor camera. But 
with libpano distortion model this is also not possible the other way 
around, because of the normalization. So you would need to recalculate all 
factors and not only to scale the factors. 

Lensfun should only return values for the lens when calibrated with the 
same crop factor.

<snip>

>
> 3. Introduce a new <aspect-ratio> tag in LensFun.
>

One more point to consider: Even when you stay inside one crop factor, 
there are two possibilities to achieve a different aspect ratio: a) 
cropping height or b) a multi-aspect sensor. This have not been considered 
in the proposal.
 

>
> 4. Convert the a, b, c coefficients for non-3:2 data to be correct for 3:2 
> images.  For polynomial models, this conversion is lossless except for 
> rounding errors.
>

Are you sure? Or does the normalization in case of libpano distortion would 
require some more calculations and introduce more errors? 

Before implementing such backward-incompatible changes and move all 
responsibility to the calling program all aspects should be considered and 
correctly documented.

-- 
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
--- 
You received this message because you are subscribed to the Google Groups 
"hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/9be13e1b-28fc-4585-9a07-45e3e1915a8c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to