hstack
728x90
NumPy 배열 병합 : 영상 붙이기
1. numpy.vstacknumpy.vstack(tup) : Stack arrays in sequence vertically (rowwise)axis 0로 ndarray들을 붙임2d image라면 위아래로 붙여지게 됨.Simple exampleimport numpy as npa = np.ones((4,3))b = np.zeros((4,3))np.vstack( (a,b) )Image exampleimport cv2import matplotlib.pyplot as pltimg = cv2.imread('../../images/lena.png')stacked_img = np.vstack((img,img))plt.imshow(stacked_img[:,:,::-1])plt.show() 결과는 다음과 같음.ref:..