import cv2
# import numpy as np
img = cv2.imread('./data/lena.jpg', cv2.IMREAD_GRAYSCALE)
print('img.shape=', img.shape)
# img = img.reshape(img.shape[0] * img.shape[1])
img = img.flatten()
print('img.shape=', img.shape)
img = img.reshape(-1, 512, 512)
print('img.shape=', img.shape)
cv2.imshow('img', img[0])  # 그레이스케일 영상을 화면에 표시
cv2.waitkey()
cv2.destroyAllWindows()

c70529fbffa48d66731b46b1e773f5b70be665ea
<mask token>

<mask token>
print('img.shape=', img.shape)
<mask token>
print('img.shape=', img.shape)
<mask token>
print('img.shape=', img.shape)
cv2.imshow('img', img[0])
cv2.waitkey()
cv2.destroyAllWindows()

<mask token>
img = cv2.imread('./data/lena.jpg', cv2.IMREAD_GRAYSCALE)
print('img.shape=', img.shape)
img = img.flatten()
print('img.shape=', img.shape)
img = img.reshape(-1, 512, 512)
print('img.shape=', img.shape)
cv2.imshow('img', img[0])
cv2.waitkey()
cv2.destroyAllWindows()

import cv2
img = cv2.imread('./data/lena.jpg', cv2.IMREAD_GRAYSCALE)
print('img.shape=', img.shape)
img = img.flatten()
print('img.shape=', img.shape)
img = img.reshape(-1, 512, 512)
print('img.shape=', img.shape)
cv2.imshow('img', img[0])
cv2.waitkey()
cv2.destroyAllWindows()

import cv2
# import numpy as np
img = cv2.imread('./data/lena.jpg', cv2.IMREAD_GRAYSCALE)
print('img.shape=', img.shape)
# img = img.reshape(img.shape[0] * img.shape[1])
img = img.flatten()
print('img.shape=', img.shape)
img = img.reshape(-1, 512, 512)
print('img.shape=', img.shape)
cv2.imshow('img', img[0])  # 그레이스케일 영상을 화면에 표시
cv2.waitkey()
cv2.destroyAllWindows()
