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
JavaScript
x
9
1
import cv2
2
import matplotlib.pyplot as plt
3
4
image = cv2.imread(path_to_your_image) # Insert your image address here
5
resized = cv2.resize(image, (x, y), interpolation = cv2.INTER_NEAREST)
6
7
plt.imshow(resized)
8
plt.show()
9