Home > OS >  API to retrieve images from within an image or pdf
API to retrieve images from within an image or pdf

Time:11-13

I am looking for a way to extract images from within another image. For example: enter image description here

Here is a picture taken of a paper. It includes text, an image of a camera, and an image of a qr code. Is there an API that can possibly extract those two(camera and qr code) from this larger image and separate them into their own individual images. I know this is doable with the text(OCR), but I need to find some way to do Image Recognition if that even exists. For now, I cant find any reference to doing this besides extracting images from pdf's, which none of those softwares have the capability to extract them from a non-perfect pdf.

Price for the API(node.js prefered, but i can adapt to use any language) is not a big concern, I'm just not sure this is even possible to due without programming a legitable artificial intelligence using machine learning, which I would no doubt cause a global internet shutdown from breaking everything if I attempted to do so.

Anyway, any suggestions would be great and much appreciated. Thanks!

EDIT: the images aren't always those, it can be an image of anything, from potatoes to flags

CodePudding user response:

For the QR code, you can simply use a QR code scanner library and convert the output back into a QR code. As for the camera, you are going to need an image recognition service like enter image description here

for striping back you may need a secondary autocrop task

enter image description here enter image description here

  • Related