Reasonable clustering prototype is the premise of correct clustering. Most of the existing clustering algorithms have some shortcomings such as the unreasonable selection of clustering prototypes and calculation deviation of cluster numbers. A clustering algorithm based on filter model (CA-FM) is proposed. The algorithm uses the proposed filtering model to remove the boundary and noise objects which interfere with the clustering process. The adjacency matrix is generated according to the neighbor relationships among the core objects, and the number of clusters is calculated by traversing the matrix. Then, the objects are sorted according to the density factor, and clustering prototypes are selected from them. Finally, the remaining objects are assigned into corresponding clusters according to the minimum distance from the high density objects. The effectiveness of the proposed algorithm is demonstrated by experiments on synthetic datasets, UCI datasets and Olivetti face dataset. Compared with similar algorithms, the CA-FM has a higher clustering accuracy.