Blending/merging N images with more weight for brighter areas in ImageMagick

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
sm535
Posts: 1
Joined: 2018-05-01T11:24:09-07:00
Authentication code: 1152

Blending/merging N images with more weight for brighter areas in ImageMagick

Post by sm535 »

Hello All,

Need to merge/blend two images in ImageMagick such that brighter parts of each image will get more weight towards the final blended result. For example, if there are two images with a light spot in position A and B respectively, the darker parts of the second image in the position A will be given, say 10%, weight while the brighter part from the second image would get 90% of the weight during final merging. I have tried the following in ImageMagick without success:

convert -luminize
convert -evaluate-sequence mean
composite -dissolve P
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Blending/merging N images with more weight for brighter areas in ImageMagick

Post by fmw42 »

Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line and if possible your images.

See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620

For novices, see

http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown

Create a mask for each image with it lighter where you want to emphasize one image and darker where you want to emphasize the other image. The do a 3 image composite with the mask as the third image. See https://www.imagemagick.org/Usage/compose/#compose
Post Reply