The invention discloses a method for calculating the theoretical center of a solder joint of a BGA image. The method includes the following steps: Step 1. Obtain a BGA image, and obtain a target point set corresponding to an actual solder joint by performing solder joint analysis on the BGA image; 2. Using the improved mesh template generation method, establish a mathematical model of the physical distribution of the solder joint array on the BGA chip, and obtain a template point set; Step 3, establish an affine model according to the geometric relationship, and establish template points through the affine model. Set to the mapping of the image point set, and calculate the matching relationship between the point sets according to the mapping; Step 4, carry out the point set registration according to the matching point pair obtained in step 3, so that the distance function between the theoretical center and the actual center Minimize, output the theoretical center. The present invention pairs BGA chip images by means of overall mapping, and has the advantages of good positioning effect and accurate results.