How Undistort Fisheye Image

Hello I am beginning in undistort image pratice, reading the documentation here I was a little bit lost in what function use. For example: initUndistortRectifyMap, estimateNewCameraMatrixForUndistortRectify, stereoRectify, undistortPoints or undistortImage.

I have this image:

I guess that the function undistortImage fits better, right?

I do not have acess to the camera do use the black and white sheet of paper for calibration. Is possible to undistort with a general code for any image? Similar as photoshop do.

Hello Mica. To unwrap an image, I recommend if you could see this blog post:
Converting dual fisheye images into a spherical (equirectangular) projection (this site is great for introducing to fisheye image manipulation)
It explains how you can unwrap a fisheye image to an equirectangular projection. The distortion will still be present, but you will have an equirectangular picture. I hope this helps!