0

I am a just starting with opencv so I am looking for your advice. I need to process images and extract text from it. So far it all works well except images with frames.

Here is an example. In this case frame is white. (border on the edge is just to show image dimension) enter image description here

Here is another example with a grey frame. enter image description here

Please give me some tips how I can cut image out of the frame with python.

Thank you in advance!

Worker
  • 2,411
  • 6
  • 29
  • 55
  • 1
    Do you want to remove the frame or just detect the text? – zindarod May 11 '18 at 16:08
  • @zindarod want to learn how to develop an algorithm that will detect and remove frame. – Worker May 11 '18 at 16:10
  • 1
    `crop the inner rect` equals to `remove the outer border`. `binary and find the contour` may be a choice. – Kinght 金 May 12 '18 at 01:22
  • 1
    See this link: https://stackoverflow.com/questions/19271692/removing-borders-from-an-image-in-python https://stackoverflow.com/questions/10615901/trim-whitespace-using-pil/10616717#10616717 – Salman May 12 '18 at 10:39
  • @SalmanThank you for the links! The first one I saw myself, but the second one is very interesting! Thank you! – Worker May 12 '18 at 18:36

0 Answers0