How can I extract data line from a grid chart?

Within the scope of my graduation project, I need to digitise chart data such as temperature, pressure, rain informations kept in charts. They each have certain chart and certain template. My problem is that detecting the data line from the grid lines. Having curvy horizontal lines is also creates problems.

I tried to find the data line by using contour methods. However, I generally acquired irrelevant lines due to noise created by freqeunt grid lines. I also tried to find the data line by color difference but I have so many old images and some are black and white, so color method cannot work all the time. An example chart is below:

How can acquire the data line and data from images like that?
Thanks for your helps!