The basic principle of star sensor was introduced. The characteristic of the star image were analysed. The methods of the threshold and the rectangle centroid for the star locating of the star image are researched with the characteristic of star image. They are based on the ways of theory and practice. The suitable arithmetic of star locating was confirmed. The star sensor has used this method to do star-locating deteetion and obtain satisfied results.