Angle measurement from video discontinuity problem

7 次查看(过去 30 天)
I want to measure the angle of a pendulum as it moves between specific limits, but I have a video of its motion ranging from 0 to 330 degrees. I’ve tried measuring the angle in MATLAB, but the results are inconsistent and appear to jump. Red one is what i want. How can I fix this?
My goal is to measure the pendulum angle smoothly across the full 360 degrees, similar to what is shown in this YouTube video. This is the initial phase of the project, and I’m looking for help. If anyone is interested and help, we could collaborate.

回答(1 个)

Divyajyoti Nayak
Divyajyoti Nayak 2024-12-20
Hi @AC,
On running the code and trying to debug it, I found that the 'jump' in angle values is because of the values of 'x1','y1','x2' and 'y2'. The calculation of the angle is coded with an assumption that 'x1' and 'y1' are the center of the pendulum about which it is rotating but that is not true in each iteration.
angle = atan2d(y2 - y1, x2 - x1); %Assuming x1 and y1 are center coordinates
On printing out the values of the four coordinates, you can see that after some time 'x2' and 'y2' contain the value of the center. Hence, there is a "jump" in angle calculated as it is being calculated in a different direction.

类别

Help CenterFile Exchange 中查找有关 Assembly 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by