Background and Objective: Segmentation of the femur from the hip joint in computed tomography (CT) is an important preliminary step in hip surgery planning and simulation. However, this is a time-consuming and challenging task due to the weak boundary, the varying topology of the hip joint, and the extremely narrow or blurred space between the femoral head and the acetabulum. To address these problems, this study proposed a semi-automatic segmentation framework based on harmonic fields for accurate segmentation. Methods: The proposed method comprises three steps. First, with high-level information provided by the user, shape information provided by neighboring slices as well as the statistical information in the mask, a region selection method is proposed to effectively locate joint space for the harmonic field. Second, incorporated with an improved gradient, the harmonic field is used to adaptively extract a curve as the barrier that separates the femoral head from the acetabulum accurately. Third, a divide and conquer segmentation strategy based on the harmonic barrier is used to combine the femoral head part and body part as the final segmentation result. Results: We have tested 40 hips with considerately narrow or disappeared joint spaces. The experimental results are evaluated based on Jaccard, Dice, directional cut discrepancy (DCD) and receiver operating characteristic (ROC), and we achieve the higher Jaccard of 84.02%, Dice of 85.96%, area under curve (AUC) of 89.3%, and the lower error with DCD of 0.52mm. The effective ratio of our method is 79.1% even for cases with severe malformation. The results show that our method performs best in terms of effectiveness and accuracy on the whole data set. Conclusions: The proposed method is efficient to segment femurs with narrow joint space. The accurate segmentation results can assist the physicians for osteoarthritis diagnosis in future. (C) 2017 Elsevier B.V. All rights reserved.