'Representative' composite image

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
grooveharder
Posts: 1
Joined: 2012-04-01T04:53:25-07:00
Authentication code: 8675308

'Representative' composite image

Post by grooveharder »

Firstly, forgive me for not giving a good thread title (couldn't think of a concise one to describe my problem). Secondly, forgive me if this has been answered before - I searched but found nothing.

I have a series (~500) of images, and corresponding image 'diffs' created by PerceptualDiff (http://pdiff.sourceforge.net/) and I want to create a composite of them to show the most changed areas in the original image sequence. I've tried a script with 'composite -blend' but it didn't work. '-evaluate-sequence add' seems to be close to what I want but I don't want to just add the images together.

For example, if I have 3 diff files which each comprise 3 pixels in a horizontal line - the first file is 3 black pixels; the second file is 2 outer black pixels with one white pixel in the middle; the third file is a black left-most pixel and a white middle and right pixel - as I understand it, if i use '-evaluate-sequence add' I will get a resultant file that is identical to the third file in my example. What I would want in the composite is the left pixel to be black, the middle to be 2/3 white (since the white occurs in 2 out of the 3 diffs) and the right to be 1/3 white - ie a 'representative' composite.

Hope that makes sense! Sorry for being wordy. Please help :)
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: 'Representative' composite image

Post by fmw42 »

try -evaluate sequence mean
Post Reply