Page 1 of 1

Creating a diff/compare from hundreds of images

Posted: 2019-02-26T03:26:16-07:00
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.

Re: Creating a diff/compare from hundreds of images

Posted: 2019-02-26T03:41:11-07:00
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.

Re: Creating a diff/compare from hundreds of images

Posted: 2019-02-26T04:07:10-07:00
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

Re: Creating a diff/compare from hundreds of images

Posted: 2019-02-26T04:11:29-07:00
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.

Re: Creating a diff/compare from hundreds of images

Posted: 2019-02-26T04:57:52-07:00
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

Re: Creating a diff/compare from hundreds of images

Posted: 2019-02-26T13:22:41-07:00
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.