Well, first of all, there is no profile yet for HERO 6. It looks like the 4 and 
5 use the same lens, but applying that profile to your example frame 
over-corrects badly, either because the Hero 6 has a different lens, or because 
the video is already partially corrected (is that what "linear mode" does?)

I would just use the "lenscorrection" filter:
https://ffmpeg.org/ffmpeg-filters.html#lenscorrection

It lets you directly supply coefficients. Something like this looked close to 
correct on your frame:

ffmpeg -i 0STHMkD.jpg -vf 'lenscorrection=k2=0.007:k1=-0.18' output.jpg

You can play around with the values depending on how strictly rectilinear you 
want to get, keeping in mind that you lose (and "stretch") the corners of the 
image the more you correct a wide-angle view like that. You could also probably 
apply some downward pre-scaling before the lenscorrection filter to retain more 
edge content; I don't know the best way to do that in ffmpeg offhand, though.

-- 
jys

On Sat, Mar 16, 2019, at 12:17, Ariel Elkin wrote:
> Hello,
> 
> I’d like to use lensfun to do lens correction on footage from a GoPro HERO 6. 
> 
> Here’s a snapshot from the footage:
> https://i.imgur.com/0STHMkD.jpg
> 
> Even though the footage was shot in linear mode, you can still see as a 
> result of the fisheye lens distortion: the window frame on the left 
> appears curved. 
> 
> Given this sample syntax from the ffmpeg documentation:
> ffmpeg -i input.mov -vf lensfun=make=Canon:model="Canon EOS 
> 100D":lens_model="Canon EF-S 18-55mm f/3.5-5.6 IS 
> STM":focal_length=18:aperture=8 -c:v h264 -b:v 8000k output.mov
> 
> I’m not clear what values I should put for make, model, lens_model, 
> focal_length, and aperture. On lensfun lens list I see GoPro and 
> fixed_lens but how exactly should I use that with ffmpeg? 
> 
> Thanks
>https://www.fastmail.com/mail/traffic.lensfun/?u=156841ae 
> Ariel 


_______________________________________________
Lensfun-users mailing list
Lensfun-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lensfun-users

Reply via email to