lgerhardt45 / Jointify

Digitalizing ROM analysis for the MRI hospital, Munich, as part of the Tech Challenge
5 stars 0 forks source link

Fix angle calculation #98

Open BergmuellerNiklas opened 4 years ago

BergmuellerNiklas commented 4 years ago

Current problem: when we calculate the angle, we cannot measure anything over 180 degrees, since the formula we are using only supports the inner angle.

Possible solution: calculate a linear function through coordinates of hip and knee and then see if ankle coordinates lie on this linear function or further left/right. If this is the case, we know that the degree is larger than 180. And can use the outer angle degree or transform the inner angle to the outer angle. E.g. real value: 190 degrees currently shown: 170 degrees If we know that is has to be more than 180 degree (by checking the linear function), we can simply calculate (180-current degree) + 180

See here. https://www.youtube.com/watch?v=fTVurY4Y0Wo