Document Scanner Input Segmented Output OpenCV implementation of document alignment using contour detection, contour approximation, homography and perspective transformations.