Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67411

How to calculate tilted angle of a colored rectangle?

$
0
0

I am using tracking.js to track color rectangles from video stream and replace an image on top of them. It is workig properly only if the color rectangles are not tilted, otherwise the images are not aligned to rectangles properly althouth the images are appearing on colored rectangles.

The reason to it is tracking.js provides detected rectangle starting point x ,y and width and height. Is it possible to get the angle at which the rectangles tilted, not just other endpoint (x+w, y+h)?

And is it right way to do the way I want to do it?


Viewing all articles
Browse latest Browse all 67411

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>