A New Discrete Wavelet Transform Algorithm Based on Frame Theory and Its Application to Brain MRI Segmentation