As pattern size is shrinking, required mask specification is tighter and defect on mask is easily transferred to wafer. It is difficult to distinguish a defect what it is and where it is from, even though high NA optic lens is used. According to small pattern size and attenuated PSM material of ArF area, image quality of FIB (focused ion beam microscopy) to repair defect is getting worse. But, recently, SEM (Secondary Electron Microscopy) review tool is used to overcome the limited resolution of optic microscope such as review mode of inspection tool. To use this higher image quality of SEM compared to FIB process, we introduce image processing and replacement to enhance the accuracy of FIB repair on mask pattern. As the image of ion beam generally shows speckle noise, we adopted AND (anisotropic nonlinear diffusion) technology to remove noise without loss of pattern, by different diffusion along pattern edge. Using this AND technique, we enhanced the image quality of FIB and SEM, and productivity of FIB.