OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Sun, 04 Feb 2018 04:50:58 -0600Is there an easy way to calculate the clockwise angle of a line drawing?http://answers.opencv.org/question/183583/is-there-an-easy-way-to-calculate-the-clockwise-angle-of-a-line-drawing/![image description](/upfiles/15173553319879814.png)
Hello everyone, can you please help me with this issue?
I want a clockwise angle which would be positive and greater than 90 degrees. Is there a single function that can give me a positive counterclockwise angle for a line between two points?
I would like to keep the code down to a minimum, such as one or two functions used at most to find my angle.Tue, 30 Jan 2018 17:35:58 -0600http://answers.opencv.org/question/183583/is-there-an-easy-way-to-calculate-the-clockwise-angle-of-a-line-drawing/Comment by sjhalayka for <p><img alt="image description" src="/upfiles/15173553319879814.png"></p>
<p>Hello everyone, can you please help me with this issue?</p>
<p>I want a clockwise angle which would be positive and greater than 90 degrees. Is there a single function that can give me a positive counterclockwise angle for a line between two points? </p>
<p>I would like to keep the code down to a minimum, such as one or two functions used at most to find my angle.</p>
http://answers.opencv.org/question/183583/is-there-an-easy-way-to-calculate-the-clockwise-angle-of-a-line-drawing/?comment=183626#post-id-183626Are you familiar with the dot product and acos? If so, post the answer to your question.Wed, 31 Jan 2018 07:05:43 -0600http://answers.opencv.org/question/183583/is-there-an-easy-way-to-calculate-the-clockwise-angle-of-a-line-drawing/?comment=183626#post-id-183626Comment by Grillteller for <p><img alt="image description" src="/upfiles/15173553319879814.png"></p>
<p>Hello everyone, can you please help me with this issue?</p>
<p>I want a clockwise angle which would be positive and greater than 90 degrees. Is there a single function that can give me a positive counterclockwise angle for a line between two points? </p>
<p>I would like to keep the code down to a minimum, such as one or two functions used at most to find my angle.</p>
http://answers.opencv.org/question/183583/is-there-an-easy-way-to-calculate-the-clockwise-angle-of-a-line-drawing/?comment=183622#post-id-183622This helped me for c++, no opencv needed: https://stackoverflow.com/questions/14066933/direct-way-of-computing-clockwise-angle-between-2-vectors/16544330Wed, 31 Jan 2018 05:38:27 -0600http://answers.opencv.org/question/183583/is-there-an-easy-way-to-calculate-the-clockwise-angle-of-a-line-drawing/?comment=183622#post-id-183622Comment by LBerger for <p><img alt="image description" src="/upfiles/15173553319879814.png"></p>
<p>Hello everyone, can you please help me with this issue?</p>
<p>I want a clockwise angle which would be positive and greater than 90 degrees. Is there a single function that can give me a positive counterclockwise angle for a line between two points? </p>
<p>I would like to keep the code down to a minimum, such as one or two functions used at most to find my angle.</p>
http://answers.opencv.org/question/183583/is-there-an-easy-way-to-calculate-the-clockwise-angle-of-a-line-drawing/?comment=183600#post-id-183600Is it an opencv problem ?Wed, 31 Jan 2018 02:11:11 -0600http://answers.opencv.org/question/183583/is-there-an-easy-way-to-calculate-the-clockwise-angle-of-a-line-drawing/?comment=183600#post-id-183600Answer by supra56 for <p><img alt="image description" src="/upfiles/15173553319879814.png"></p>
<p>Hello everyone, can you please help me with this issue?</p>
<p>I want a clockwise angle which would be positive and greater than 90 degrees. Is there a single function that can give me a positive counterclockwise angle for a line between two points? </p>
<p>I would like to keep the code down to a minimum, such as one or two functions used at most to find my angle.</p>
http://answers.opencv.org/question/183583/is-there-an-easy-way-to-calculate-the-clockwise-angle-of-a-line-drawing/?answer=183951#post-id-183951On youtube **watch?v=E5OIhlCYGyw**. You can get source code.Sun, 04 Feb 2018 04:50:58 -0600http://answers.opencv.org/question/183583/is-there-an-easy-way-to-calculate-the-clockwise-angle-of-a-line-drawing/?answer=183951#post-id-183951