In this paper, a novel algorithm is proposed to accurately calculate Zernike moments in Cartesian Coordinates. We connect the corners of an image pixel with the origin to construct four triangles and then assign the intensity function value of the pixel to these triangles. The Fourier Mellin moment integration of the pixel is converted to a summation of four integrations within domains of these constructed triangles. By using the trigonometric resolution, we derive the analytic: equations of the four integrations of these triangles. Then, the analytic expressions of the Fourier Mellin moments and Zernike moments are obtained. The algorithm eliminates the geometric and discretization errors theoretically. Finally, a set of efficient computational recursive relations is proposed. An experiment is designed to verify the performance of the proposed algorithm.