alt textusing the php sample all I get back is a rtf file containing the original image. I was expecting text in some format?

I was hoping to be able to get the license plate number:

asked 06 Mar '13, 03:19

andyhclark's gravatar image

andyhclark
1113

edited 06 Mar '13, 10:55

Sounds pretty strange. Can you share your original image?

(06 Mar '13, 08:39) Andrey Isaev ♦♦

Sure - image uploaded to original post.

(06 Mar '13, 10:56) andyhclark

I suppose you are trying to recognize license plate, right? In that case RTF export format is kind strange choice, I would recommend XML. Also, it looks like you are using default profile - documentConversion, which is designed to convert scanned documents to editable RTF files. It detects that your image is not a text, but rather an illustration and exports it appropriately.

In your case I would recommend textExtraction profile, which is designed to extract all possible text from the image. Basically, it tries to recognize everything that looks like text, even if it is not a text at all. I tried it with your image - it extracts license plate pretty well, but also extracts some garbage from other areas of image, but this is intended behavior of this profile.

UPD: In this case the complexity of output comes from complexity of the input. If you would send only image of a license plate for recognition, then indeed you would get only text from it. However, since you send whole picture that has image of three cars, trees and bushes, and also a red date stamp, "GT1", Volkswagen logo and lot of other stuff that might be mistaken for a text. OCR has no idea that you need only a license plate text, basically it does not know that this is a license plate and everything rest is not.

In this case you should either crop image and send for recognition only what you really need, or figure out the way to filter out recognition results, for example by regular expressions and text size.

Unfortunately, we don't have a sample code particularly for that, but I guess it should not be so difficult to add some filtering algorithm to one of existing.

link

answered 06 Mar '13, 18:17

Andrey%20Isaev's gravatar image

Andrey Isaev ♦♦
2835

edited 07 Mar '13, 09:25

I'm just using the only php example that you provide which is geared for rtf. I've tried changing the export format to XML and while I get an XML file back its just full of <block> statements and co-ordinates. All I really need is for it to echo the license plate number, I don't want a file. Do you have a less complex php example that will do that?

Many thanks

(06 Mar '13, 21:55) andyhclark
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×33

Asked: 06 Mar '13, 03:19

Seen: 5,644 times

Last updated: 07 Mar '13, 09:25

© 2016 ABBYY. All rights Reserved. www.ABBYY.com | Privacy Policy | Legal