Re: Concatenating images (numpy arrays), but they look like HSV images

2009-07-10 Thread Sebastian Schabe
Robert Kern schrieb: Probably, you need to use zeros(..., dtype=uint8). When you use dtype=int, that will result in dtype=int arrays. I suspect that matplotlib is then interpreting that to mean that you want it to treat the input as scalar data (which it will pass through a colormap) rather th

Re: Concatenating images (numpy arrays), but they look like HSV images

2009-07-09 Thread Robert Kern
On 2009-07-09 12:34, Sebastian Schabe wrote: Hello everybody, I want to concatenate 2 numpy array which in fact are RGB images: def concat_images(im1,im2): rows1 = im1.shape[0] rows2 = im2.shape[0] if rows1 < rows2: im1 = concatenate((im1,zeros((rows2-rows1,im1.shape[1],3), int)), axis=0) elif

Concatenating images (numpy arrays), but they look like HSV images

2009-07-09 Thread Sebastian Schabe
Hello everybody, I want to concatenate 2 numpy array which in fact are RGB images: def concat_images(im1,im2): rows1 = im1.shape[0] rows2 = im2.shape[0] if rows1 < rows2: im1 = concatenate((im1,zeros((rows2-rows1,im1.shape[1],3), int)), axis=0) elif rows1 > rows2: im2 = concat