79190310

Date: 2024-11-14 20:25:30
Score: 0.5
Natty:
Report link

For quick success, just use: https://pypi.org/project/defisheye/ (or if you prefer: https://github.com/duducosmos/defisheye)

pip install defisheye

defisheye --images_folder example/images --save_dir example/Defisheye

or (taken from link):

from defisheye import Defisheye

dtype = 'linear'
format = 'fullframe'
fov = 180
pfov = 120

img = "./images/example3.jpg"
img_out = f"./images/out/example3_{dtype}_{format}_{pfov}_{fov}.jpg"

obj = Defisheye(img, dtype=dtype, format=format, fov=fov, pfov=pfov)

# To save image locally 
obj.convert(outfile=img_out)

# To use the converted image in memory

new_image = obj.convert()

Check link for more details on how to use.

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Greg7000