nfaggian / growcut

Python implementation of the growcut algorithm.
23 stars 16 forks source link

`ndArrayToQtImage` fails for certain image sizes #5

Open stefanv opened 11 years ago

stefanv commented 11 years ago

Images with certain dimensions fail to display correctly under Qt after conversion. E.g., an (187, 189) image displays as diagonal bands. Use the following snippet to produce a suitable test image:

import numpy as np
import matplotlib.pyplot as plt

image = np.zeros((187, 189))
image[:] = np.arange(189)

plt.imsave('gradient.png', image, cmap=plt.cm.gray)
stefanv commented 11 years ago

We could also look at utilizing skimage.viewer.

nfaggian commented 11 years ago

Thanks Stefan - will look into this when I can find time.

ghost commented 9 years ago

When I compile this file I get the error message:

numpy too many indices for array error

How to fix this ? Begueradj