Ask Your Question

Revision history [back]

To solve this you will definitely perform the following steps.

  • Apply some erosion and dilation to remove the noise and to fill the gaps.
  • Then you want to apply a thinning algorithm (also in OpenCV) to have single edges
  • Then you want to define the edge directions

For the last part, I would have a look at edge direction algorithms. You might be able to do something with the gradients of the image, since the direction is perpendicular to the dominant gradient directions.