Digital Pattern Recognition in Heritage Recording: An Automated Tool for Documentation and Reconstruction of Visually Complicated Geometric Patterns