![](https://secure.gravatar.com/avatar/18baf70fd79953a6aab611d92cdc2237.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/18baf70fd79953a6aab611d92cdc2237.jpg?s=120&d=mm&r=g)
Hi, I wrote something simpler<http://dip4fish.blogspot.com/2011/05/making-mfish-image.html>without using directly linear algebra
![](https://secure.gravatar.com/avatar/91d1465a43d44ff9dfcea3125ea3763f.jpg?s=120&d=mm&r=g)
Jean-Patrick, Your general approach worked for me. I used a different function to normalize the data, and I created 'rgb' as a uint8 from the start rather than a float, but changing the dtype to float doesn't cause any problems on my system. Jonathan On Mon, May 23, 2011 at 5:59 AM, jp <jeanpatrick.pommier@gmail.com> wrote:
Hi,
I have written a script to try to combine five images into a three channels RGB images. 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
_______________________________________________ SciPy-User mailing list SciPy-User@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-user
![](https://secure.gravatar.com/avatar/320c2e9de535dbab2e20fff47da8d82d.jpg?s=120&d=mm&r=g)
Really interesting analysis, it is possible to analyze the photo in detail using stock options, for example, katy perry images https://depositphotos.com/stock-photos/katy-perry.html ,I often take photos from this resource. This is an interesting resource with a wide selection of stock photos, illustrations, and videos. Their interface is pretty easy to use, but the quality of the images can vary depending on what you're looking for
participants (3)
-
dsnou849@gmail.com
-
jkhilmer@chemistry.montana.edu
-
jp