This article introduces a best basis search algorithm in a nonstationary (NS) wavelet packets dictionary. It computes an optimized labeled quad-tree that indexes the filters used for the NS wavelet packets decomposition. This algorithm extends the classical best basis search by exploring in a hierarchical manner the set of NS wavelet packets coefficients. The scale-by-scale variation of the filters adapts the transform to the frequency content of complex textures. The resulting denoising method is made translation invariant by cycle spinning. Numerical results show that NS wavelet packets give better results than wavelet packets and waveatoms for the denoising of natural images, in particular in textured areas. Moreover, the cycle spinning method increases significantly the denoising abilities of our algorithm1 .