As required CD (critical dimension) measuring accuracy is tighter, it is necessary to enhance the repeatability of CD-SEM on photo-mask, by optimizing charge up, scan speed, beam size, acceleration, current and temperature control. CD-SEM shows sparkle noise which degrades the image of CD-SEM. And defocus is also getting the source of worse gauge R&R. We evaluated the effect of defocus and noise on CD repeatability by extracting CD from gradient value of image after anisotropic nonlinear diffusion filtering on SEM image. As SEM image is measured after averaging the intensity of image on range of interest (ROI) to remove scan noise, anisotropic nonlinear diffusion (AND) which has different diffusivity according to direction, is efficient tool to get smooth pattern without averaging. This smoothing technique is effective in measuring isolated pattern on mask which is difficult to measure around corner. Some simple CD measuring algorithms are available to get better CD repeatability. Using the maximum intensity and gradient of image, we were able to measure CD on various shaped patterns with enhanced repeatability.