AdamSpannbauer / python_video_stab

A Python package to stabilize videos using OpenCV
https://adamspannbauer.github.io/python_video_stab/html/index.html
MIT License
682 stars 118 forks source link

Fix delta angle plot issues around degrees/radians #32

Closed Molier closed 5 years ago

Molier commented 5 years ago

Appreciate the work and the progress, can't wait to see the upcoming features, like the auto border.

I can't figure out what unit the rotation is in, it says "degrees" on the axis but that doesn't seem to be true. Eg. in the following screenshot:

image

The image is rotated 5° to the counterclockwise, which corresponds to 0,0872 radians. The graph displays -0.18. What's going on here?

AdamSpannbauer commented 5 years ago

Hi @Molier! I'm not at a place where I can triple check everything right now, but I believe that 'degrees' is correct.

You mention that the "image is rotated 5° to the counterclockwise". Is the 5° you report relative to the image's starting angle or relative to the previous frame's angle?

AdamSpannbauer commented 5 years ago

I still haven't had time to review this in the depth it deserves. I am feeling less confident about my initial answer.

Hope to review this soon and add an option to plot in rad or degrees. Thanks for opening the issue @Molier

AdamSpannbauer commented 5 years ago

@Molier I am renaming this issue to better reflect it as a work item. You found a bug in the package.

The plot is plotting the rotations used while stabilizing in radians despite being labeled as degrees.

I will update progress here.

AdamSpannbauer commented 5 years ago

35 adds fixes the mislabelling of plot and adds option to plot in radians or degrees using the radians argument (default radians=False)

@Molier I will be merging #35 assuming CI passes. I think that this PR closes your issue, but I will give you some time to respond. If I haven't heard anything in a few days I will close this issue.

AdamSpannbauer commented 5 years ago

@Molier I am closing this issue. If you feel that it should be reopened please let me know