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?".
arane27
Posts: 3 Joined: 2015-08-21T03:22:19-07:00
Authentication code: 1151
Post
by arane27 » 2015-08-21T03:37:22-07:00
Hello guys,
I can't find the solution for this....
I have 2 images:
1º Image:
2º image:
I need to replace "Object C" from 1º image to white pixels using 2º image...
Sorry for my English...
Bonzo
Posts: 2971 Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England
Post
by Bonzo » 2015-08-21T04:17:22-07:00
I think you should post an actual example.
How do you know where OBJECT C is in OBJECT A - is it always in the same place, do you have the co ordinates or will Imagemagick have to find it?
arane27
Posts: 3 Joined: 2015-08-21T03:22:19-07:00
Authentication code: 1151
Post
by arane27 » 2015-08-21T04:22:27-07:00
Bonzo wrote: I think you should post an actual example.
How do you know where OBJECT C is in OBJECT A - is it always in the same place, do you have the co ordinates or will Imagemagick have to find it?
IM has to find object C.
I'm using the command -->
Code: Select all
compare -subimage-search source.jpg objToFind.jpg out.jpg
IM finds the difference, but how can I replace the found difference with white pixels or just blur that region, is there anyway?
wich -metric should I use?
Thanks for quick reply!!
arane27
Posts: 3 Joined: 2015-08-21T03:22:19-07:00
Authentication code: 1151
Post
by arane27 » 2015-08-21T04:29:34-07:00
Here is an example.
I have these images -->
And here is the region to find and detele/blur/change -->
With command I wrote above I get this result -->
snibgo
Posts: 12159 Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK
Post
by snibgo » 2015-08-21T04:34:44-07:00
For the original post:
Code: Select all
compare -metric RMSE first.jpg objects_To_Remove.jpg -subimage-search NULL:
The result is:
So the found image is positioned at (31,279).
Code: Select all
convert first.jpg ( objects_To_Remove.jpg -fill Red -colorize 100 ) -geometry +31+279 -composite z.png
This paints a
red rectangle over the area. I choose red, so you can see it. Change "red" to "white" if you want.