image processing : computing the axis of a long bone

2 次查看(过去 30 天)
Hey everyone .. i hope someone can point me to a solution, i am trying to find the angle between two long bones - known as the Q-angle ( have to process about 6000 x-ray images )
what i want to do is to draw a center line trough the first bone, and a center line through the second bone and then calculate the angle between those two lines. Please how can i approach the problem ?
any help will be appreciated, thanks

采纳的回答

Matt J
Matt J 2012-12-8
编辑:Matt J 2012-12-8
You can draw the lines using RBLINE
Roger Stafford recommends this formula for finding the angle between 2 vectors a and b
angle = atan2(norm(cross(a,b)),dot(a,b))*180/pi;
There are some long threads on it in the Newsgroup arguing that it behaves better numerically than other formulas.
  2 个评论
mounim
mounim 2012-12-8
编辑:mounim 2012-12-8
thank your for your answer, for using that formula, i have to click manualy on the picture. But since i'am going through 6000 x-rays, i need to do that automaticly.
i was thinking about this strategy :
  1. 1- defining the edge of the bone
  2. 2- drawing 2 parallel lines in the top bone
  3. 3- defining the points where the drawn line intersect with the edge of the bone
  4. 4- define the middel point between the 2 points ( from 3 )
  5. 5- draw a line between the 2 dots and then i will get my axis
does it make sense ? can i do it this way ?
Matt J
Matt J 2012-12-8
Yes, that seems plausible to me. You could use EDGE to find the edge points in conjunction with find(...,'first/last') or max/min to get the edge points on opposing sides of the bone. You might, however, need to fit a line to more than 2 mid-line points to get a good fit to that line.
A similar direction might be to use bwmorph(...,'skel',inf) to get the skeleton of the bones.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by