Hi Alex,
Thanks a lot for your reply. You are right about the 2.5% result. I made a mistake.

Lots of different ways to do this, but does this get you started?

img3 = rgbImage((!img2)+img,img,img)
display(img3)

I tried the above commands. What I get appears to be the same as the original figure. Is there something that I am missing?
Some of the stuff that I have tried are :
I get this error message with the following command :
> img4<-channel(img2,'asred') Error in function (classes, fdef, mtable)  :  unable to find an inherited method for function "channel", for signature "Image", "character"
You hint at several possible approaches. One alternative that I attempted was to assign NA to all those pixels that I wanted to be transparent.
This did not give the result that I was after.
One command that appears to be interesting is paintObjects which has an opacity parameter. But I am not able to figure out how I can use it in my case.
Some other information on transparency that I have found is related to the alpha channel and raster images. I will havbe to dig into them to see if I can make use of those alternatives.

It would help if you could just outline those alternatives that you think are promising.
Thanks,
Ravi Sutradhara

	[[alternative HTML version deleted]]

