Creating a diff/compare from hundreds of images

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
dogsbody
Posts: 3
Joined: 2019-02-26T03:04:07-07:00
Authentication code: 1152

Creating a diff/compare from hundreds of images

Post by dogsbody »

Long time reader, first time poster. I am not talking about batch processing here.

I'm trying to look for commonalities across hundreds of pictures to create a mask.

I can kinda do this with

Code: Select all

compare
and

Code: Select all

composite -compose difference
between two images however I think I am going to get much much better results if I can do this across hundreds of pictures if possible?

ImageMagick 6.9.7-4 Q16 on Linux (only 'cos that's the version in the package manager, happy to jump to the latest if there is a killer feature :D )

Background; I ran an event many years ago and added a w-a-t-e-r-m-a-r-k (slightly obfuscated cos I don't want this turning into a "wm" removal tutorial). I was a good boy and backed up my pictures but due to time and money, you guessed it, I have lost the originals and seem to now only have the wm'd versions. One of our team members has just passed away which has made me dig out the images. Very sad but I'd be lying if I didn't admit to enjoying the challenge of trying to recover just a few of these images. I feel I am very close but as the WM I used all those years ago has some transparency it's harder than I imagined. Ironically the WM was added by be using ImageMagick and Perl scripts all those years ago.

Thank you in advance.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Creating a diff/compare from hundreds of images

Post by snibgo »

I'm not sure what question you are asking. I have a page on removing Watermarks. If the watermark is lossless and you know the watermark, removing is probably easy.
snibgo's IM pages: im.snibgo.com
dogsbody
Posts: 3
Joined: 2019-02-26T03:04:07-07:00
Authentication code: 1152

Re: Creating a diff/compare from hundreds of images

Post by dogsbody »

That is a really interesting read.
Apologies for not being clear.
I have hundreds of watermarked images but no longer have the originals or watermark templates. I'm looking to try and recreate the watermark from all the watermarked images.
Thank you
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Creating a diff/compare from hundreds of images

Post by snibgo »

I suggest you link to a couple of examples of watermarked images. If you also have a watermarked image and a non-watermarked version, that might be useful.

Please also say what version IM you use, on what platform.
snibgo's IM pages: im.snibgo.com
dogsbody
Posts: 3
Joined: 2019-02-26T03:04:07-07:00
Authentication code: 1152

Re: Creating a diff/compare from hundreds of images

Post by dogsbody »

Can post some watermarked images when I get home this evening but no non watermarked, that is the issue I am trying to solve :-)

ImageMagick 6.9.7-4 Q16 as I stated in the first post.

Thank you
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Creating a diff/compare from hundreds of images

Post by fmw42 »

Is your watermark an image or text? If the latter and the text is not too large, then you can "remove" often using a technique such as "inpainting". User snibgo has such a function on his web page. Also other tools such an opencv or skimage can do that. For small text, -morphology can sometime work.
Post Reply