Weighted Average blending of multiple 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
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Weighted Average blending of multiple images

Post by anthony »

Split as a new topic from topic MIP- maximum intensity projection...
fmw42 wrote:
Anthony wrote:This is NOT to say that a -evaluate-sequence operator is any less useful. Such a operator allows the easier addition of new methods.
It is not exactly the same, but what would be most useful would be a multi-image weighted sum. That would be somewhat like -average, but the user could supply wts and have the images added together by the weights.
The problem here is passing arguments to a operator that does not have arguments!
This was the same problem that we were having with making some of the special Compose methods into "convert". It could also be solved in the same way.

However what happens if the weightings was not provided, or not enough or too many were provided? What if you would like to handle a variable number of images, as per average.

Another posibility is for the -set meta-data attribute to be a 'per-image meta data setting. That is you assign a separate 'weight' to each image, before running the appropriate -evaluate-sequence method (say defaults to 1 if not set to produce an average.

Actually per image settings is already being done for meta-data. It would allow you for example to set a 'global' weighting for all images or a set of images, while still letting you set the weights for specific images.

Remember however that -set applys to all images in the current image sequence, whcih is why we often have options like -label to set the meta-dat of the next image read, and -set label to apply it to all images in memory - usally a clones copy in parenthesis).
See Im Examples, Basics, Setting/Changing Image Attributes
http://www.imagemagick.org/Usage/basics/#settings

It all comes down to first deciding " how it should be implemented " particularly with regards to allowing uses the most flexibility, while keeping it easy to use. Only then getting it implemented. Rushing into things is why many parts of IM are rather disordered.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply