Inclusions, shrinkage pores and gas pores are the major processing defects of pressure die cast AZ91 magnesium alloy. These inhomogeneities influence the mechanical properties of the material. Hence, quantitative characterization of size and arrangement of inclusions, shrinkage and gas microporosity is expected to be useful to understand the processing-property-microstructure correlation. In the present work an image analysis procedure has been explained to separately quantify the above inhomogeneities. The important parameters of image processing like montage creation, magnification selection and shrinkage pore separation are explained. The inclusions, shrinkage and gas micropores were separated by the above procedure and size, nearest neighbor distance distributions of these inhomogeneities were obtained in order to characterize the material.