[SciPy-User] How to display a RGB image (MFISH)?

jp jeanpatrick.pommier at gmail.com
Mon May 23 07:59:57 EDT 2011


Hi,

I have written a script to try to combine five images into a three channels 
RGB images<http://dip4fish.blogspot.com/2011/05/trying-to-combine-mfish-images-into-rgb.html>
.
The resulting RGB image looks like a grey scale image instead of a color 
one.

I have three np.array Rnorm, Gnorm, Bnorm which are copied into a rgb array:

*rgb = np.zeros((shape[0],shape[1],3),dtype=float)
mxr=np.max(R)
mxg=np.max(G)
mxb=np.max(B)
Rnorm=np.uint8((255*(R/mxr)))Gnorm=np.uint8((255*(R/mxg)))Bnorm=np.uint8((255*(R/mxb)))#copy each RGB component in an RGB array
rgb[:,:,0]=Rnorm
rgb[:,:,1]=Gnorm
rgb[:,:,2]=Bnorm*

*pylab.subplot(224, aspect='equal',frameon=False, xticks=[], yticks=[])
pylab.imshow(rgb)
pylab.show()*

Any advice?

Thank you

Jean-Patrick

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20110523/5a4c5cdf/attachment.html>


More information about the SciPy-User mailing list