AUTOMATIC QUANTITATIVE ANALYSIS OF MICROSTRUCTURE OF DUCTILE CAST IRON USING DIGITAL IMAGE PROCESSING

Ductile cast iron is preferred as nodular iron or spheroidal graphite iron. Ductile cast iron contains graphite in form of discrete nodules and matrix of ferrite and perlite. In order to determine the mechanical properties, one needs to determine volume of phases in matrix and nodularity in the microstructure of metal sample. Manual methods available for this, are time consuming and accuracy depends on expertize. The paper proposes a novel method for automatic quantitative analysis of microstructure of Ferritic Pearlitic Ductile Iron which calculates volume of phases and nodularity of that sample. This gives results within a very short time (approximately 5 sec) with 98% accuracy for volume phases of matrices and 90% of accuracy for nodule detection and analysis which are in the range of standard specified for SG 500/7 and validated by metallurgist.


Introduction
The ductile cast iron (also known as nodular cast iron / spheroidal graphitic iron), is produced with graphite in a spheroidal form.The nodularizing elements such as magnesium, cerium, lithium, sodium etc., are added to a molten metal bath of proper chemical composition to produce discrete particles of spheroidal shape graphite.
Quantitative metallography plays very important role in material science and engineering.It can provide quantitative relationships between processes, microstructures and physical as well as mechanical properties and supply the first hand data necessary to establish a reasonable mathematical model for microstructure.In metallographic laboratories, task of analysing ductile iron for graphite nodularity, size form and distribution as well as ferrite pearlite ratio are extremely important from quality control perspective.
The shape and nodule count, (expressed as the number of graphite nodules/mm 2 ), influences the mechanical properties of ductile cast iron.Nodule count is a sensitive parameter in production of ductile cast iron.Nodularity exerts a strong influence on yield and tensile strength of ductile iron.The ASTM A247-67 defines a standard for measurement of volume of graphite, size and shape of nodule and nodularity count with idealized microstructure [1].The ASTM E562-01 proposed a method of systematic manual point counting procedure for statistically estimating the volume fraction of identifiable constituent or phases from section through the microstructure by means of point grid [2].Both the standards are time consuming processes and may result in fault detection in different phases.
Digital image processing is widely used in recognition of objects or structures from images with the help of their properties which can be geometrical.It is widely used for analysing metallographic images.Quantitative analysis of microstructure can be carried out by capturing images through high resolution digital color camera interfaced to camera port of metallographic microscope.The image is imported into PC by a specially designed image acquisition card for preview and storage.These images are then used for image processing operations which result into quantitative analysis of sample.
Different image analysis algorithms are implemented to analyse the microstructure in order to estimate the volume of phases and properties of nodules.In most image analysis operations, pattern classifiers require individual objects to be separated from the background in the image.A. De Santis, O Di Bartolomeo, D Iacoviello [3], proposed a work on quantitative shape evaluation of graphite particles in ductile iron.The microstructure images are segmented by active contour method.Nodule morphology is evaluated on segmented image by measuring area, eccentricity, solidity.Joao P. Papa, Rodrigo Y. M. Nakamura, Victor Hugo [4], proposed a comparative study of Support vector machine, Optimum-pat forest and Bayesian based classifier for automatic characterization of cast iron in metallographic images.Priti Sonsale, B. S. Motgi [5], proposed a method by designing an automated microstructure image analysis system.The microstructural images are segmented by Otsu's threshold segmentation technique.Pattan Prakash, V. D. Mytri [6], used Otsu's optimum segmentation method based on thresholding in order to separate nodules.The method does not work well with variable illumination.Pattan Prakash, V. D. Mytri, P. S. Hiremath [7], proposed an algorithm for classification of graphite grains in cast iron.Active contour method with initialization of multigrid is used for segmentation.Fourier descriptors are used for shape analysis.The analysed shapes are then input to neural network classifier for numerical analysis.The entire process is computationally complex and time consuming.For nodular cast iron, active contour method detects non spherical shapes also as a graphite nodule, which results in increased volume of graphite in analysis results.
Template matching is one way for pattern recognition and analysis in image processing.Templates of different shapes and size are recorded and used for analysis of segmented region.For nodular cast iron, nodules vary in size.Also they are not perfectly circular in shape.Hence template matching is not suitable option for analysis of nodular cast iron.A series of morphological operations for segmentation of microstructures are effectively used [6], but these methods are dependent on selection of appropriate size of structural element.
Thus there is a need to develop an image analysis tool for microstructural analysis of Ductile Iron which gives volume of phases in matrix and analysis of nodules that helps to determine the mechanical properties of that material.The paper proposes a new technique for quantitative analysis of microstructure of metal using digital image processing.Section 2 gives minimum error thresholding for image segmentation.Section 3 explains the circular Hough transform with phase to code radii as proposed by Atherton and Kerbyson [11].Section 4 defines the algorithm for image analysis.Section 5 gives results of the proposed method.
Ferritic Pearlitic Ductile Iron is the most common grade of ductile iron and is normally produced in the "as cast" condition.Ferrite is the purest iron phase in ductile iron.It has low strength and hardness, but high ductility, toughness and good machinability.Pearlite is an intimate mixture of lamellar cementite in a matrix of ferrite.The formation of nodules is achieved by the addition of nodulizing elements, most commonly magnesium.A correct magnesium treatment produces perfect spheroidal nodules.We consider such type of ductile cast iron samples for analysis.The microstructural images are captured for analysis using light microscope at magnification of 100x.

