Calculating transluency from two image sample?

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
manpaint
Posts: 4
Joined: 2018-06-13T11:15:31-07:00
Authentication code: 1152

Calculating transluency from two image sample?

Post by manpaint »

ImageMagick version: ImageMagick-7.0.6-Q16)
Operating System: Windows 7 (64 bits)

Apparently, comparing two image with a different background colors allow you to get the main element, including transluency, exemple:

Image

I was told the method could be automated with tools (that I don't have access to). Assuming ImageMagick is able to do this, does anyone know wich command can execute such task?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Calculating transluency from two image sample?

Post by fmw42 »

This is the only reference in ImageMagick that I know. http://www.imagemagick.org/Usage/maskin ... background
manpaint
Posts: 4
Joined: 2018-06-13T11:15:31-07:00
Authentication code: 1152

Re: Calculating transluency from two image sample?

Post by manpaint »

Thanks I found the command I was looking for!

The command for those who may stumble onto this thread in the future:

Code: Select all

convert a.png b.png -compose difference -separate match_alpha.png
Post Reply