Linear Combination of Images

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Linear Combination of Images

Brian Wilt
Hello,

In the Process -> Image calculator ... dialog, there are some basic  
options, (add, subtract, multiply, etc.).  I was wondering if there  
was an easy way to do linear combinations of images / stacks, ie.  
NewImage = a * OldImage1 + b * OldImage2, where I can specify a and b.

Any suggestions?  Or do I have to write my own plugin?

Much appreciated, Brian
Reply | Threaded
Open this post in threaded view
|

Re: Linear Combination of Images

Michael Schmid
Hi Brian,

you can use the Blend Images Plugin
  http://rsb.info.nih.gov/ij/plugins/blend-images.html

it does either
  (1-a)*currentImage + a*secondImage
or
  currentImage + a*secondImage
(the latter iuf you click "fix weight 1 = 1")

If you need two independent factors, you can easily modify it.

Michael

_______________________________________________________________________


On Tue, August 11, 2009 22:58, Brian Wilt wrote:

> Hello,
>
> In the Process -> Image calculator ... dialog, there are some basic
> options, (add, subtract, multiply, etc.).  I was wondering if there
> was an easy way to do linear combinations of images / stacks, ie.
> NewImage = a * OldImage1 + b * OldImage2, where I can specify a and b.
>
> Any suggestions?  Or do I have to write my own plugin?
>
> Much appreciated, Brian
>