For local smooth regions in multifocus images, it is difficult to judge whether they are in focus or not, whether using human eyes or special focus measures. We propose to classify the images into smooth and nonsmooth regions based on structural similarity index. Quaternion wavelet transform (QWT), as a novel tool of image analysis, has some superior properties compared to discrete wavelet transform, such as nearly shift-invariant wavelet coefficients and phase-based texture representation. We use the local variance of the QWT phases to detect the focus position for the pixels belonging to the nonsmooth image regions. Thus, binary images of the left-focus, right-focus, and smooth region, e.g., there are two different focuses, are obtained. Then, the connected components labeling algorithm is exploited to label the two binary images containing the focus position information, and the regions with focus measure errors are transferred between the two binary images. The fusion result is finally acquired through three weighted binary images combined with the original multifocus images. Furthermore, we conduct several experiments to verify the feasibility of the proposed fusion method. The performance is demonstrated to be superior to current methods.