从线的交点找到两个不同对象之间的角度 [英] Find angle between two different objects from intersection of the lines

查看:163
本文介绍了从线的交点找到两个不同对象之间的角度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里有一些膝盖分割图像是一个例子

I have some knee segmentation images here is an example

我的目标是:


  1. 自动在每个对象中生成绿色圆点。

  2. 在每个对象上创建一条线,并自动从十字标记的交点处创建黑色圆点。 / li>
  3. 从这些行的交点找到角度。

我的目标插图在这里完成

Illustration of my goals is done here

我在每个物体(股骨和胫骨)中都创建了十字标志,但问题是我不知道该怎么做才能实现接下来的步骤。

I've created cross sign in each objects (femur and tibia), but the problem is I don't know what to do to achieve the next steps.

请,我需要你的帮助。 MATLAB或C实现将是愉快的。谢谢

Please, I need your help. MATLAB or C implementation will be pleasure. Thanks

推荐答案

您的角度非常扭曲,因为您无法确定足够精确的交叉位置,以及骨骼是否有轻微变形或别名你输出的精度很低。

your angles are very distorted because you can not determine the cross position precise enough and also if the bone is slightly deformed or aliased you got low precision output.

我会改为:


  1. 投射水平扫描线(黄色)

  2. 沿着它找到第一个(红色)和最后一个(绿色)骨点


    • 从左侧扫描第一个点

    • 从右边扫描最后一点(以避免骨折或分割间隙出现问题)


  • 忽略太近红色/绿色点一些阈值


  • atan2,atanxy

  • acos(dot(linedir1) ,linedir2))如果角度足够受限

  • by atan2,atanxy
  • or by acos(dot(linedir1,linedir2)) if angles are constrained enough

[注释]


  • 为了提高准确性你也可以忽略太远的起点/终点

  • 这也标志着下一个骨骼正在开始

这篇关于从线的交点找到两个不同对象之间的角度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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