The method of minimal square circularity and its application in log centering