How to calibrate the camera.
The standard camera model used in OpenCV and ROS is referred to as the Pinhole model. You can read more about it here:
Kalibr is toolbox for multiple camera and sensor calibration.
Use the functions mentioned in the above link after installing and importing the OpenCV package.
Use the camera_calibration ROS package:
Use the MATLAB app for camera calibration: