Image.open with PIL in open pit image and converts encountered when np.asarray

When using the PIL Image.open open RGB image, image.size = (w, h)
i.e. (column, row) -> (x, y)
Here Insert Picture Description
if the carrier is converted to ndarray FIG form for ease of operation, the:
image = np.asarray (image)

Image.shape after conversion = (h, w, c) c is a number of channels, the RGB image. 3 = C
(H, W) of (row, column), that is, (y, x)

Released two original articles · won praise 9 · views 162

Guess you like

Origin blog.csdn.net/qq_45171138/article/details/104672756