i have two datasets of images, one with 900 samples and another with other 900 samples. If i take just one image of each dataset and convert them to array they are of shape (1, 128, 118), after the images are read in grayscale mode.
How could i stack these two arrays to be (2, 128, 118)?
import numpy as np
import cv2
img1 = cv2.imread(...)
img2 = cv2.imread(...)
np.stack([img1,img2],axis=0)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.