Saliency detection is widely used in the fields of computer graphics and multimedia processing. Many computer graphics tasks, such as image segmentation, image labeling, and tracking, rely on the accurate generation of saliency maps. However, most current methods lack the ability to generate a fine boundary between the foreground and background while also providing a high recall rate. The saliency detection algorithm proposed in this paper is based on rectangular-wave spectrum analysis. In this method, we divide a given image into several regions, which are then convoluted using a pre-set rectangular-wave template. We determine the final saliency value by calculating the difference between a region and its adjacent regions, and its uniqueness compared with the entire image. Repeated tests using different data sets produced a high accuracy-recall rate. Moreover, the boundary in our saliency map is clear and fine.