I'm working on a program that require me to find the angle between two lines. I have found all of the points coordinates of the lines, referenced into the 0,0 points, but i dont understand how to implement the dot product in Opencv to find the angle.
I use visual C++ using opencv library. I also found out that i can use cv::Mat::dot function to get dot product, but i can't find any good example. I can not understand the explanation in this link.
Can anyone give me a good example? so i can understand how to use that function to find dot product of two lines. Thank you.
If you have two vectors representing your lines, and call them
a
andb
(of typecv::Mat
) then the dot product is calculated asEdit Example code, by comments from author.