This library is working specifically for undistorting images that taken from a pinhole camera.
Note: The code is still under testing and debugging.
$cd <directory>
$git clone https://github.com/ZhangAoCanada/Camera-Undistortion
$./calibration_image/
$nano ./config/parameters.txt
Note: change the diretory of the images that are about to be undistorted correctly. Also, please specify the output directory.
$mkdir build
$cd build
$cmake ..
$make && make install
$cd bin
If you are running it first time:
$./CalibrateImages recalibrate
Change the input and output directories as STEP 3, then run
$./CalibrateImages
After first time running it,go to the directory "calibration_para_saved" to find out whether the cameraMatrix and distCoeffs have been written in "libration_para.yml".