Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I've a simple idea, may this can help you:)

  1. Do some morphology to eliminate the noise.
  2. Straighten the line, correct its angle to make it horizontal: use radon_transformation or houghline to get the rotating angle then warpaffine it.
  3. Finally get the number of white pixels on one column which is just the width (or you can get the averge of thoses on the whole line or part of it to make the result more stable).