Finding angle between thee points

16 ビュー (過去 30 日間)
Fredrick  Graham
Fredrick Graham 2016 年 3 月 21 日
編集済み: Fredrick Graham 2025 年 10 月 18 日
Hello all,
I have a image of hand which i want to find the angle between the finger joints. Attached is the images that i use for calculating the angle between the joint. I try to use the meny methods including bw boundary or boundary detection to find the finger tips and finger vertex but i couldn't calculate the angle from point A to point B with center of C.

回答 (2 件)

Image Analyst
Image Analyst 2016 年 3 月 22 日
Try this:
Not really sure what part you're stuck on. Keep in mind that we can't write the entire app for you, but you might try something like
  1. threshold to find hand and fingers
  2. run stdfilt() to find knuckles
  3. use bwboundaries() to find the boundaries, and then the distance of the farthest point on the boundary from the knuckle point
  4. use dot() and acosd() to find the angle.
  1 件のコメント
AC
AC 2023 年 2 月 21 日
Dear Sir, I am trying to measure angle between two points from webcam but i cant do it. I triedn couple of codes but after some rotation it gives wrong angle. Can you check the video and help me about code ?
This is exactly what i need. https://youtu.be/ujgmYacFMrs?t=22
Regards.

サインインしてコメントする。


Roger Stafford
Roger Stafford 2016 年 4 月 6 日
To find the angle rotating counterclockwise from point P1(x1,y1), pivoting around point P2(x2,y2), and ending at point P3(x3,y3) (in two dimensions,) do the following:
x12 = x1-x2; y12 = y1-y2;
x32 = x3-x2; y32 = y3-y2;
ang = mod(atan2(x12*y32-x32*y12,x12*x32+y12*y32),2*pi); % <-- The angle
This will give a value between 0 and 2*pi radians. Multiply by 180/pi to get degrees.
  1 件のコメント
Roger Stafford
Roger Stafford 2016 年 4 月 6 日
If you want the inner angles of the triangle P1P2P3 which can range only from 0 to pi, then do this:
ang = atan2(abs(x12*y32-x32*y12),x12*x32+y12*y32); % <-- The angle

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by