Determine areas containig text or pattern

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
prozakaz
Posts: 1
Joined: 2015-02-13T02:59:20-07:00
Authentication code: 6789

Determine areas containig text or pattern

Post by prozakaz »

How to find text or car number on image using php and imagemagick?
I trying to find car numbers area and crop it so from this
Image
Get that
Image

The pattern always the same

Image

Is there any solution to do that in php?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Determine areas containig text or pattern

Post by fmw42 »

IM's compare function will do a compare, but it is not rotationally nor scale insensitive. So you must have the same orientation and scale. But some one recently is trying to add a new invariant compare function. But I do not know how far along that is. see
viewtopic.php?f=2&t=26530

If the scale and rotation do not change, then you can crop out the license place and use compare with subimage-search to find it. See
http://www.imagemagick.org/Usage/compare/
http://www.imagemagick.org/script/compare.php
viewtopic.php?f=1&t=14613&p=51076&hilit ... ric#p51076 (but you now need to add -subimage-search).

You might try OpenCV.
Post Reply