Minimum error thresholding
Generally the microstructure images suffer from defects of improper illumination, noise and artefacts developed at time of specimen preparation.Hence this stage is important to achieve good segmentation classification and quantification.
Thresholding is a popular tool for segmenting gray level image.The basic approach is that object and background pixels in gray image are separated by their gray level values.Otsu [8], proposed a method of automatic threshold selection for picture segmentation.Otsu's method assumes that histogram is bimodal.This method does not work well with variable illumination.
An effective approach is to consider thresholding as a classification problem.If the gray level distribution of object and background pixel are known or can be estimated, then the optimal minimum error threshold can be obtained using the result of statistical decision theory [9].The principle idea behind this method is to optimise the criterion function related to average pixel classification error rate, where, J(T)= criterion function for threshold T P i (T) = priori probability of i th group The criterion function value is calculated for each pixel considering it as classifier between object and background.The criterion function has local minima at boundaries of interval of gray level.That value of gray level provides us with the threshold value for segmentation.Pixels with gray level value above the threshold are set to 1 and pixels with gray level value below threshold are set to 0. This results in binary image.
The method for segmentation provides perfect separation between ferrite and perlite phase in matrix.Also it removes the need of morphological operations for edge linking.

Circle detection for nodule analysis
Ferrite Pearlitic Ductile Iron consists of graphite nodules in spheroidal form.It is necessary to detect the nodules and analyse their properties such as area, roundness, number of nodules per mm and nodularity which are helpful in defining mechanical properties.
One of the major challenges in computer vision is to detect/separate the spheroidal nodules for analysis.Numerous feature extraction techniques are openly available for circle detection.One of the most robust and commonly used methods is Circular Hough transform (CHT).Atherton and Kerbyson [8], introduced the coherent circle Hough transform which uses phase to code radii of circles.
We use the method proposed by Atherton, Kerbyson [11], to detect size invariant circles CHT techniques for detection of circles with complex coding of size in terms of phase can be expressed in terms of convolution mask.The procedure is for the formulation of convolution mask and operation is defined below.
CHT technique for detection of circle with complex coding of size in terms of phase is expressed in terms of convolution operator.It is assumed that convolution operator is of size (2R max +1) by (2R max +1), here R max is radius of largest circle being considered and centre of operator is indexed (0, 0).The convolution operator is complex phase coded annulus (OPCA)

Fig. 1 Phase coded annulus convolution mask
Detection of range of radii of circle by phase to code for radius using phase coding results in complex convolution operator.The real and imaginary parts: where,

c O = convolution mask
A log phase coding is an interesting property used in implementation of phase coding where, r log mn Ø = logarithm phase to code the radius R min = minimum radius of the circle to be detected R max = maximum radius of the circle to be detected m,n = indices for filter The operator is convolved with edge magnitude, where, Q c = Output of convolution ||E||= Edge magnitude image The 1/r factor normalises for circle circumference, thus producing a similar response for circles of different radii.This results in complex accumulator Q c .The phase of this output contains information about size of detected circle, whilst its magnitude can be treated in the same way as the output of accumulator array.

Proposed Analysis Technique:
This section deals with image analysis of microstructure of ductile iron in order to get quantitative information to determine the mechanical properties of ductile iron.Fig. 2 shows flow chart which illustrates control strategy used to detect circular nodules, analysis of nodules and quantitative measurement of volume of phases in matrix.
As microscopic images suffer from noise and artefacts, image enhancement is required in order to get smooth image.Histogram stretching and median filtering operations are performed on microstructure image in order to remove spurious pixels and enhance image for further operations.The image is then segmented with minimum error thresholding.The white pixels in the image indicate the ferritic phase.

