c++ - OpenCV identify lines in this image -


i cannot apply houghlines transform opencv image posting. lines should oriented 15 degrees, results in lots of lines in several directions. how can this?!

this image.

yeah, hough won't apply here.. way many white pixels.

you can lines image processing. this:

  1. rotate image, lines vertical
  2. isolate each line.

rotate image

you can rotatedrectusing minarearect of white pixels, , rotate original image knowing yourrect.angle.

i suppose original image represents text. there lot of techniques in document analysis "rectify" image, i.e. correct skew.

isolate each line

you can use vertical (or horizontal) projection histograms. count number of white pixels each x (y) coordinate. can in opencv function reduce giving argument cv_reduce_sum. can identify spaces between lines histogram 0 (better apply small threshold). lines between 2 consecutive spaces.

hope helps!


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -