On Thu, 28 Apr 2022 at 15:57, Jeff Welty wrote:
> On Thursday, April 28, 2022 at 2:33:53 AM UTC-7 Bruno Postle wrote:
>>
>> Lensfun and panorama tools have a slightly different lens model, so it
>> isn't always possible to transfer parameters (I'm not sure if there is
>> a converter, it wouldn't be difficult to write one if it doesn't
>> exist).
>>
> I thought the "ptlens" distortion model in lensfun was identical to hugin's 
> model.  The lensfun tutorials show the a,b,c parameters from hugin's 
> optimization being directly used in lensfun data.  The equations documented 
> sure looks the same, but you have far, far more experience at it so I will 
> look harder at it.  FWIW here's the web page I referenced documenting the 
> lensfun "ptlens" model:

I may be wrong, it has been a while. The panotools/Hugin lens model
does have a couple of flaws: the a & c parameters have an odd number
power, whereas usually only even number powers are used for lens
models (which is why we generally recommend starting with just the b
parameter); the angle of view parameter is locked to the width of the
image, but the lens correction parameters are scaled to the narrowest
dimension of the image (which is the height for landscape shots and
the width for portrait shots), the result is that you can't reuse the
same parameters for landscape/portrait images. These have never been
fixed because it would break existing PTO projects and they don't
cause any problems in practice.

>> The idea of optimising a merged project to get more accurate lens
>> parameters should work. There is a tool called ptomerge in the
>> Panorama::Script perl module for merging projects, I'm not sure if it
>> merges lenses, but if it doesn't you can reassign the lens in Hugin.
>>
> Oooh, thanks for that.  I'm perl fluent so that's a nice place to start.
> After a little more research, I read where image stabilization could be a 
> cause for the "d,e" parameters to legitimately be different for each image.   
> So I may need to link only the a,b,c parameters and allow d&e to be optimized 
> for each indvidual image.

To the optimiser, the d & e parameters resemble the TrX and TrY
parameters at the small scale, so sometimes you can get strange
results mixing them.

-- 
Bruno

-- 
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 hugin-ptx+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/CAJV99ZhNGXN29Owov%2B9TSV-sPDn%2BMH3B1k2cYE1X%2BFGQPtGoug%40mail.gmail.com.

Reply via email to