1

I have an image that contains 2 red lines, and using image processing I was able to get a new image containing only the 2 red lines.

Is there a way to show on the new image the x and y axis graph so I could use it to get the mean of the 2 lines to calculate the angle between the 2 lines?

Thank you.

petezurich
  • 9,280
  • 9
  • 43
  • 57
  • Something like `axis on`? – Cris Luengo Mar 09 '19 at 15:37
  • @CrisLuengo my goal is to be able to get the slope(or maybe it's called the mean not slope) of 2 lines that intersects so I could calculate the angle between the lines with the formula tan(angle)=abs[m2-m1/(1+m1*m2)] with m1 and m2 the slope of each line...first I thought if there's a way to show the axis and then pick 2 points on each lines get their coordinates and calculate the slope but I can't find any tutorial what so ever to help me in that subject, so any help would really be appreciated please. –  Mar 10 '19 at 15:19

1 Answers1

0

The answers to this question show how to draw grid lines over an image. Once you create an image with your red lines on a coordinate axis, you can then use WebPlotDigitizer to extract the data from the endpoints of each line and then compute the angle between them as you described. Only the relative distance between the lines matter, so as long as the x and y axis are equally scaled it doesn't matter what the actual values are. If you want to do this automatically in Python, it will take a bit more work.

Nathaniel
  • 3,230
  • 11
  • 18