Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 14185

The shapes of image read from CV2 and Pillow are different

$
0
0

I have an image read from cv2.imread, the shape is (2320, 1744, 3). However, when I use Pillow, the results are very different:

a = PIL.Image.open('mypic')a.size # => (2320, 1744)b = np.asarray(a)b.shape # => (1744, 2320, 3)

Why is it automatically transposed?


Viewing all articles
Browse latest Browse all 14185

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>