In this project mahalanobis distance and minkowski distance are used to measure the distance of the point from the mean of data points. Mahalanobis distance measures how many standard deviation the point is from mean of distribution of points, while minkowski distance measures euclidean distance and manhattan distance on euclidean space. The algorithm is developed for quality inspection of surface of brake pad using statistical analysis of surface information captured by CCD camera.