The orientation of the acetabular cup in hip joint anteroposterior radiograph is a key factor in evaluating the postoperative outcomes of total hip arthroplasty (THA). Currently, measurement of the acetabular cup anteversion angle primarily relies on manual drawing of auxiliary lines by orthopedic surgeons and calculations using scientific calculators. This study proposes an automated computer-aided measurement method for the acetabular cup anteversion angle based on hip joint anteroposterior radiograph. The proposed method segments hip prosthesis images using an improved Otsu algorithm, identifies feature points at the acetabular cup opening by combining circle-fitting theory and the cup’s geometric characteristics, and fits an ellipse to the cup opening to calculate the anteversion angle. A total of 104 hip joint anteroposterior radiographs, including 71 right-sided and 81 left-sided prostheses, were analyzed. Two orthopedic surgeons independently measured the postoperative anteversion angles, and the results were compared with computer-generated measurements for correlation analysis. Spearman and Pearson correlation analyses demonstrated significant correlations between the proposed method and manual measurements for both the right group (r = 0.795, P < 0.01) and the left group (r = 0.859, P < 0.01). This method provides a reliable reference for orthopedic surgeons to assess postoperative prognosis.