video - Is there a way to remove GoPro fisheye using ffmpeg -
it seems possible compensate fisheye distortion using ffmpeg lenscorrection filter:
ffmpeg -i in.mp4 -vf "lenscorrection=cx=0.5:cy=0.5:k1=-.25:k2=-.25" out.mp4 what values k1 , k2, particularly gopro? there way compute them?
i don't think there's generic 1 setting(s) cover gopro models & lenses. factor in people can use customised/replacement lenses.
i hoping example image featuring what have work with, never mind...
hope below useful in way
check link gopro hero 3 settings (applies other models). rough idea of best k1 , k2 values, should find nearest aspect ratio image resolution then...
divide h. fov deg v. fov deg , multiply result diag. fov deg.
example: where picture size 1920 x 1080 : makes 16:9 widescreen.
gopro 3 setting: 16 x 9 widescreen ::
h fov= 69.5 ||v fov= 118.2 ||diag= 133.6
so 118.2 / 69.5 * 133.6 = 227.216 etc
for k1 result integer 227 (drop decimal points).
for k2 value 0.022 seems universal (all test images), can try k2=-.022.
for cx , cy keep them : cx=0.5:cy=0.5:.
example:
ffmpeg -i in.mp4 -vf "lenscorrection=cx=0.5:cy=0.5:k1=-0.227:k2=-0.022" out.mp4
result : (original image found via google images of gopro hero-2 video).

Comments
Post a Comment