Reputation: 9636
I'm working with images from which I would like to take parts out and make one new image. I can make use of ImageMagick or OpenCV. Here is a sample image:
From this image I would like to take out the title, two annotated texts (one in circle one in rectangle), and the text from bottom.
So, the final image would have: Image Title, Annotated Text1, Annotated TExt, and This is some test. These parts of the image don't have to be in any particular order in the new image.
Questions
I've tried to erode the image and came up with this:
My Strategy
Following is my strategy to only keep parts of the image with white background and text. However, I'm not sure if this is doable with OpenCV...
There will be different ROI's in the image
Upvotes: 2
Views: 553
Reputation: 3135
If you are dealing with only similar looking fonts, and you are not looking for something super efficient, you can simply perform correlation with each letter of the alphabet (26 upper and 26 lower). Threshold out the peaks and add them together. You can then just define you bounding boxes around the peaks.
Upvotes: 0