python opencv imresize

resized_image = cv2.resize(image, (100, 50)) 

Here is what the above code is Doing:
1. We’re loading the image into the variable image.
2. We’re creating a new variable called resized_image.
3. We’re using the cv2.resize function to resize the image.
4. We’re passing in the image we want to resize and the dimensions we want to resize it to.
5. We’re storing the resized image in the resized_image variable.