Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- img = cv2.imread('image.jpg')
- blank_image = np.zeros((1, 40, 3), np.float32)
- img = np.concatenate((img, blank_image), axis=1)
- ValueError: all the input arrays must have same number of dimensions
- shape = img.shape
- shape = list(shape)
- #axis dimmension
- shape[1] = 1
- shape = tuple(shape)
- blank_image = np.zeros(shape, np.float32)
- def createBorder( ):
- global img # image in which we want to append
- borderType = cv.BORDER_CONSTANT
- TDLU=[0 , 1, 0 , 1 ]#top,down,left,right values
- img = cv.copyMakeBorder(img, TDLU[0] , TDLU[1] , TDLU[2] , TDLU[3] , borderType, None, 255)
- row, col = img.shape
- print(row, col)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement