Hello,
I am interested in your project. I specialize in image processing programs and complicated computational algorithms to optimize operating time, used memory etc. One of the more complicated projects in which I took part was a program for recognizing and counting hairs on trichoscopic photos for a hair transplant company.
The main problem with such operations is the diversity of the saturation of contrast and brightness of the images (additionally I suspect your photos are colorful). Then removing unwanted lines requires replacing them with the color of the adjacent background, and not erasing them with white. I will gladly undertake the implementation of this order, but I would like to get a few examples of documents and photos (preferably in different saturation of light and darker) so that I can test different techniques of their cleaning. Probably I'll need to use different cleaning methods for different documents and additionally create an algorithm for intelligent selection of the appropriate method.
Regards,
Jarek