问题
I have some knee segmentation images here is an example

My goals are:
- Generate green colored dot in each object automatically.
- Create a line which is across each object and black colored dot from intersection of cross sign automatically.
- find the angle from intersection of these lines.
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.
Please, I need your help. MATLAB or C implementation will be pleasure. Thanks
回答1:
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.
I would instead:
- cast horizontal scan lines (yellow)
- find first (red) and last (green) bone point along it
- first point by scanning from left
- last point by scanning from right (to avoid problems with fractures or segmentation gaps)
- compute mid point between them (blue/magenta)
- ignore too close red/green points by some treshold
- regress lines per each bone midpoints
- compute angle
- by
atan2,atanxy
- or by
acos(dot(linedir1,linedir2))
if angles are constrained enough
- by

[Notes]
- to increase accuracy you can ignore too distant start/endpoints too
- and this also flags that next bone is starting
来源:https://stackoverflow.com/questions/30462831/find-angle-between-two-different-objects-from-intersection-of-the-lines