Calibration of powder diffraction experiments using area detectors is essential to extract high quality one-dimensional powder diffraction pattern. Precise calibration necessitates a sensible characterization of the Debye-Scherrer rings formed on the detector plane. An algorithm, designed and developed to automate this process, is described in this paper. All the parameters required for an experimental calibration are extracted using robust pattern recognition techniques. Several image preprocessing methods are employed, reducing the computational cost but retaining high signal quality. A modified version of a one-dimensional Hough transformation is used to determine the final parameters of the ellipses. After extraction, the parameters are optimized using nonlinear least squares fit. The presented algorithm is insensitive to image artefacts and was successfully applied to a large number of calibration images. The performance of the algorithm is demonstrated by the comparison of results obtained from the presented automatic calibration method and an existing manual method.