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?