Contour detection and shape recognition in image analysis door