相关疑难解决方法(0)

TypeError:图像数据无法转换为float

我想创建一个16位图像.所以我写了一个代码.

     import skimage 
     import random
     from random import randint                        
     xrow=raw_input("Enter the number of rows to be present in image.=>")
     row=int(xrow)
     ycolumn=raw_input("Enter the number of columns to be present in image.=>")
     column=int(ycolumn)

       A={}
       for x in xrange(1,row):
           for y in xrange(1,column):
               a=randint(0,65535)
               A[x,y]=a 

       imshow(A)
Run Code Online (Sandbox Code Playgroud)

但每当我运行此代码时,我得到一个错误显示"TypeError:图像数据无法转换为浮动".是否有任何解决方案.

我为我的写作中的错误道歉,因为这是我上面提到的第一个问题.

python image image-processing python-imaging-library

22
推荐指数
6
解决办法
10万
查看次数