I would like to optimize this code
fadeAndShine[old_, new_] := If[old == new, {1, 0.8, 0.2}, new];
ImageApply[fadeAndShine, {imageA, imageB}]
Is it possible, and if yes, on what should I focus?
Applying fadeAndShine
to following image takes 0.53 sec on my pc, while applying Max
takes 0.31 sec.
imageA =
Rasterize[Graphics[Table[Circle[{x, 0}, x], {x, 1, 25}]], "Image",
ImageSize -> 500];
imageB =
Rasterize[Graphics[Table[Circle[{0.8 x, 0}, x], {x, 1, 25}]],
"Image", ImageSize -> 500];
I'm willing to use another functionality as long as I get same result for any pair of images.