Detection of Polygonal Frames in Complex Document Images