Template matching is a common method for object recognition and location. But the premise of template matching is the target should not change a lot in shape from the template image. When non-coplanar rotation exits, the traditional template matching method is helpless. By analyzing the artificial target of the curiosity rover, a two-step artificial target location method is proposed. Firstly, least squares ellipse fitting method is used to recognize the artificial target in the image and locate the center of each ellipse preliminary. Secondly, according to the preliminary result of ellipse fitting, the image is graph cut into pieces, and each piece only has one ellipse. Then Hough transform is used to locate the center of the artificial target precisely. Meanwhile, before edge detection, mathematical morphology technology is conducted to remove the influence of the shadow in the image. Otsu algorithm is used to choose the threshold value of canny edge detector adaptively. Experiments are carried out based on artificial target images of curiosity rover, which show that the robustness of the algorithm in non-ideal illumination situation. The location accuracy is within 1 pixel.