I have jpeg images of pages of text, some of which have pictures within their layout. I don't care about OCR of the text, but I would like to be able to extract the pictures from the page image for further processing.

Think of a magazine. Some pages might not have any pictures in them - it might just be a column or more of text.

Other pages might contain one or more pictures (diagrams, photographs, charts etc). I need to be able to extract this image data for further processing.

Ideally, I'd like a library that I can call using C, C++ or Java (I'm happy with any of those languages), but at a pinch a complete tool (especially if it's open source!)

My research so far has only thrown up OCR tools which discard image data rather than extract it for processing.

  • 1
    I personally don´t see any way around OCR, as you have to separate text and pictures.
    – convert
    Commented Jan 21, 2022 at 19:06
  • Are you looking for a paid solution or something available at no cost? Depending on the structure of the page, some OCR toolkits can automatically decompose the page into text zones and image zones. Once you have that collection it can be traversed, can stop at the ones flagged as images, and cropped out. However, some degree of OCR will be necessary to differentiate them. Commented Jan 21, 2022 at 19:17
  • At the moment, I’m open to any ideas - commercial or free, open or closed source. And I know that it may be an OCR tool (albeit that I don’t use the character recognition), but so far I haven’t found any tools which can do what I need but which have APIs that I can incorporate into my own software.
    – headbanger
    Commented Jan 23, 2022 at 8:12
  • LEADTOOLS does have a C function call which can flag regions in an MRC image as text, graphic, or table. Not entirely certain if this is what you're looking for, though. Do note this toolkit is a commercial product and is closed source. Also note I work for this company. Commented Jan 25, 2022 at 18:58
  • MRC Image? All I need to be able to do is take an image (jpeg) of a magazine page (as an example) and extract all of the pictures from it (i.e. crop to each region containing an image) and then I can process them individually (likely save them). The images, just to add complication are going to be line art diagrams - so it isn't as simple as just recognising a large block of colour and identifying it as being an image.
    – headbanger
    Commented Jan 26, 2022 at 8:44


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.