displaying image with imshow in python -


i construct image follows

   import numpy    im = numpy.zeros((100,100,3))    im[:,:,0] = rdata    im[:,:,1] = gdata    im[:,:,2] = bdata 

when show data using imshow follows

  imshow(im) 

it not display correct result.

but if following

  scipy.misc.imsave("temp.png",im)   nimg = scipy.misc.imread("temp.png")   imshow(nimg) 

the image displayed correctly.

i not sure issue, there type problem, data mean normalized.

thanks


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -