Arithmetic compare to find darkest pixels from 2 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
form

Arithmetic compare to find darkest pixels from 2 images?

Post by form »

Hi.
I try to do an arithmetic comparisation of two images, to write the darkest pixel of every image to an output image.
(like the function "arithmetic/darkest" in PaintShop Pro).

Is that possible with ImageMagick?
Please help me out.
form

Re: Arithmetic compare to find darkest pixels from 2 images?

Post by form »

I figured it out myself:

Code: Select all

composite -compose darken 1.bmp 2.bmp out.bmp
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Arithmetic compare to find darkest pixels from 2 images?

Post by anthony »

I would be interested to know what you use this for!

Basically I breifly documented the operation in IM examples, But never knew why you want to do this.

The same goes for a number of other operations.

WARNING: some programs only restrict the draken/lighen test to just the individual channels of the two images and not the pixels overall grayscale color. Caution is advised.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
form

Re: Arithmetic compare to find darkest pixels from 2 images?

Post by form »

anthony wrote:I would be interested to know what you use this for!
I compare 100 snapshots of a tv-series with that, to get one picture where only the TV-Logo stays visible.
Then it can be used for a de-logo filter, which blends that logo out.

Btw, i cant find that "darken" function in your IM Examples. Under which category did you described it?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Arithmetic compare to find darkest pixels from 2 images?

Post by anthony »

Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply