title: Sobel operator for gradient angle
body: <p>I want to find the direction of stroke in text.How to used Sobel operator for this purpose?
  <img src="https://i.stack.imgur.com/vWQGH.png" alt="enter image description here"></p>
  
  <p>This image show dp .which is gradient direction.I wanted to know how I can apply Sobel operator for finding pixel to chose (from p to q)along path to find other end q of pixel in edge.</p>