Finds out the center of gravity (C.G.) of a gray image (matrix structure containing binary values only) and replaces each cell containing a binary '1' with the equivalent distance from the C.G.