Answer the question
In order to leave comments, you need to log in
How to determine the presence of text on the photo using php?
You need to write a php script to determine the presence of text in the photo (in this case, these will be phone numbers) in the attachment of examples of such photos.
As you can see from the example photos, there are 2 types (where the phone number is displayed using different fonts in red and yellow)
Advise scripts or classes where to dig ...
There is no point in using ORC, since it is only necessary to determine the presence of a phone number in the photo.
Regarding the algorithm, there is an idea to use filtering by contrasts, but there is a problem with the implementation (what?).
I will be glad to any advice), if there is a desire, I am ready to pay denyushka for implementation. ))
Answer the question
In order to leave comments, you need to log in
well, as an option - line-by-line scanning and calculation of the average color value (for example, in stripes of 128 pixels high, such as the average text size) and if we notice a sharp jump in a yellow or red tint, then we draw conclusions. you can file an additional recheck, determine exactly the dimensions of this "off-scale" area
Assuming that phones always write in solid color, without translucency, you can:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question