A method for generating a surface profile of a microstructure. The profile
is processed to determine positions of at least two edges and an
approximate center point of the profiled surface. Segments of points on
the determined profile are fit to a straight line centered at the
approximate center point. A standard deviation of the fitted points is
measured. The length and position of the segment are varied until a
minimum standard deviation is determined and the process is repeated for
segments having different lengths. The point is determined from the
longest segment having a standard deviation approximately equal to the
minimum standard deviation of all of the segment lengths.