Reputation: 131
I am trying to scale my colorful image as follow.
But the number of output channels are 2 instead of 3.
I should mention that, it was working correctly before, and this is happening after I recently reinstalled many packages (scikit-image version is 0.18.1).
Has anyone saw a similar problem?
img=io.imread(os.path.join( imagepath, fname))
print('==> ', img.shape)
scale=1000/img.shape[1]
img = rescale(img, scale)
print('==> ', img.shape)
outputs:
==> (1444, 1444, 3)
==> (1000, 1000,2)
Upvotes: 1
Views: 345
Reputation: 51
You may need to set multichannel=True as an input property. see this link for more information: https://scikit-image.org/docs/dev/api/skimage.transform.html#skimage.transform.rescale
Upvotes: 2