I have a depth map image which was obtained using a kinect camera. In that image I have selected a region of size [400,400] and stored it as another image. Now, I would like to know how to resize this image into a size of [x,y] in python.
Advertisement
Answer
Same as a normal image
import cv2 import matplotlib.pyplot as plt image = cv2.imread(path_to_your_image) # Insert your image address here resized = cv2.resize(image, (x, y), interpolation = cv2.INTER_NEAREST) plt.imshow(resized) plt.show()