Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Image processing with ImageCompose

39 views
Skip to first unread message

Hemangi Wadekar

unread,
Oct 7, 2009, 7:06:26 AM10/7/09
to
Hi,

Would someone please help me to find out how to use ImageCompose[] to compare the signals on two images.

I would like to adjust the opacity of the top image so that the signals from bottom image also show up.

If I have one image red and other green, then would the matched points should show as orange?

Or is there any other way in Mathematica to get the results?

Any pointers will be appreciated.

Thanks,

Hemangi.

Kurt TeKolste

unread,
Oct 10, 2009, 7:11:32 AM10/10/09
to

Doesn't the second variant of ImageCompose do this for you?

"ImageCompose[image,{overlay,\[Alpha]}]
gives the result of alpha-blending overlay into image using blending
fraction \[Alpha]."
?

ekt

Regards,
Kurt Tekolste


David Bailey

unread,
Oct 10, 2009, 7:15:20 AM10/10/09
to
If you are starting with arrays of data (as opposed to images), by far
the best way is to use ListPlot to do the job directly:

data1 = {1, 2, 3, 4};

data2 = {1.1, 2.1, 3.3, 4.4};

ListPlot[{data1, data2}, PlotJoined -> True]

Note also, that if you generate several graphics objects, you can
combine them with Show, which will automatically adjust match the
coordinate systems.

Alternatively, if you are starting with images from somewhere outside
Mathmeatica, Argument 5 of ImageCompose (see the help on this function)
lets you merge the pixels of the two images in any way desired.

David Bailey
http://www.dbaileyconsultancy.co.uk

Patrick Scheibe

unread,
Oct 11, 2009, 8:05:42 AM10/11/09
to
Hi,

what you want is ImageAdd:

img1 = Import["http://sipi.usc.edu/database/misc/4.2.04.tiff"];
img2 = Import["http://sipi.usc.edu/database/misc/4.2.02.tiff"];
ImageAdjust@ImageAdd[
ImageApply[#*{1, 0, 0} &, img1], ImageApply[#*{0, 1, 0} &, img2]]

Cheers
Patrick

0 new messages