简体   繁体   English

如何显示x和y轴图

[英]How to show the x and y axis graph

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. 我有一个包含2条红线的图像,并且通过图像处理,我能够获得仅包含2条红线的新图像。

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? 有没有办法在新图像上显示x和y轴图,所以我可以用它来获取2条线的均值来计算2条线之间的角度?

Thank you. 谢谢。

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. 一旦在坐标轴上创建带有红线的图像,便可以使用WebPlotDigitizer从每条线的端点提取数据,然后按照您的描述计算它们之间的角度。 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. 只有线之间的相对距离很重要,因此只要x和y轴均等缩放,则实际值是多少都没有关系。 If you want to do this automatically in Python, it will take a bit more work. 如果要在Python中自动执行此操作,则将需要更多的工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM