Image overlapping [message #55762] |
Fri, 07 September 2007 01:54 |
Wox
Messages: 184 Registered: August 2006
|
Senior Member |
|
|
Suppose several images represent the distributions of different
chemical compounds. I want to show this in one image with overlapping
distributions. For now I do it like this (pseudocode, see below):
http://users.telenet.be/wox/files/Overlap
distribution1.bmp
distribution2.bmp
distribution3.bmp
--> overlap.bmp
However, this doesn't look very nice. I was actually looking at
something like alpha blending, but then for more then two images. Any
ideas? Remark: the distributions are just 2D arrays (i.e. no RGB)
PseudoCode:
1. binImage1=Image1 gt threshold1
binImage2=Image2 gt threshold2
...
2. binImage=BinImage1 or BinImage2 or ...
multImage=BinImage1+BinImage2+...
3. R=BinImage1*R1+BinImage2*R2+...
G=BinImage1*G1+BinImage2*G2+...
B=BinImage1*B1+BinImage2*B2+...
4. R/=binImage*multImage
G/=binImage*multImage
B/=binImage*multImage
5. Plot RGB image:
tvscl,[[[R]],[[G]],[[B]]],true=3
|
|
|