In this peper. the relationship of the texture structure and Gabor filter is studied at first.then it is given out that using Shannon wavelet packets with compact support in frequency domain to detect the texture main frequency.Next. the method of designing wavelet packets decomposition adaptive Gabor function to segment texture algorithm is given out. This algorithm firstly Applies the texture main frequency detected by Shannon wavelet decomposition to design Gabor filter and then uses Gabor filter to convolute with the original texture image. The algorithm can produce very good step edge at the joining place of two textures joining. The experiment results show that the algorithm is very efficient and robust to noise.