Enhancement and cleaning of handwritten data by using neural networks