Use a general way to calibrate the phone camera. The phone is Samsung S8, I took 13 pictures as test images.The pictures cannot be taken in strong light.The resoluion is 640x480.
The size of the chessboar is A4 standard. The size of each block is 27mm*27mm.
Compile and Run:
$ cmake .
$ make
$ ./camera