在图像中画一条线 [英] Drawing a line in an image

查看:81
本文介绍了在图像中画一条线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在两个点之间通过鼠标点击在图像中的两个ponits之间绘制一条线。然后我想计算两点之间的距离。怎么可能..如果有人有任何想法请帮助我...







Aswathi Narayan

解决方案

Google是你的朋友 [ ^ ]。

顺便说一下,两点之间的距离,你知道吗,是:

 sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))


i need to draw a line between two ponits in an image by mouse click between two points..Then i want to calculate the distance between two points. how is it possible.. if anyone has any idea pls help me...



Aswathi Narayan

解决方案

Google is your friend[^].
By the way, distance between two points, you know, is:

sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))


这篇关于在图像中画一条线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