title: Pattern recognition in an image using python?
body: <p>How can I use Python to find similar simple patterns in a black and white image? For example: find all figures with a horizontal pattern and all figures with vertical lines and mark them as separate groups. I guess I'll end up using the OpenCV library but haven´t quite found the way. </p>
  
  <p>To make myself clear, I include images of what I would expect the program to do. </p>
  
  <p><a href="https://i.stack.imgur.com/GyxUC.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GyxUC.jpg" alt="Original image"></a></p>
  
  <p><a href="https://i.stack.imgur.com/C8YCb.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C8YCb.jpg" alt="processed image"></a></p>