1 | initial version |
maybe you can apply padding to your image using copyMakeBorder, like this:
x_padding = windowsize_c - (test_image.shape[1] % windowsize_c)
y_padding = windowsize_r - (test_image.shape[0] % windowsize_r)
image_padded = cv2.copyMakeBorder(image, 0,y_padding, 0, x_padding, cv2.BORDER_REPLICATE)
2 | No.2 Revision |
maybe you can apply padding to your image using copyMakeBorder, like this:
# how many pixels do we need to get an additional window ?
x_padding = windowsize_c - (test_image.shape[1] % windowsize_c)
y_padding = windowsize_r - (test_image.shape[0] % windowsize_r)
image_padded = cv2.copyMakeBorder(image, 0,y_padding, 0, x_padding, cv2.BORDER_REPLICATE)