Ask Your Question

Revision history [back]

Chances are that the problem in the line PixelNum, Collor_Channel = im.shape:

sage: shape = (1,2,3)
sage: PixelNum, Collor_Channel = shape
Traceback (most recent call last):

----> 1 PixelNum, Collor_Channel = shape

ValueError: too many values to unpack

Did you check the value of im.shape in particular if its size is really equal to 2?