I want to remove all horizontal and vertical lines but some small vertical lines are not getting removed. Adding the input and output images and the code below.
You can do this with ImageMagick library easily, just use some predefined filter
I am not sure this works with tiff format , you may need convert your tiff file to bmp/png/jpb first
This removes horizontal lines
convert rtaImage.png -morphology close:1 "1x5: 0,1,1,1,0"
this removes both
convert rtaImage.png -convolve "0,$v,0,0,$v,0,0,$v,0" -threshold 99% rtaImage2.png