Fig. 2 Flow chart of proposed methodology.
Edge detection operation is performed on thresholded image using Sobel mask.The edge detected image is used for circle detection.The accumulator of CHT [11], is represented as a complex number.The phase of this complex number represents the radius of circle.The regional maxima from the accumulator are detected by morphological reconstruction.The centroid of the regional maxima's gives the centre of detected circles.The phase at the centre points are decoded to give the radii of detected circles.The detected circles indicate the nodules in the microstructure image.The detected nodules are further analysed in terms of their centre, radius, area, perimeter and roundness.The detected nodules are also classified according to standard size class of nodules.The volume phases for ferrite, pearlite and graphite are calculated with the help of thresholded image and detected nodules.

Result
We used the microstructure images of Ferritic Pearlitic Ductile Iron.This is SG 500/7 grade cast iron.The standards specify that SG 500/7 contains core matrix containing ferrite and perlite with 10 -50% perlite and graphite in the range of 2 -6%.The metal sampled used for experimentation undergoes several metallurgical processes such as cutting, grinding, polishing and etching.The microstructure of pre-processed sample is observed using AXIOVERT 40MAT microscope.The images of microstructure are captured using BlueFOX IGC camera mounted on microscope.  1 gives the detailed analysis of detected nodules in terms of centre, radius, area, perimeter and roundness of nodules.The radius and area is calculated in terms of no. of pixels.The average of roundness of nodules gives nodularity.The nodules with roundness more than 0.8 are considered as perfect nodules and are used to calculate the nodularity.The nodularity of sample is, Nodularity = 90.6744% The detected nodules are then classified according to standard size class chart.Table 2 shows comparative analysis of three different samples of ductile cast iron for volume of different phases using proposed algorithm, DeXel Imaging Tool and systematic point count method .(Theanalysis is carried out by metallurgist.).This shows that proposed algorithm gives more accurate results than point count method and DeXel.The algorithm gives 98% accuracy for calculation of volume fraction of phases in ductile cast iron.In Table 2, sample 1 and sample 2 are perfectly in SG 500/7 grade.Sample 3 has volume of graphite lower than the standards.Table 3 gives the accuracy of the nodule detection for same sample images given in Table 2.The proposed algorithm detects nodules in images with 90% success rate.The false detection is around 9.3%.The detailed analysis of microstructure of ductile cast iron helps to determine the mechanical properties and to find the suitable application for that sample.Calculation of volume of phases also helps to determine whether the formed sample is in the standards of metal or not.It also helps to determine amount of impurity required to add while solidification of metal formation.

Conclusions
We have introduced a method for quantitative analysis of microstructure of Ferritic Pearlitic Ductile Iron.The method microstructure which segment ferritic phase correctly.This method detects the spheroidal nodules in the microstructure with 90% accuracy.The false detection nodule causes  1% change in the volume of graphite which is tolerable.
Fig 3 shows the microstructure of metal sample.The image is given as input to proposed algorithm for analysis.Fig 3 shows the thresholded image of microstructure.The white pixels indicate the ferrite phase.The black pixels indicate pearlite and graphite phase.In order to distinguish them separately nodule detection operation is performed with the help of circle detection using circular hough transform (CHT).Fig 4 shows the detected nodules from the thresholded image of microstructure.Table

Fig 4
Fig 2 microstructure of Ductile cast iron Fig 3 Threshloded image

Fig 6
Fig 6 shows the volume of ferrite, pearlite and graphite phase in microstructure image.The volume of ferrite is calculated by counting the number of 1's in enhanced image.The volume of graphite is calculated by summing the area of detected nodules.The volume of perlite is determined by subtracting area of nodules from number of 0's pixels in enhanced image.

Fig 6
Fig 6 Volume of phases Fig 7 shows the phase analysis of microstructural image of same sample using DeXel -Metallography Imaging Solution tool.The green color shows ferrite phase.The blue color shows pearlite and red color shows graphite.The tool threshold the image, for which user needs to enter the threshold value for each phase.Visual inspection shows that some part of ferrite is considered as pearlite and vice versa.Fig 8 shows nodule analysis using the same tool.For ferritic pearlitic ductile iron, graphite nodules are approximately circular.The tool considers both graphite flakes and graphite nodules as nodule and provides wrong classifications.The detection also exclude few nodules from analysis which mislead to determine the properties of sample.

Fig 7
Fig 7 Phase analysis using DeXel Tool Fig 8 Nodule analysis using Dexel Tool

Table 1 :
Analysis of detected nodules

Table 3 :
Accuracy of Nodule detection Sr.No.