Abstract-In total knee replacement (TKR) operation, a key factor for successful operation is to locate the center of the femoral head accurately, and to determine the mechanical axis, which goes through the center of femoral head and knee joint. Place an infrared tracker on the distal end of the femur, rotate the bone and then track the movement with the tracker, thus the center of the femoral head can be determined. We use the Hough transform in this study to convert the least square calculation into a dualistic linear regression, therefore the algorithm is optimized and the computing time is reduced. We also use RANdom SAmple Consensus (RANSAC) algorithm for data screening, which has enhanced the method's resistance to interference during the surgery. Combining the two advantages, this method can reach low deviation within 2mm, fast computing time less than 0.5s, despite of interferences.Index Terms-Locating femoral center, infrared locator, hough transform, RANSAC.