find a image part in another distorted image

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
HansWurst
Posts: 5
Joined: 2017-03-09T06:06:49-07:00
Authentication code: 1151

find a image part in another distorted image

Post by HansWurst »

I have a large image (lange.bmp). This image has a small image what I have overlayed on it. So I also know the overlayed image (smal.bmp). After than, the lange image will be compressed or elongate.
Now, I have to find/locate the smal.bmp image in the large (distorted) image. If the lage image would not be distorted, I can locate the position with this lines:

Code: Select all

compare -metric rmse -subimage-search  large.bmp smal.bmp NULL
0 (0) @ 150,49
But if I do this with my distorted image, it is not able for me to locate the overlayed image. Do I use the wrong command?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: find a image part in another distorted image

Post by snibgo »

Sample images might help us understand what you want. You can upload to somewhere like dropbox.com and paste the URLs here.

If you put a small image in a large image, then distort the result, then the small image is no longer in that result. Of course.

If you can undistort your large image, then you can search for the small image. Or you can distort just the small image, and search for that in the large distorted image.
snibgo's IM pages: im.snibgo.com
Post Reply