Stack filters are a class of nonlinear digital filters based on Positive Boolean functions (PBFs), which have threshold decomposition and stacking property. Existing algorithms of optimizing stack filters are genetic algorithm, simulated annealing, neural network and so on, but computation is complex and convergence speed is slow. Aiming at this question, we presented a new optimization algorithm-Tabu search (TS) for stack filters design based on MAE and MSE error criterion respectively. This algorithm can search for the best result in the whole region, whose convergence speed is rapid and optimization time is short. According to the PBFs characteristic, we select the suitable parameters and construct stack filters optimization models. Experimental results have shown that stack filters optimized by TS algorithm have better performances, which can suppress noise and preserve the details of images effectively.