Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Select only specific parts of the image

Tags:

php

ocr

I am completely new in "Optical character recognition" and need some more information and advices because I was not able to find is it possible to do what I need.

I have the following task:

  1. An images are given as input - they will have the same structure - some icons and company symbols and text.
  2. Only the text need to be selected and then make as text using some OCR library.

Is it possible to create a function using some OCR php library and select only some of the zones with text?

If there is not good OCR library for PHP, could you recommend me some on other languages?

The example below demonstrates what I want to do (this is just an example, I am not trying to do some out of the law manipulations with money):

This is sample image:

enter image description here

And this is the output (the text surrounded with red rectangles):

  1. THIS IS LEGAL TENDER FOR ALL DEBTS, PUBLIC AND PRIVATE
  2. L11180916G
  3. ONEDOLAR

All articles and advices are welcomed.

like image 598
gotqn Avatar asked Dec 24 '12 13:12

gotqn


People also ask

Which tool is used to select a particular part of an image?

The marquee tool is the basic tool that allows you to select all or part of objects. The marquee tool will generally have the option to select either an oval or a square shape as the selection tool, but some programs offer more choices.

What is used to take only the part or section of an image?

Answer: Slecetion tool is used to select an image or any part of it to perform cut , copy , edit or retouching operations.

How do I isolate part of an image in Photoshop?

Right-click on your selected area to remove it from the image. Selecting the image is the hard part. Once you have your dotted line around the image, simply right-click and choose how to isolate the image.


1 Answers

I would recommend: https://github.com/tesseract-ocr/tesseract

PHP probably not the best tool for the job, but you can always call tesseract from PHP if you want to, then parse the results that you get out of it.

like image 181
Gravy Avatar answered Nov 15 '22 13:11

Gravy